Skip to main content
Glama
tmlksu

notebook-edit

by tmlksu

edit_cell

Replace a notebook cell's entire source code, targeting by index or stable cell_id, and clears outputs to prevent stale data.

Instructions

Replace a cell's ENTIRE source. For small changes prefer patch_cell.

Target the cell by index (0-based) OR cell_id (stable id from list_cells); pass exactly one. Prefer cell_id after listing — it doesn't shift when other cells change, avoiding off-by-one edits to the wrong cell. Editing a code cell clears its outputs and execution_count (they are stale). Optionally pass summary to set the cell's metadata summary (omit to keep, "" to clear). Optionally pass expected_rev to refuse the write if the file changed on disk. Returns the new rev.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
indexNo
sourceYes
cell_idNo
summaryNo
expected_revNo
Behavior5/5

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

Despite no annotations, the description discloses important behaviors: editing code cells clears outputs/execution_count, optional summary handling, concurrent write protection via expected_rev, and return of new rev. No contradictions.

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

Conciseness5/5

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

Concise yet comprehensive: first sentence states action, then guidelines, then parameter details, all in a few sentences without redundancy.

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

Completeness4/5

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

Covers purpose, usage, parameters, side effects, and return value. Could optionally clarify path format, but overall sufficient for an agent to use the tool effectively.

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?

Schema coverage is 0%, but the description adds meaning to key parameters: index/cell_id usage, source is implicit, summary semantics, expected_rev purpose. Path is not explained but is straightforward. Strong compensation.

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 it replaces a cell's entire source, distinguishes from patch_cell for small changes, and specifies targeting methods (index or cell_id). This clearly defines the tool's purpose and differentiates it from siblings.

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

Usage Guidelines5/5

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

Provides explicit guidance: use for full replacements, prefer patch_cell for small changes, target by cell_id to avoid shifting, and notes on optional parameters like summary and expected_rev. This is comprehensive usage advice.

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