Skip to main content
Glama
tmlksu

notebook-edit

by tmlksu

read_cells

Read cells from a Jupyter notebook by index or stable ID to retrieve source code, outputs, and execution metadata without running the notebook.

Instructions

Read one or more cells at once, addressed by indices OR ids.

Pass exactly one of indices (0-based) or ids (stable cell.id from list_cells). Ids don't shift when cells move, so prefer them once listed. Prefer a single call with several targets over many single reads. Returns, per cell, its id and source plus (for code cells) execution_count, outputs_text (rendered stdout/results, with errors and [image/*] placeholders), has_error, and output_types. All targets are validated first: if any is invalid (bad index, unknown/duplicate id) the whole call errors. Never executes code; only reads stored outputs.

Large results are bounded: each cell's source is windowed (~8000 chars) and the response total is capped (~20000 chars). A windowed cell carries source_truncated/source_length/source_offset — page it by re-reading that target with a larger offset. Cells past the total budget come back as {index, id, type, source_length, content_omitted: true}; read them separately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsNo
pathYes
offsetNo
indicesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses critical behaviors: it never executes code, only reads stored outputs; it performs upfront validation of all targets; it truncates large sources and responses, indicating when content is omitted; and it describes output fields including error indicators and image placeholders.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed but well-structured: it starts with the core purpose, then elaborates on addressing, batching, validation, output format, and pagination. Every sentence adds value, though some repetition could be trimmed (e.g., 'Never executes code' is clear from 'only reads stored outputs').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (multiple parameters, pagination, error handling, varied output), the description is nearly exhaustive. It explains the output shape, windowing behavior, truncation limits, and how to handle both windowed and omitted cells. The presence of an output schema reduces the need for further return-value details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% property coverage, so the description must compensate. It explains the `ids` vs `indices` distinction, that ids are stable, that exactly one of them must be passed (implied by 'Pass exactly one'), and the pagination use of `offset`. The `path` parameter is not explained, but it is a common parameter with a clear purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Read') and resource ('cells'), distinguishes between addressing methods (`indices` or `ids`), and differentiates from sibling tools like `list_cells` or `edit_cell` by specifying read-only behavior and scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises preferring `ids` over `indices` for stability, recommends batching multiple reads into one call, explains that validation errors abort the entire call, and gives pagination instructions for large results. It does not explicitly say when not to use this tool, but the context makes it clear it is for reading versus editing/deleting.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tmlksu/nbedit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server