nbinlineai.tools
Saved-notebook readers and fastcore-backed file tools use the kernel filesystem. Live cell tools are dispatched by the JupyterLab extension; their Python stubs are intentionally not callable directly.
search_kernel_names
search_kernel_names(query: str, limit: int = 20) -> strFind live Python kernel names containing a literal query, with types only.
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
str | required | Literal fragment in a live kernel name. |
limit |
int | 20 |
Maximum names, from 1 through 50. |
| returns | str | Matching names and types, with no value reprs. |
list_notebooks
list_notebooks(path: str = '.', limit: int = 30) -> strList saved .ipynb paths, skipping hidden and environment directories.
| Parameter | Type | Default | Description |
|---|---|---|---|
path |
str | '.' |
Directory relative to kernel cwd, or absolute. |
limit |
int | 30 |
Maximum paths, from 1 through 100. |
| returns | str | Saved notebook paths, not content. |
find_notebook_cells
find_notebook_cells(path: str, query: str, limit: int = 10) -> strFind saved notebook cells by case-insensitive literal source text.
| Parameter | Type | Default | Description |
|---|---|---|---|
path |
str | required | Saved .ipynb path relative to kernel cwd, or absolute. |
query |
str | required | Case-insensitive literal source fragment. |
limit |
int | 10 |
Maximum matching cells, from 1 through 50. |
| returns | str | Matching cell references and short source snippets. |
read_notebook_cell
read_notebook_cell(path: str, cell_id: str, start_line: int = 1, end_line: int = 40) -> strRead numbered saved cell source by ID or zero-based index:N fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
path |
str | required | Saved .ipynb path relative to kernel cwd, or absolute. |
cell_id |
str | required | Exact ID, or index:N for a zero-based fallback. |
start_line |
int | 1 |
First one-based source line, inclusive. |
end_line |
int | 40 |
Last one-based source line, inclusive. |
| returns | str | Numbered saved source excerpt. |
inspect_python
inspect_python(name: str, section: str = 'help') -> strInspect a live Python name’s help, signature, or available source.
| Parameter | Type | Default | Description |
|---|---|---|---|
name |
str | required | Explicit public name in the live kernel or builtins. |
section |
str | 'help' |
help, signature, or source. |
| returns | str | Bounded documentation, signature, or source excerpt. |
read_url
read_url(url: str) -> strRead a public web page as bounded, sanitized Markdown with its source URL.
| Parameter | Type | Default | Description |
|---|---|---|---|
url |
str | required | Public HTTP(S) documentation page. |
| returns | str | Short source-attributed Markdown excerpt. |
list_cells
list_cells(start: int = 0, limit: int = 20) -> strList live notebook cells, including unsaved edits, by ID and position.
| Parameter | Type | Default | Description |
|---|---|---|---|
start |
int | 0 |
First zero-based live notebook cell. |
limit |
int | 20 |
Maximum cells to summarize. |
| returns | str | Live notebook cell IDs, types, and brief source previews. |
read_cell
read_cell(cell_id: str, start_line: int = 1, end_line: int = 40) -> strRead live notebook cell source, including unsaved edits, by cell ID.
| Parameter | Type | Default | Description |
|---|---|---|---|
cell_id |
str | required | Live cell ID returned by list_cells. |
start_line |
int | 1 |
First one-based source line, inclusive. |
end_line |
int | 40 |
Last one-based source line, inclusive. |
| returns | str | Bounded numbered live cell source excerpt. |
insert_markdown
insert_markdown(content: str, after_cell_id: str = '') -> strInsert a Markdown note into the current live notebook after a cell.
| Parameter | Type | Default | Description |
|---|---|---|---|
content |
str | required | Markdown source to insert as a new notebook cell. |
after_cell_id |
str | '' |
Optional live cell ID to insert after. |
| returns | str | Confirmation of the requested notebook insertion. |
insert_code
insert_code(content: str, after_cell_id: str = '') -> strInsert an unexecuted code cell below the AI answer, or after a chosen cell.
| Parameter | Type | Default | Description |
|---|---|---|---|
content |
str | required | Python source to insert as a new unexecuted code cell. |
after_cell_id |
str | '' |
Optional live cell ID to insert after. |
| returns | str | Confirmation only after the browser inserts the cell. |
url_to_note
url_to_note(url: str, after_cell_id: str = '') -> strFetch a public page and insert its bounded Markdown as a notebook note.
| Parameter | Type | Default | Description |
|---|---|---|---|
url |
str | required | Public HTTP(S) page to summarize as source-attributed Markdown. |
after_cell_id |
str | '' |
Optional live cell ID to insert after. |
| returns | str | Confirmation of the requested notebook insertion. |
tool_catalog
tool_catalog(group: str = '') -> strList available tool groups and names without enabling any functions.
| Parameter | Type | Default | Description |
|---|---|---|---|
group |
str | '' |
Optional group name, or empty for every group. |
| returns | str | A setup reference without enabled tool declarations. |
tools_markdown
tools_markdown(names: list[str] | None = None, custom: Mapping[str, Callable[..., Any]] | None = None, group: str = 'starter') -> strPrint chosen built-in/custom references; this does not register a tool.
| Parameter | Type | Default | Description |
|---|---|---|---|
names |
list[str] | None | None |
Explicit names, or the selected group’s tools. |
custom |
Mapping[str, Callable[…, Any]] | None | None |
Explicit custom alias-to-callable map. |
group |
str | 'starter' |
Tool group used when names is omitted. |
| returns | str | Markdown with one removable reference per tool. |
insert_tools
insert_tools(names: list[str] | None = None, custom: Mapping[str, Callable[..., Any]] | None = None, group: str = 'starter') -> InsertToolsReceiptRequest a Markdown tool-reference cell immediately below this code cell.
The nbinlineai JupyterLab extension inserts into the live notebook model. The returned receipt starts as requested and later says inserted or error; save the notebook after the new cell appears. No model or API key is used.
| Parameter | Type | Default | Description |
|---|---|---|---|
names |
list[str] | None | None |
Explicit names, or the selected group’s tools. |
custom |
Mapping[str, Callable[…, Any]] | None | None |
Explicit custom aliases. |
group |
str | 'starter' |
Tool group used when names is omitted. |
| returns | InsertToolsReceipt | Asynchronous status of the new Markdown cell. |
insert_tool_catalog
insert_tool_catalog(group: str = 'starter') -> InsertToolsReceiptInsert a catalog group’s editable & references below this code cell.
Import the group’s functions into the notebook kernel first. The default starter group offers 19 tools; tool_catalog() lists all available groups. Inspect the returned receipt in a later code cell and save the notebook. Use insert_tools(names=[…]) for individual tools or custom aliases.
| Parameter | Type | Default | Description |
|---|---|---|---|
group |
str | 'starter' |
Catalog group to declare; tool_catalog() lists choices. |
| returns | InsertToolsReceipt | Asynchronous status of the new Markdown cell. |