nbinlineai.inspection_tools
Live names and values come from the connected kernel. Source files and static skill instructions can differ from objects already loaded in that kernel.
api_names
api_names(name: str, module: str = '', query: str = '', limit: int = 30) -> strList public members of a live object or explicitly imported module.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str | required | Live public Python name or name in module. |
module |
str | '' |
Installed module to import explicitly. |
query |
str | '' |
Case-insensitive substring of member names. |
limit |
int | 30 |
Maximum matching names to show, at most 100. |
| returns | str | Bounded public-name listing. |
search_docs
search_docs(name: str, query: str, module: str = '', depth: int = 1, limit: int = 20) -> strSearch public names and direct docstrings in a bounded object tree.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str | required | Live public Python name or name in module. |
query |
str | required | Case-insensitive text to find in names or direct docstrings. |
module |
str | '' |
Installed module to import explicitly. |
depth |
int | 1 |
Public member levels to inspect, from zero to two. |
limit |
int | 20 |
Maximum matches to show, at most 50. |
| returns | str | Bounded name and docstring matches. |
inspect_value
inspect_value(name: str, start: int = 0, limit: int = 20) -> strShow a bounded slice of a live built-in container or text value.
The value comes from the kernel, which can differ from notebook source. Arbitrary objects are shown by type only, without calling their repr.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str | required | Name of live text or a supported built-in container. |
start |
int | 0 |
Zero-based slice start, at most 10,000. |
limit |
int | 20 |
Maximum characters or items to show, at most 100. |
| returns | str | Bounded slice of a live value. |
search_value
search_value(name: str, query: str, limit: int = 20) -> strSearch live text or short item previews from a built-in container.
Text search covers the full accepted string, up to 1,000,000 characters. Container search uses short previews of up to 500 items. Scan and result limits can omit later matches. The search does not evaluate notebook source.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str | required | Name of live text or a supported built-in container. |
query |
str | required | Case-insensitive text to find in live text or container previews. |
limit |
int | 20 |
Maximum matches to show, at most 50. |
| returns | str | Bounded matches in live text or container previews. |
source_files
source_files(name: str, module: str = '', limit: int = 30) -> strFind nearby Python source files for a live symbol or imported module.
An explicit module import runs initialization. The result starts with the symbol’s source file and scans up to 500 entries beside it.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str | required | Live public Python name or name in module. |
module |
str | '' |
Installed module to import explicitly. |
limit |
int | 30 |
Maximum nearby Python paths to show, at most 100. |
| returns | str | Bounded source-path listing. |
list_skills
list_skills(query: str = '', limit: int = 30) -> strList installed pyskill entry points and static module descriptions.
The descriptions come from bounded source reads and AST docstrings. The skill modules are not imported or executed by this listing.
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
str | '' |
Case-insensitive entry-point or description filter. |
limit |
int | 30 |
Maximum descriptions to show, at most 100. |
| returns | str | Bounded installed-skill descriptions. |
read_skill
read_skill(module: str) -> strRead a registered pyskill’s static module instructions without importing it.
The entry point must be installed. This reads at most 1 MB of UTF-8 Python source and extracts its module docstring as instructions.
| Parameter | Type | Default | Description |
|---|---|---|---|
module |
str | required | Registered pyskill entry-point name or module path. |
| returns | str | Bounded static module instructions. |
trace_function
trace_function(name: str, args_json: str = '[]', kwargs_json: str = '{}', max_events: int = 40) -> strCall a live Python function once and show a bounded execution trace.
The function runs once, so its state changes and external effects remain. This tool accepts synchronous Python functions and methods. The trace records events in that function’s code and restores the previous tracer.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str | required | Live synchronous Python function or method to call once. |
args_json |
str | '[]' |
JSON array of positional arguments. |
kwargs_json |
str | '{}' |
JSON object of keyword arguments. |
max_events |
int | 40 |
Maximum trace events to record, at most 100. |
| returns | str | Bounded trace and outcome after one call. |