Skip to main content
Glama

notebook_add_cell

Add a code or text cell to a notebook, appending it or inserting it before a chosen index, so you can build and extend notebook content programmatically.

Instructions

Add a cell to a notebook. index=-1 appends; otherwise inserts before that index.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "source": "<source>"
    },
    "name": "notebook_add_cell"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
indexNo
sourceYes
cell_typeNocode

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does not say what happens to existing cells when inserting mid-list (shifting), whether the operation fails on a missing notebook or path, whether it writes to disk or only an in-memory model, or whether permissions are required; the only behavioral detail given is the index/appending convention.

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?

Two short sentences, front-loaded with the core action, and no filler. The index note is compact and placed immediately after the main statement where it is most useful.

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?

An output schema exists, so return values need not be explained, and the description covers the essential action plus the non-obvious index default. It is slightly thin on the meaning of 'path', 'source' and 'cell_type', but for a simple additive tool this is close to sufficient.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, and the description only explains 'index' (-1 appends, otherwise insert before that index). It adds nothing about 'path' (notebook identifier vs filesystem path), 'source' (raw code/markdown text), or 'cell_type' (default 'code', acceptable values), so three of four parameters remain undocumented.

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

Purpose4/5

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

States a specific verb and resource ('Add a cell to a notebook'), which is unambiguous and clearly distinct from sibling operations like notebook_delete_cell, notebook_edit_cell and notebook_run_cell. It does not explicitly name those alternatives, but the action is specific enough for an agent to select it correctly.

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

Usage Guidelines2/5

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

The description never says when to use this tool versus notebook_create or notebook_edit_cell, nor does it mention prerequisites such as whether the notebook at 'path' must already exist. The index convention is a parameter detail rather than usage guidance, so context is left entirely implicit.

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