Tool catalog

Tool catalog

Use this catalog to choose a tool, see what it does, and open the linked notebook at the exact demonstration. Each model-tool row has an ordinary Python example or JupyterLab example, plus an AI tool call. The rendered notebook also offers its .ipynb source for opening in JupyterLab. Related tools share notebooks where their calls form one workflow. The four setup helpers have ordinary examples only.

The generated Tool API reference shows typed signatures and descriptions from source comments and docstrings. This catalog gives each tool a task and linked notebook examples.

To give a tool to an AI question, import it into that notebook’s Python kernel and write its &`name` declaration in the question or an ordinary Markdown cell above it. Importing a function alone does not offer it to the model. A direct Python example calls the function yourself; an AI example asks the model to call the declared function. Live-cell editing tools have no direct Python call, so their ordinary examples show the equivalent JupyterLab editor action.

After installing an update with frontend changes, restart JupyterLab, reload the browser, then restart the selected Python kernel and rerun imports. See setup and development.

Choose and declare tools

Run this ordinary Python cell in JupyterLab to insert the code catalog group immediately below it:

from nbinlineai.tools import *
catalog_receipt = insert_tool_catalog(group="code")

The new cell is editable Markdown with one &`tool_name` declaration per tool. Delete any lines you do not want, then save the notebook. Importing the toolbox makes its functions available in the kernel; only enabled declarations offer them to later AI questions. In a later code cell, inspect catalog_receipt.status, catalog_receipt.cell_id, and catalog_receipt.error. No model connection is needed to insert the note. The helper needs the nbinlineai frontend and ipykernel 6.18 or newer.

insert_tool_catalog(group="starter") inserts all references from one catalog group (Setup helper example, § Optional: insert a tool catalog group, cell live-insert-catalog-call). With no argument it uses the 19-tool starter group, rather than enabling the entire catalog. Select a group such as "code" (nine tools), "notebook", or "web". Groups may overlap; enabled declarations above a question and its live variable references share the 20-name limit. Remove unwanted lines or turn off a note’s Tools checkbox before accumulating more groups.

tool_catalog(group="") lists group names and member names without & declarations (Setup helper example, § Tool catalog: saved files and source, cell catalog-setup-tool_catalog). The available groups are starter, files, code, inspect, notebook, saved_notebooks, web, execution, browser_media, browser_outputs, camera, screen, browser_playback, browser_transforms, and browser_attachment.

For individual tools or custom aliases, use insert_tools(names=None, custom=None, group="starter") (Setup helper example, § Optional: add a declaration from Python, cell live-insert-tools-optional). It uses the same insertion mechanism, defaults to the starter group, and gives an explicit names list precedence over the group.

from nbinlineai.tools import insert_tools, search_files, source_doc
receipt = insert_tools(["search_files", "source_doc"])

Without the frontend, tools_markdown(names=None, custom=None, group="starter") returns references to paste into a Markdown note (Setup helper example, § Tool catalog: live notebook cells, cell catalog-setup-tools_markdown). It defaults to the same starter group. Printed references never enable tools, even though their text can now enter context as code output. Put declarations in an ordinary Markdown cell or an AI question.

print(tool_catalog())                 # List groups without enabling tools.
print(tools_markdown(group="code"))   # Copy these references into Markdown.

An eligible ordinary Markdown cell or earlier AI question can declare tools for later questions. AI answers, code cells, raw cells, output, and cells below the question do not declare them. The Tools checkbox on each declaration cell controls whether its references count; it is independent of the Context text checkbox. The server discovers enabled references before optional context trimming, and Current question only retains enabled tool choices.

Duplicate names count once. A missing imported name fails before the provider call. The current question’s $`name` reads a live kernel value; earlier $ references stay literal. A request permits 20 distinct tool and variable names combined.

The 20-name limit is nbinlineai’s own guardrail, not a provider-imposed tool limit. Schemas, instructions, and executed tool results use the 64,000-character host-submitted estimate before optional notebook text. ChatGPT’s internal inference calls are outside that estimate.

Maximum tool steps counts host-executed groups of declared notebook-tool calls, with several calls possible in one group. The same tool declarations work with ChatGPT and API connections. Keep answer skips a completed tool run; cancellation does not undo completed effects.

For example, the saved-files notebook’s direct search runs search_files() in Python and shows its result. Its AI question declares &`search_files` and asks the model to search. Run the notebook’s setup first, then follow the direct cell or the AI question. An AI question needs a configured ChatGPT or API connection; direct Python examples do not.

Understand browser receipts

Browser and media tools do work in your open JupyterLab tab. A Python call returns a mutable BrowserReceipt promptly, often before the browser has finished. Run the call cell, complete any visible permission, picker, Play, Copy, Paste, or Attach image step, and then inspect the same receipt in a later cell. The first printed value is only a snapshot; it will not update on the printed line. Do not make the requesting Python cell wait for the browser, or use Run All for dependent media cells. The browser media receipts guide has a complete save-and-inspect example.

Receipt field Meaning
operation_id The operation’s ID, available after registration. Use this exact ID for a later status lookup or cancellation.
status waiting_for_user needs a visible action. running, paused, and saving are unfinished. completed means the requested operation finished; failed, cancelled, and expired explain why it did not.
result The completed Python value or small control result, such as a source or preview ID. A still image can be a Pillow image; a recording is an encoded clip, not a video image.
media A managed media descriptor with an ID or an exact saved path and SHA-256. A saved file is confirmed only after the save completes.
error The reason for a failed, cancelled, or expired operation. Read it before retrying.

For an AI tool call, the answer contains a fixed status snapshot, not a changing Python receipt. If it reports waiting_for_user or running, complete the visible step, then ask a later question to call operation_status with that operation’s ID. The follow-up tells you whether it finished and supplies the resulting source ID or saved reference. The operation_status() Python helper also returns a receipt. Inspect that helper receipt later, and read its result["status"] for the original operation’s state. Its own status == "completed" only means the lookup finished.

save_to=None retains a bounded result in notebook-owned memory; save_to="auto" requests a new local file, and an explicit save_to path requests an unused server-root-relative destination. Record a saved file’s path with its SHA-256 when passing it to another media tool. release_media frees managed temporary bytes and dependent previews; it does not delete an already saved file or a Python image or clip you hold. Closing the notebook tab or replacing its kernel can expire live operations. Browser permissions, codecs, and visible controls vary by device; inspect the completed receipt rather than treating the request as success.

Function index

Every row below is an import from nbinlineai.tools. Signatures show callable parameters and defaults. The linked function name opens its Tool API reference entry for parameter and return descriptions. Browser-media functions return a mutable receipt promptly; inspect its result in a later code cell. Model calls use named arguments. tools_markdown, insert_tools, insert_tool_catalog, and tool_catalog are setup helpers rather than model tools.

Each row gives a short task and links to two demonstrations. Python example shows a direct callable tool, or JupyterLab example shows an ordinary editor action. AI tool call shows a model question.

A linked AI question needs the tool imported and its &`name` reference enabled in that question or an earlier Markdown note. Offering a tool does not force a call. The four setup helpers have ordinary examples only. See the complete declaration-to-question example.

The short tasks in the table are adaptable; follow the linked notebook for concrete inputs and the prior cells each task needs. Each Application is a possible use of the current function, not a claim that the linked disposable demonstration performs that whole workflow. Compositions require the listed functions, the user actions they request, and any needed model or notebook work. create_file needs an existing parent folder and a new filename. A task that uses an earlier search, outline, or listing needs that result in the question’s selected context, or its reading tool declared too. Copy actual cell IDs, section addresses, and digests from tool results.

Source-checked cell edits need the complete current cell source; read any remaining lines before editing a long cell. Write and execution tools perform the requested action when called.

Browser-media foundation

These calls need an open JupyterLab notebook and its running Python kernel. A direct Python call requests work and returns a BrowserReceipt promptly; run its inspection cell later to see status, result, media, or error. Do not wait in the requesting cell. browser_capabilities does not ask for device permission.

The example notebook creates a disposable 2×2 image and computes its real SHA-256, then uses an exact {path, sha256} reference; save_media writes a new file under the notebook’s Jupyter server root. operation_status takes a one-shot snapshot and does not wait for the target. Cancelling an already completed save keeps its file. release_media frees managed temporary bytes while saved files and Python copies remain. Direct-call cells need no AI connection; the linked AI questions use the selected connection.

Function Purpose
browser_capabilities() Report browser availability, secure-context state, observed permissions and limits without prompting for access.
Example: “In JupyterLab, run capabilities = browser_capabilities(), then inspect capabilities.status and capabilities.result in a later cell.”
Application: Before a classroom microscopy exercise, check whether participants’ browsers can capture a camera still; choose an existing image if capture is unavailable. Python example · AI tool call.
save_media(media: dict, save_to: str = 'auto') Save owned temporary media or an exact saved-file reference to a new server-root-relative file; existing files are not overwritten.
Example: “Use the fixture’s discovered {path, sha256} descriptor as source_ref in saved = save_media(source_ref, save_to='auto'); inspect saved.media later.”
Application: Keep an exact saved specimen or whiteboard still for a lab report, where Pillow can later crop or measure it after the temporary browser media expires. Python example · AI tool call.
operation_status(operation_id: str) Return a current, bounded snapshot of an owned operation without waiting or extending media expiry.
Example: “After the save receipt finishes, run lookup = operation_status(saved.operation_id) and inspect lookup.result in the next cell.”
Application: Check whether a chosen field photo has finished importing before citing its ID in a methods note or preparing it for a visual question. Python example · AI tool call.
cancel_operation(operation_id: str) Request cancellation of an unfinished owned operation; a finished save stays saved.
Example: “Run cancelled = cancel_operation(saved.operation_id) against the completed disposable save to see that its file remains; use an unfinished operation ID when you need to stop pending work.”
Application: Stop a pending screen-share request when a workshop changes to a prepared slide, so the subsequent lesson uses only the chosen source. Python example · AI tool call.
release_media(media_id: str) Release managed in-memory media bytes and dependent previews without deleting saved files or delivered Python objects.
Example: “After inspecting the saved descriptor, run released = release_media(saved.media['media_id']) and check its receipt and the saved file in the next cell.”
Application: After saving an imported high-resolution image for analysis, free its temporary browser bytes while the report’s saved copy remains available. Python example · AI tool call.

Camera, microphone, recording and display

These direct browser calls need an open JupyterLab notebook. A device listing may initially have blank labels; starting a camera or microphone asks for permission. Display sharing opens a separate browser chooser and needs a user click. Use IDs from completed source receipts, and inspect each recording’s original receipt after it stops to get the encoded clip. The capture notebook shows the call order, permission steps, later status checks, and source cleanup. See also the family guide.

Function Purpose
list_media_sources(kind: 'str' = 'all', cursor: 'str' = '', limit: 'int' = 10) List camera and microphone devices without asking for permission.
Example: “Run devices = list_media_sources(); inspect its device page in a later cell, independently of any camera request.”
Application: Choose a document camera for recording an apparatus, or find the intended microphone before capturing oral field observations. Python example · AI tool call.
start_camera(audio: 'bool' = False, device_id: 'str' = '', facing: 'str' = 'user') Ask permission and open a notebook camera preview; audio=True also requests a microphone track.
Example: “Run camera = start_camera(audio=False), allow the camera, then inspect camera.status and its source ID in a later cell.”
Application: Frame a handwritten derivation or physical setup before making a still for a lab log; optionally include sound in a later recording. Python example · AI tool call.
start_microphone(device_id: 'str' = '') Ask permission and open a microphone source with a local level meter.
Example: “Run microphone = start_microphone(), allow the microphone, then inspect its source ID in a later cell.”
Application: Open the intended microphone and check levels before recording a short oral observation for field notes. Python example · AI tool call.
capture_camera(source_id: 'str' = '', save_to: 'str | None' = None, max_size: 'int' = 1280) Take one still from an already open camera, optionally saving it locally.
Example: “Use the completed camera receipt’s ID in still = capture_camera(camera_id, save_to=None); inspect the image and media descriptor later.”
Application: Photograph a circuit layout to compare with its schematic, or collect a whiteboard equation that you can explicitly attach to a later image question. Python example · AI tool call.
stop_source(source_id: 'str') Stop an owned source and finalize its recording, if any.
Example: “After the microphone recording finishes, run stopped_microphone = stop_source(microphone_id); inspect stopped_microphone.status in a later cell.”
Application: Close the camera after collecting the apparatus still, or finish a microphone source so the field recording can be reviewed. Python example · AI tool call.
start_recording(source_id: 'str', save_to: 'str | None' = 'auto', duration: 'int' = 30) Start one bounded recording from the source’s declared tracks.
Example: “With the notebook’s live microphone source, run recording = start_recording(microphone_id, save_to=None, duration=60); inspect its original receipt after stopping.”
Application: Record a spoken observation from an open microphone or a short demonstration from an already shared display for later review. Python example · AI tool call.
pause_recording(operation_id: 'str') Pause an active recording without resetting its wall-clock bound.
Example: “Run paused = pause_recording(recording.operation_id) while the notebook’s microphone recording is active; inspect the pause receipt later.”
Application: Pause an interview note while the speaker verifies a measurement, then continue the same bounded recording. Python example · AI tool call.
resume_recording(operation_id: 'str') Resume a paused recording.
Example: “After the pause completes, run resumed = resume_recording(recording.operation_id) and inspect its status later.”
Application: Continue the paused field observation once the speaker has checked the value, preserving one reviewable clip. Python example · AI tool call.
stop_recording(operation_id: 'str') Flush and finish a recording at its selected destination.
Example: “Run stopped_recording = stop_recording(recording.operation_id), then inspect both stopped_recording and the original recording receipt for the final clip.”
Application: Finish a lab narration early so its encoded clip can be played back and summarized in a separate writing step. Python example · AI tool call.
record_camera(save_to: 'str | None' = 'auto', duration: 'int' = 30, audio: 'bool' = False, facing: 'str' = 'user') Ask permission, record, and close a camera owned by this one operation.
Example: “Run camera_clip = record_camera(save_to=None, duration=5, audio=False), allow the camera, and inspect the completed clip receipt later.”
Application: Capture one short pendulum trial or hand demonstration as a video artifact to review beside numerical measurements. Python example · AI tool call.
record_microphone(save_to: 'str | None' = 'auto', duration: 'int' = 30, device_id: 'str' = '') Ask permission, record, and close a microphone owned by this one operation.
Example: “Run microphone_clip = record_microphone(save_to=None, duration=7), make a short sound, and inspect its encoded clip later.”
Application: Record a pronunciation sample for a language lesson or a spoken field observation for later playback and separate transcription. Python example · AI tool call.
read_audio_levels(source_id: 'str', window_ms: 'int' = 250) Measure short RMS and peak levels without returning sound or a transcription.
Example: “While the microphone source is active, play a short sound and run levels = read_audio_levels(microphone_id); inspect RMS and peak later.”
Application: Check for silence or clipping before recording a participant’s explanation, avoiding an unusable audio note. Python example · AI tool call.
setup_share() Show this notebook’s local Share and Stop controls without capturing.
Example: “Run sharing_controls = setup_share() to place the Share control in the notebook, then inspect the receipt; sharing still needs your click.”
Application: Put the local Share control beside a workshop’s chart-comparison instructions so participants can choose the intended window when ready. Python example · AI tool call.
start_share(audio: 'bool' = False) Offer a user-clicked display chooser for this notebook.
Example: “Run sharing = start_share(audio=False), click the visible Share control and choose a window, then inspect its source ID.”
Application: Let a participant select the spreadsheet chart or slide they want to bring into a notebook-based explanation. Python example · AI tool call.
capture_screen(timeout: 'int' = 15, source_id: 'str' = '', save_to: 'str | None' = None, max_size: 'int' = 1280) Capture one frame from an already shared display source.
Example: “After the notebook setup and preceding discovery cells, run screenshot = capture_screen(source_id=screen_id, save_to=None); inspect screenshot.status in a later cell.”
Application: Save a frame of the chosen chart for a results comparison, or capture a visible error dialog to document a debugging session. Python example · AI tool call.
capture_tool(timeout: 'int' = 15, source_id: 'str' = '', save_to: 'str | None' = None, max_size: 'int' = 1280) Capture-screen alias; model text receives a descriptor, not image pixels.
Example: “After the notebook setup and preceding discovery cells, run alias_frame = capture_tool(source_id=screen_id, save_to=None); inspect alias_frame.status in a later cell.”
Application: Get the same shared-window frame descriptor for a troubleshooting note; explicitly attach the still later if the AI question needs pixels. Python example · AI tool call.
stop_share(source_id: 'str' = '') Stop a selected or unique shared display source.
Example: “After the notebook setup and preceding discovery cells, run stopped_share = stop_share(screen_id); inspect stopped_share.status in a later cell.”
Application: End access to the chosen presentation window once its frame has been captured for the class handout. Python example · AI tool call.

Live output and canvas

These direct browser calls read the originating open notebook, including unsaved outputs and current editor selection. Run the output notebook fixture cells first. Copy the cell_id, output_id, and revision from a completed list_outputs result; copy a canvas reference from list_canvases. Those values protect against reading a changed output. The notebook inspects receipts in later cells and stops its canvas source after recording. See the family guide.

Function Purpose
read_notebook_view() Describe the originating notebook’s active, selected and visible cells.
Example: “After the notebook setup and preceding discovery cells, run view = read_notebook_view(); inspect view.status in a later cell.”
Application: Find the selected result cell before placing a teaching explanation beside it, or identify the visible cells for a review note. Python example · AI tool call.
read_selection(max_chars: 'int' = 2000) Read selected text only from the focused editor in this notebook.
Example: “Run the selected-line call, select the adjacent sample line during its five-second preparation interval, then inspect selected_text.status and its actual text later.”
Application: Use the exact formula a learner selected in a notebook editor as the subject of an explanation, or quote a selected code comment in a debugging note. Python example · AI tool call.
list_outputs(cell_id: 'str', cursor: 'str' = '', limit: 'int' = 10) List existing outputs of a live code cell without materializing renderers.
Example: “After the notebook setup, run canvas_listing = list_outputs('output-canvas'); inspect canvas_listing.status in a later cell.”
Application: Locate an existing plot’s output ID and revision so you can export the right figure for a report without rerunning the calculation. Python example · AI tool call.
read_output(cell_id: 'str', output_id: 'str', revision: 'int', mime: 'str' = 'text/plain', start: 'int' = 0, max_chars: 'int' = 2000) Read bounded text or structured data from one unchanged output.
Example: “After the notebook setup and preceding discovery cells, run text_read = read_output(text_ref['cell_id'], text_ref['output_id'], text_ref['revision'], max_chars=120) if text_ref else None; inspect text_read.status in a later cell.”
Application: Quote bounded JSON metrics in a results summary, or inspect a saved traceback excerpt while preparing a bug report. Python example · AI tool call.
export_output(cell_id: 'str', output_id: 'str', revision: 'int', save_to: 'str | None' = None, mime: 'str' = '') Export an existing PNG/JPEG, original SVG, or supported plain-text, Markdown, JSON, or data-resource MIME. Raster returns a Pillow image; SVG returns original markup; data returns UTF-8 bytes.
Example: “After the notebook setup and preceding discovery cells, run raster_export = export_output(raster_ref['cell_id'], raster_ref['output_id'], raster_ref['revision']) if raster_ref else None; inspect raster_export.status in a later cell. The data-export-call cell in the same notebook exports existing data-resource JSON as bytes and saves an exact .json copy.”
Application: Export a completed PNG plot for a report, or save supported JSON output for a reproducible analysis package. Python example · AI tool call.
list_canvases(cell_id: 'str', output_id: 'str', revision: 'int', cursor: 'str' = '', limit: 'int' = 10) List supported live canvases in this output’s materialized renderer.
Example: “After the notebook setup and preceding discovery cells, run canvases = list_canvases(canvas_output_ref['cell_id'], canvas_output_ref['output_id'], canvas_output_ref['revision']) if canvas_output_ref else None; inspect canvases.status in a later cell.”
Application: Find the materialized canvas in a selected output before capturing a simulation frame for a lesson. Python example · AI tool call.
capture_canvas(canvas: 'dict[str, Any]', save_to: 'str | None' = None, max_size: 'int' = 1280) Capture one origin-clean bound canvas as an in-memory PIL image.
Example: “After the notebook setup and preceding discovery cells, run canvas_still = capture_canvas(canvas_ref) if canvas_ref else None; inspect canvas_still.status in a later cell.”
Application: Capture the current state of a live simulation to compare with a predicted diagram in a lab discussion. Python example · AI tool call.
export_canvas(canvas: 'dict[str, Any]', save_to: 'str | None' = 'auto', max_size: 'int' = 1280) Save a still from one bound canvas, or retain it in memory with None.
Example: “After the notebook setup and preceding discovery cells, run canvas_saved = export_canvas(canvas_ref) if canvas_ref else None; inspect canvas_saved.status in a later cell.”
Application: Save a still from a canvas animation at the moment of interest for a report figure. Python example · AI tool call.
start_canvas(canvas: 'dict[str, Any]', frame_rate: 'int' = 30) Open a video-only canvas source for the shared recorder.
Example: “After the notebook setup and preceding discovery cells, run canvas_source = start_canvas(canvas_ref, frame_rate=12) if canvas_ref else None; inspect canvas_source.status in a later cell.”
Application: Open a changing canvas as a video-only source, then use start_recording and stop_source to make a clip students can replay while comparing model behavior over time. Python example · AI tool call.
capture_notebook_region(cell_ids: 'list[str]', save_to: 'str | None' = None, max_size: 'int' = 1280) Capture supported visible output surfaces from the originating notebook.
Example: “After the notebook setup and preceding discovery cells, run region = capture_notebook_region(['region-raster']); inspect region.status in a later cell.”
Application: Capture the visible result cells together for a review slide comparing two model runs; only supported output regions are included. Python example · AI tool call.

Import, playback, and clipboard

The playback guide explains exact memory/file references, decoder limits, autoplay and clipboard activation. The notebook walkthrough shows each request with a later receipt-inspection cell. Run dependent call cells after the prior receipt has completed. choose_file and paste_content require visible user action; supported audio and video codecs depend on the browser.

Function Purpose
choose_file(accept: 'str' = '', multiple: 'bool' = False, save_to: 'str | None' = None) Show a standard file picker and import at most 12 selected files into owned media memory; selection alone does not save a file.
Example: “Run selected = choose_file(accept='image/png'), select the disposable PNG, then inspect selected.media in the next cell.”
Application: Let a reader select a local microscope image for inspection or an audio sample for playback without first moving it into the server folder. Python example · AI tool call.
open_media(media: 'dict') Verify an exact owned memory ID or saved {path, sha256} reference and decode an image or browser-supported clip into a preview; returns a preview_id.
Example: “Run opened = open_media(tone_ref) for the generated WAV’s exact file descriptor and inspect opened.result['preview_id'] later.”
Application: Preview an exact saved waveform before choosing a teaching excerpt, or inspect an owned image before deciding whether to attach it. Python example · AI tool call.
play_media(preview_id: 'str') Play an owned audio/video preview, or wait for its visible Play button when autoplay requires a click.
Example: “After opened completes, run playing = play_media(opened.result['preview_id']); click Play if requested, then inspect playing.status.”
Application: Hear whether a recorded pronunciation is usable or replay a demonstration clip before writing its accompanying notes. Python example · AI tool call.
pause_media(preview_id: 'str') Pause that preview without closing it or deleting its source.
Example: “Run paused = pause_media(opened.result['preview_id']) after playback starts, then inspect its later status.”
Application: Stop playback at a key moment in a lecture clip so a learner can discuss the displayed result. Python example · AI tool call.
seek_media(preview_id: 'str', seconds: 'float') Seek within a decoded clip’s actual duration; the returned position may vary slightly by codec.
Example: “After opening a playable clip, run seeked = seek_media(opened.result['preview_id'], 0.5) and inspect its reported position in a later cell.”
Application: Jump near a recorded event time in an experiment video before selecting frames for a motion comparison. Python example · AI tool call.
set_media_volume(preview_id: 'str', level: 'float') Set an audio/video preview volume from 0 to 1 when the browser permits programmatic volume.
Example: “Run volume = set_media_volume(opened.result['preview_id'], 0.25) and inspect whether the browser accepted the level.”
Application: Lower a clip for classroom review while retaining the original recording for a separate analysis. Python example · AI tool call.
close_media(preview_id: 'str') Close an owned preview and release its decoder/URL while keeping the input file or memory result.
Example: “Run closed = close_media(opened.result['preview_id']); the next cell checks the receipt and that the disposable WAV still exists.”
Application: Close the review preview after selecting a useful audio excerpt, while keeping the source clip for the lesson. Python example · AI tool call.
copy_text(text: 'str') Show bounded text with a visible Copy control and manual fallback; no background clipboard write occurs.
Example: “Run copied = copy_text('nbinlineai disposable playback sample'), click Copy, then inspect the receipt later.”
Application: Offer a short generated SQL query or citation through a deliberate Copy click so a reader can paste it into their own work. Python example · AI tool call.
paste_content(accept: 'str' = 'text,image', save_to: 'str | None' = None) Show an explicit paste target for bounded plain text or one raster image; an image saves only when save_to is requested.
Example: “Run pasted = paste_content(accept='text'), paste the disposable copied text into the visible box, then inspect pasted.result.”
Application: Bring a copied chart screenshot or short error message into the notebook for a reviewed analysis or bug report. Python example · AI tool call.

Media transformations

The transform guide explains actual video frame times, immutable sources, PNG pixel bounds, and saved-only provenance sidecars. The notebook walkthrough gives each call a later receipt inspection. Frame extraction needs a clip that the current browser can decode and timestamp; crop and annotation need an exact image reference.

Function Purpose
extract_frames(media: 'dict', timestamps: 'list[float]', save_to: 'str | None' = None) Decode at most 12 explicit positions from an owned video, reporting actual decoded times and later PIL images; optional save writes one new batch directory with provenance sidecars.
Example: “Run frames = extract_frames(video_ref, [1.5, 5.0]) on the verified notebook-tab recording, then inspect the actual frame times and Pillow images in a later cell.”
Application: Select two moments of a motion recording for comparison; explicitly attach a decoded frame later if a visual AI question needs it. Python example · AI tool call.
crop_image(media: 'dict', x: 'int', y: 'int', width: 'int', height: 'int', save_to: 'str | None' = None) Make a new bounded PNG crop of an exact image, leaving the source unchanged.
Example: “Run crop = crop_image(image_ref, 4, 4, 16, 16, save_to=f'{work.name}/crop.png') on the disposable PNG; inspect its new descriptor and JSON sidecar later.”
Application: Isolate the plotted outlier or the relevant equation from a larger still for a focused report figure. Python example · AI tool call.
annotate_image(media: 'dict', annotations: 'list[dict]', save_to: 'str | None' = None) Draw up to 50 bounded text, arrows, rectangles, or opaque redactions on a new PNG, without changing the original.
Example: “Run annotated = annotate_image(image_ref, shapes), then inspect the resulting PIL image’s black pixels in the later cell.”
Application: Mark a microscopy feature or chart threshold on a derivative for a report, or obscure an identifier before sharing the annotated copy. Python example · AI tool call.

Attach an image to one AI question

The attachment guide explains explicit confirmation, exact image hashes, supported models, and removal. The disposable notebook creates a tiny PNG and its actual SHA-256, calls the tool, then inspects the receipt in a later cell. The visible Attach image control confirms the target question without running it or calling a provider; running that question later may use your configured provider.

Function Purpose
attach_media(media: dict, question_cell_id: str, detail: str = 'auto') Propose one exact owned still image for one identified AI question; a visible confirmation attaches its reference and hash to that question without running it. PNG, JPEG, WebP, and single-frame GIF are supported; model and detail choices must be compatible.
Example: “Run attached = attach_media(source_ref, 'attachment-question', detail='auto') with the notebook’s disposable PNG reference, click Attach image, and inspect attached.status and attached.result in the next code cell.”
Application: After a user confirms Attach image, ask one identified question about a chart trend, diagram, specimen, or extracted frame, then review the answer before using it in a report. Python example · AI tool call.

Live Python and registered skills

In the inspection walkthrough, a disposable score list begins 2, 4, 6, search_value finds two ready matches in a log, and trace_function calls catalog_double(3) once and returns 6. The AI questions demonstrate those same lookups after the direct Python calls. Documentation and skill discovery inspect public text; tracing is different because it actually invokes the live function.

Function Purpose
search_kernel_names(query: str, limit: int = 20) Find live Python kernel names containing a literal query, with types only.
Example: “Find the live name containing catalog_scores and report its type.”
Application: Find the live coefficients variable in a crowded analysis session so you can inspect the right model before explaining its result. Python example · AI tool call.
inspect_python(name: str, section: str = 'help') Inspect a live Python name’s help, signature, or available source.
Example: “Show the signature of the live catalog_double function.”
Application: Read a live helper’s signature or source before documenting how the notebook computed its study metric. Python example · AI tool call.
show_doc(name: str, module: str = '') Show docs for a live name, or import module and inspect its public name.
Example: “Explain Path.read_text from pathlib without calling it.”
Application: Check an installed library function’s parameters while writing a reproducible methods note or teaching example. Python example · AI tool call.
api_names(name: str, module: str = '', query: str = '', limit: int = 30) List public members of a live object or explicitly imported module.
Example: “List public statistics members matching mean.”
Application: Find the public estimator method needed for a model-evaluation notebook, then inspect that method before use. Python example · AI tool call.
search_docs(name: str, query: str, module: str = '', depth: int = 1, limit: int = 20) Search public names and direct docstrings in a bounded object tree.
Example: “Find sample in the public documentation of statistics.”
Application: Locate a sampling parameter in public object documentation while designing a repeatable analysis exercise. Python example · AI tool call.
inspect_value(name: str, start: int = 0, limit: int = 20) Show a bounded slice of a live built-in container or text value.
Example: “Show the first three values in catalog_scores.”
Application: Review a bounded slice of validation scores to decide which outliers warrant a closer look in a results report. Python example · AI tool call.
search_value(name: str, query: str, limit: int = 20) Search bounded visible values in live text or a built-in container.
Example: “Find ready in the live catalog_log.”
Application: Find an error marker in live log messages or a category in a live container while diagnosing an unexpected result. Python example · AI tool call.
source_files(name: str, module: str = '', limit: int = 30) Find nearby Python source files for a live symbol or imported module.
Example: “Find source files near the installed pathlib.Path object.”
Application: Find an installed class’s source location so you can investigate the behavior behind a notebook result. Python example · AI tool call.
list_skills(query: str = '', limit: int = 30) List installed pyskill entry points and static module descriptions.
Example: “Find the disposable nbinlineai_demo skill entry point.”
Application: Discover an already installed local workflow skill before deciding whether its instructions fit a data-cleaning task. Python example · AI tool call.
read_skill(module: str) Read a registered pyskill’s static module instructions without importing it.
Example: “Read the two static instructions in the registered nbinlineai_demo skill.”
Application: Read a registered skill’s instructions before applying its guidance to a real project workflow. Python example · AI tool call.
trace_function(name: str, args_json: str = '[]', kwargs_json: str = '{}', max_events: int = 40) Call a live Python function once and show a bounded execution trace.
Example: “Call catalog_double once with argument 3 and show its bounded trace.”
Application: Call a small live parser with a known fixture to find an unexpected branch before writing a checked fix; account for the call’s real effects. Python example · AI tool call.

Saved files and source

The fastcore walkthrough uses a disposable lesson directory. A question reads study-note.txt, changes exactly one Status: planned to Status: reviewed, and shows the resulting diff. The project walkthrough finds visits in observations.py and reads the saved Study notes → Totals section without changing files. Relative file paths are resolved from the kernel’s working directory, which may differ from the notebook folder.

Function Purpose
path_info(path: str = '.') Show the kernel working directory and a path’s resolved type and size.
Example: “Show the kernel’s current working directory and resolve demo_project.”
Application: Resolve a dataset or script path against the kernel’s working directory before assembling a reproducible project inventory. Python example · AI tool call.
list_files(path: str = '.', pattern: str = '*', recursive: bool = False, limit: int = 30) List visible file and directory paths, optionally matching a name pattern.
Example: “List up to 20 Python files under demo_project, including subfolders.”
Application: Find candidate CSV inputs for an analysis or list saved scripts to include in a research-code handoff. Python example · AI tool call.
view_file(path: str, start_line: int = 1, end_line: int = 40) Read a bounded range of one UTF-8 text file with one-based line numbers.
Example: “Read lines 1–30 of demo_project/analysis.py with line numbers.”
Application: Read numbered settings or source lines before correcting a configuration used by a shared analysis. Python example · AI tool call.
create_file(path: str, contents: str) Create a new UTF-8 text file without replacing an existing path.
Example: “Create demo_project/notes.md containing # Experiment notes on its own line.”
Application: Write a new assumptions note or small helper script beside an analysis so collaborators can review the method. Python example · AI tool call.
file_str_replace(path: str, old_str: str, new_str: str, expected_matches: int = 1) Replace an exact literal only when its occurrence count matches expectation.
Example: “In demo_project/analysis.py, replace the single occurrence of threshold = 0.5 with threshold = 0.7.”
Application: Correct a single confirmed threshold or stale input filename in a saved analysis script after reviewing its context. Python example · AI tool call.
file_insert_line(path: str, line: int, new_str: str) Insert text after a one-based line; line 0 inserts before the first line.
Example: “Insert # Inputs as a new line after line 2 of demo_project/analysis.py.”
Application: Add a missing import to a saved helper script or a comment explaining a consequential analysis setting. Python example · AI tool call.
file_replace_lines(path: str, start_line: int, end_line: int, new_content: str) Replace an explicit inclusive, one-based line range with UTF-8 text.
Example: “Replace lines 2–3 of demo_project/notes.md with the single line Status: ready.”
Application: Replace an outdated setup command in a project README or revise a bounded protocol paragraph after checking its lines. Python example · AI tool call.
search_files(query: str, path: str = '.', pattern: str = '*', regex: bool = False, limit: int = 20) Search saved project source text with bounded Python-based results and file filters.
Example: “Find normalize in Python files under demo_project; show up to ten matches.”
Application: Find every saved reference to a renamed metric before updating the analysis and its documentation. Python example · AI tool call.
source_doc(path: str, symbol: str = '') Read Python source documentation statically, without importing the file.
Example: “Explain the written signature and documentation of normalize in demo_project/analysis.py without importing it.”
Application: Read a saved parser’s signature without importing it while preparing an audit of how a dataset is transformed. Python example · AI tool call.
document_outline(path: str, start: int = 0, limit: int = 20) List headings or definitions in saved Markdown or Python, with opaque section addresses.
Example: “Show the section hierarchy of demo_project/README.md, including the addresses for reading sections.”
Application: Map a long protocol’s sections or a source file’s definitions to plan a focused reproducibility review. Python example · AI tool call.
read_document_section(path: str, section: str = '') Read saved Markdown or Python, or one section using a copied outline address.
Example: “Read only the Installation section of demo_project/README.md using its address from the earlier outline.”
Application: Read the methods section or one Python definition selected from a fresh outline before citing it in a report. Python example · AI tool call.
file_strs_replace(path: str, old_strings: list[str], new_strings: list[str]) Replace several exact literals atomically when each old string occurs once.
Example: “In demo_project/settings.py, replace retries = 2 with retries = 3 and timeout = 5 with timeout = 10, each occurring once.”
Application: Update two related configuration values together in a saved analysis after confirming each old value is unique. Python example · AI tool call.
view_file_hashes(path: str, start_line: int = 1, end_line: int = 40) Show numbered lines and the SHA-256 digest for a saved text file.
Example: “Show lines 1–20 of demo_project/settings.py and its whole-file SHA-256 for a checked edit.”
Application: Get the exact lines and whole-file digest before a checked correction to a shared analysis setting. Python example · AI tool call.
file_replace_checked(path: str, old_str: str, new_str: str, expected_sha256: str) Replace one literal only when the whole file has the expected SHA-256.
Example: “Using the digest from the earlier file read, replace the single retries = 2 with retries = 3 in demo_project/settings.py; stop if the file changed.”
Application: Correct a reviewed parameter only if the saved file still has the expected digest, avoiding a stale change to a shared project. Python example · AI tool call.

Saved notebooks

The saved-notebook walkthrough creates a disposable lesson.ipynb. Its completed AI lookup finds cell catalog-note, reads “Three visits.”, and reports the saved # Observation heading. These tools inspect the file on disk, so save a changed notebook before expecting them to see it.

Function Purpose
list_notebooks(path: str = '.', limit: int = 30) List saved .ipynb paths, skipping hidden and environment directories.
Example: “Find the saved lesson.ipynb in the disposable directory.”
Application: Find saved experiment notebooks for a course archive or a cross-run comparison before choosing which to read. Python example · AI tool call.
find_notebook_cells(path: str, query: str, limit: int = 10) Find saved notebook cells by case-insensitive literal source text.
Example: “Find the cell containing visits in that saved notebook.”
Application: Locate the cell that recorded an instrument setting in one saved field notebook, or a model definition in a lesson. Python example · AI tool call.
read_notebook_cell(path: str, cell_id: str, start_line: int = 1, end_line: int = 40) Read numbered saved cell source by ID or zero-based index:N fallback.
Example: “Read the saved catalog-note cell found by the preceding search.”
Application: Quote the source of a saved model-definition cell in a reproducibility note, using its returned stable ID. Python example · AI tool call.
search_notebooks(query: str, path: str = '.', limit: int = 20) Search saved notebook cell source; include stable saved cell IDs.
Example: “Search the saved notebooks for visits and report matching cell IDs.”
Application: Find all saved notebooks that cite an outdated dataset filename so a project migration can be reviewed. Python example · AI tool call.
notebook_outline(path: str, start: int = 0, limit: int = 20) Summarize a saved notebook’s cells and stable IDs by index.
Example: “Report the saved notebook’s # Observation heading and cell ID.”
Application: Map a saved notebook’s headings and cell IDs before making a reading guide or comparing it with an open draft. Python example · AI tool call.

Live notebook cells

Function Purpose
list_cells(start: int = 0, limit: int = 20) List live notebook cells, including unsaved edits, by ID and position.
Example: “List the first 20 cells in this open notebook, with their IDs and source previews.”
Application: Find stable IDs for the live imports and result cells before reorganizing a working lesson or analysis. JupyterLab example · AI tool call.
read_cell(cell_id: str, start_line: int = 1, end_line: int = 40) Read live notebook cell source, including unsaved edits, by cell ID.
Example: “Read lines 1–40 of the live cell with the ID returned by the earlier cell search.”
Application: Read an unsaved calculation’s current source before explaining or proposing a checked correction. JupyterLab example · AI tool call.
find_cells(query: str, cell_type: str = '', limit: int = 20) Find live notebook cells containing text, including unsaved edits.
Example: “Find live code cells containing train_test_split, including unsaved edits.”
Application: Locate an unsaved training split or result explanation while preparing a review of the open notebook. JupyterLab example · AI tool call.
insert_markdown(content: str, after_cell_id: str = '') Insert a Markdown note into the current live notebook after a cell.
Example: “Add an ordinary Markdown note below your answer saying Check the validation split before training.”
Application: Add an interpretation beside a chart or a data-limitations note beside a draft result for readers to review. JupyterLab example · AI tool call.
insert_code(content: str, after_cell_id: str = '') Insert an unexecuted code cell below the AI answer, or after a chosen cell.
Example: “Add a code cell below your answer that plots the live list scores; leave it unexecuted for me to review.”
Application: Draft an unexecuted residual plot or validation calculation for the researcher to inspect before running. JupyterLab example · AI tool call.
replace_cell(cell_id: str, expected_source: str, new_source: str) Replace an ordinary cell only when its source still matches.
Example: “Replace the scratch cell just read with print('ready'), using its exact current source as the check.”
Application: Replace a reviewed scratch calculation in the open notebook when its full source still matches the version discussed. JupyterLab example · AI tool call.
cell_str_replace(cell_id: str, old_str: str, new_str: str, expected_matches: int = 1) Replace an exact string when its occurrence count matches.
Example: “In the live cell just found, replace the single test_size=0.2 with test_size=0.25.”
Application: Correct the one confirmed test_size value in a live training cell before rerunning and comparing results. JupyterLab example · AI tool call.
cell_insert_line(cell_id: str, line: int, content: str, expected_source: str) Insert content before a line in an unchanged ordinary cell.
Example: “In the scratch cell just read, insert # Prepare inputs before line 1, checking its full current source.”
Application: Add a comment explaining a data-cleaning choice beside the relevant unchanged code line. JupyterLab example · AI tool call.
cell_replace_lines(cell_id: str, start_line: int, end_line: int, content: str, expected_source: str) Replace inclusive source lines in an unchanged ordinary cell.
Example: “In the scratch cell just read, replace lines 2–3 with scores = [1, 2, 3], checking its full current source.”
Application: Revise the obsolete normalization block in a live analysis after checking the whole cell, then let the researcher rerun it. JupyterLab example · AI tool call.
delete_cell(cell_id: str, expected_source: str) Delete an ordinary cell only when its source still matches.
Example: “Delete the ordinary scratch cell just read, only if its full source is unchanged.”
Application: Remove a confirmed duplicate scratch cell so the teaching notebook has one clear path through the exercise. JupyterLab example · AI tool call.
move_cell(cell_id: str, after_cell_id: str) Move an ordinary cell after another cell without executing it.
Example: “Move the scratch cell after the imports cell, using their IDs from the earlier listing.”
Application: Put the setup cell before the analysis it supports, or bring a methods note next to its result in a draft report. JupyterLab example · AI tool call.
copy_cell(cell_id: str, after_cell_id: str) Copy an ordinary cell after another cell without execution results.
Example: “Copy the scratch cell after the imports cell, using their listed IDs and leaving the copy unexecuted.”
Application: Duplicate an ordinary plotting cell to prepare a second data-series comparison, leaving the new cell unexecuted. JupyterLab example · AI tool call.
split_cell(cell_id: str, line: int, expected_source: str) Split an unchanged ordinary cell before a source line.
Example: “Split the scratch cell just read before line 4, checking that its full source is unchanged.”
Application: Separate data loading from plotting so each stage of a reusable analysis can be reviewed independently. JupyterLab example · AI tool call.
merge_cells(first_cell_id: str, second_cell_id: str, expected_first: str, expected_second: str) Merge adjacent same-type cells when both sources match.
Example: “Merge the two adjacent ordinary Markdown cells just read, checking both full sources.”
Application: Combine adjacent Markdown explanations into one coherent methods note or reunite adjacent code fragments in a lesson. JupyterLab example · AI tool call.

Web pages

Function Purpose
read_url(url: str) Read a public web page as bounded, sanitized Markdown with its source URL.
Example: “Read https://docs.python.org/3/tutorial/datastructures.html and explain its advice about using lists as stacks.”
Application: Check a public library guide while explaining why a notebook uses a particular method in a cited teaching note. Python example · AI tool call.
read_url_section(url: str, selector: str = '') Read one public web-page section using a CSS selector or URL fragment.
Example: “Read only the #list-comprehensions section of https://docs.python.org/3/tutorial/datastructures.html and explain its example.”
Application: Read only the relevant API section to verify a parameter before writing a reproducible example. Python example · AI tool call.
url_to_note(url: str, after_cell_id: str = '') Fetch a public page and insert its bounded Markdown as a notebook note.
Example: “Insert a reading note from https://docs.python.org/3/tutorial/datastructures.html below your answer.”
Application: Insert a bounded, source-linked public reference beside the local calculation it informs, for a reviewed methods notebook. JupyterLab example · AI tool call.

Processes and terminals

Function Purpose
run_python(code: str, cwd: str = '.', timeout: int = 10) Execute Python with the kernel’s interpreter in a fresh process; effects are real.
Example: “Run print(sum([2, 4, 6])) in a fresh Python process and show the result.”
Application: Check a saved parser against a tiny fixture in a fresh process before trusting its output in a report. Python example · AI tool call.
run_shell(command: str, cwd: str = '.', timeout: int = 10) Execute a shell command in a separate process; effects are real, not sandboxed.
Example: “Run git status --short in the demo_project repository and report changed paths.”
Application: Capture a project’s Git status for a handoff, or run a bounded local check whose real effects you intend. Python example · AI tool call.
tmux_sessions() List local tmux panes; requires tmux and does not list JupyterLab terminals.
Example: “List the local tmux panes and their session names.”
Application: Find the named tmux pane for an existing training run so its progress can be included in an analysis handoff. Python example · AI tool call.
tmux_read(pane: str, lines: int = 40) Read a local tmux pane’s recent screen/scrollback without sending input.
Example: “Read the last 30 lines from the tmux pane identified in the earlier listing.”
Application: Read recent output from that known training pane to summarize progress without interrupting the run. Python example · AI tool call.

Files, source, and saved notebooks

File and source tools run on the selected kernel’s machine, using its current working directory for relative paths. That directory may differ from the notebook’s folder and from the Jupyter server’s working directory. A search path is the starting location, not a filesystem sandbox; use an explicit path when the working directory is uncertain. These tools use the kernel user’s filesystem permissions. They search saved files and therefore cannot see unsaved notebook edits. path_info() shows the kernel working directory and a resolved path.

list_files lists one directory by default; recursive=True descends at most six levels and visits at most 2,000 entries. search_files uses bounded Python source search with an optional filename glob and literal or regex query. search_notebooks searches saved cell source, returning saved cell IDs. Both searches follow nested .gitignore, .ignore, and .rgignore rules using pathspec, skip hidden and environment directories, and report partial results when traversal, time, or result bounds are reached. Regex matching has a hard timeout even for a pathological pattern.

list_notebooks, find_notebook_cells, read_notebook_cell, and notebook_outline also work on saved .ipynb files; save first or use live-cell tools. notebook_outline paginates cell summaries and validates the saved structure. Existing saved-notebook reads are limited to 8 MB; source/project text reads are limited to 1 MB. Rich outputs and image pixels are not read into these source searches.

The syntax tools ast_search, ast_rewrite, file_ast_replace, and python_symbols are not bundled. Use source text search and checked literal edits.

source_doc(path, symbol="") parses a saved Python file without importing or running it. It can show the module, a class, or a dotted function/method definition, including the written signature, annotations, defaults, parameter comments, docstring, and public module/class declarations. By comparison, show_doc(name, module="") and other live inspection tools inspect objects in the running kernel. When you pass an explicit module, importing it runs that module’s initialization; inspecting the chosen object does not call it. inspect_value and search_value read bounded live object data. trace_function calls the live function with supplied JSON arguments, records a bounded trace, and can have the function’s real side effects.

document_outline parses saved Markdown headings with markdown-it-py and saved Python definitions with the standard library AST. Pass an opaque address copied from that outline to read_document_section; any file change invalidates the copied address, so get a fresh outline after editing. An empty section reads the whole bounded document. Outlines for JavaScript, TypeScript, TSX, Rust, Zig, and Swift are deferred.

view_file_hashes shows numbered lines and a whole-file SHA-256; give that digest to file_replace_checked with one exact old string to reject a stale edit. file_strs_replace checks that each distinct old string occurs exactly once and applies the replacements together. create_file, the line/literal editors, and digest-checked replacement reject .ipynb paths.

Ordinary text edits are checked against a fresh read, preserve file mode, write atomically, and return bounded diffs. They do not lock out another writer. New text arguments are bounded; use the returned error to narrow a large edit.

Live notebook cells

The live-cell functions use the open JupyterLab document model, including unsaved and offscreen cells. They bind to the notebook, session, kernel, and stable cell IDs that started the question; switching tabs cannot redirect a call. Direct Python calls to these browser-backed functions raise an explanatory error. list_cells, read_cell, and find_cells inspect source without executing it. find_cells scans at most 2,000 cells and 2,000,000 source characters; its result reports scanned cells and whether the search is partial or truncated.

A total match count is supplied only after a complete scan. insert_markdown, insert_code, and url_to_note create ordinary editable cells after the paired answer by default, or after an explicit ID. Inserted code has empty outputs and does not execute, including during a current Run All.

The ten live edit tools change ordinary code, Markdown, or raw cells through the document model. They do not edit AI question/answer cells. replace_cell, line edits, delete_cell, split_cell, and merge_cells require the exact current source text supplied as an expected_... argument; cell_str_replace requires an exact match count. Stale or missing cells fail instead of applying a guessed edit. Move and copy use stable source and anchor IDs.

Copy and split create new IDs. Metadata not owned by nbinlineai is preserved, and edits to code source clear its stale outputs and execution count. No edit tool executes code or saves the notebook file. Save normally after inspecting a change. An acknowledgement means the live document changed, not that it was saved; inspect the notebook before retrying after a lost acknowledgement.

Web, processes, and terminal reading

read_url returns a source-attributed excerpt from a public HTTP(S) page. read_url_section narrows that page with a CSS selector. url_to_note fetches a public page from the Jupyter server and inserts an editable Markdown note in the original notebook. Web fetches bound download size, redirects, and time, reject private/local or credential-bearing URLs, and do not log in, run JavaScript, or read PDF/image contents. Tool results are not automatically saved as transcripts.

run_python executes code with the selected kernel’s interpreter in a fresh subprocess, so it does not share live notebook variables. run_shell executes a shell command in a fresh process. Both run with the kernel user’s real permissions, are not sandboxed, accept an existing cwd, enforce a 1 to 20 second timeout, and bound captured output. Command effects can persist after the call. tmux_sessions and tmux_read inspect a local tmux instance if installed; they do not list JupyterLab terminals, send keys, or create sessions.

Your own functions

A synchronous Python function you import or define in the kernel can be offered with & if it has supported named, typed parameters and a docstring. Custom aliases can be supplied to the setup helpers, for example:

from nbinlineai.tools import read_cell as read_live, tools_markdown
print(tools_markdown(["read_live"], custom={"read_live": read_live}))

The alias must also be bound in the kernel namespace when the question runs.

Relationship to dialoghelper

The tool selection draws on Answer.AI’s dialoghelper and the libraries it surfaces. We reuse fastcore helpers where they fit and reimplement selected capabilities with nbinlineai’s own arguments, bounded results, and JupyterLab integration. The following describes this catalog’s selected capabilities rather than every capability available upstream.

Capability surveyed upstream Implementation in nbinlineai
Fastcore documentation and text editing show_doc uses fastcore’s MarkdownRenderer/docments for formatted object documentation. The file tools wrap fastcore text-edit/diff helpers with our own path, size, match-count, and atomic-write checks. source_doc separately parses a Python file without importing it.
rgapi file and notebook search search_files and search_notebooks were reimplemented using Python matching and notebook JSON reads, with pathspec ignore rules and a separate process enforcing the search timeout. They do not require rgapi.
exhash document navigation and checked edits document_outline and read_document_section were reimplemented for Markdown with markdown-it-py and Python with the standard-library AST. Addresses become stale when file contents change. Our checked text edits use whole-file SHA-256 through hashlib; they do not expose exhash’s edit language or require exhash.
toolslm/pyskills inspection and skill discovery Our fixed-signature tools inspect Python objects and installed pyskills entry-point metadata. Skill instructions are read statically; discovering a skill does not install it or automatically offer its functions to the model.
dialoghelper/Solveit and aidialog message operations Live cell search, insertion, replacement, deletion, move/copy, split, and merge are adapted to the originating JupyterLab document through our browser bridge. Saved-notebook tools read .ipynb files separately.
Execution, tracing, and terminal utilities Our subprocess tools use Python’s standard library; trace_function traces a real call in the live kernel. The terminal tools read local tmux. These are our implementations, without the safecmd/safepyrun policy layer or a tracefunc dependency.

The catalog is a selected capability set, not API compatibility with dialoghelper. Neither dialoghelper, Solveit, nor ipylab is required. The remold/AST tools ast_search, ast_rewrite, file_ast_replace, and python_symbols are not included, and document outlines cover Markdown/Python. Agent orchestration, Solveit-specific UI/lifecycle operations, and model-driven live-cell execution are outside these tools.

The implementation matrix and pinned upstream survey explain the package-by-package decisions; the original dialoghelper catalog records the earlier research.

Examples guide | User guide | FAQ | Architecture