Skip to main content
Glama

notebook_run_cell

Execute a notebook cell's code on its kernel, optionally write outputs back, and return stdout, results, and images for GPU training workflows.

Instructions

Execute a notebook cell's code on the kernel; optionally write outputs back.

Returns stdout/results and any images. Only 'code' cells are executed.

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>",
      "index": "<index>"
    },
    "name": "notebook_run_cell"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
indexYes
timeoutNo
write_outputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the whole burden and does deliver real value: it discloses the execution target (the kernel), that outputs are persisted back by default, that stdout/results and images come back, and that markdown cells are rejected. It omits significant behavior an agent needs — whether execution is blocking, what a timeout does, whether kernel state persists across calls, and how errors are surfaced.

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 followed by the return behavior and the cell-type constraint. No filler or redundant restatement of the name.

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

Completeness3/5

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

For a four-parameter execution tool with no annotations and no output schema, the description usefully covers return values and the write-back default. It is still not complete: timeout behavior, kernel-state requirements, and error/timeout outcomes are all absent, leaving gaps an agent must guess at.

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, so the description must compensate and it largely does not. 'Optionally write outputs back' maps to write_output, and 'cell's code' loosely implies index/path, but neither path nor index semantics are explained and timeout (default 120) is never mentioned at all.

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?

The description names a specific verb and resource ('Execute a notebook cell's code on the kernel') rather than restating the tool name, and the clause 'Only code cells are executed' carves out a clear boundary against non-code cells. It does not explicitly contrast itself with the similarly-named run_code sibling, so the differentiation is only partial.

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

Usage Guidelines3/5

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

The 'only code cells are executed' constraint implies when this tool is valid, and 'optionally write outputs back' hints at the write_output choice. There is no explicit statement of when to prefer this over run_code or get_run_status, and no stated prerequisites (e.g. a connected/running kernel).

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