Skip to main content
Glama

ipynb_insert_cells_batch

Insert multiple cells into a Jupyter Notebook at specified positions, providing content and cell type for each insertion.

Instructions

Insert multiple cells at specified positions in a Jupyter Notebook (.ipynb).

Args: ipynb_filepath: Path to Jupyter Notebook (.ipynb) file (absolute path preferred) insertions: List of dicts with 'cell_index', 'content', 'cell_type' keys (provide content as raw strings, no additional escaping needed)

Returns: Dict with 'success' and 'cells_inserted' or 'error' key

Note: Uses 0-based indexing. Insertions are processed in order, so later indices will be affected by earlier insertions. Consider sorting by index descending to maintain intended positions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
insertionsYes
ipynb_filepathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explicitly reveals 0-based indexing, the effect of processing order on indices, and suggests sorting descending to maintain intended positions. It also describes the return dict, which adds transparency. It does not mention file system side effects or permissions, but the core behavioral quirks are well documented.

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?

The description is organized into Args, Returns, and Note sections, each concise and front-loaded. Every sentence adds value, and the note is a single actionable tip. No waste.

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?

For a batch tool with multiple parameters, the description covers the essential aspects: purpose, both parameters, return format, and the ordering pitfall. It does not delve into edge cases like out-of-range indices, but the presence of an output schema reduces the need to document return values. Overall, it is 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.

Parameters5/5

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

Schema coverage is 0%, so the description is essential. It explains ipynb_filepath as a path with absolute path preference, and describes insertions as a list of dicts with 'cell_index', 'content', and 'cell_type' keys, adding the crucial detail that content should be raw strings. This fully compensates for the bare schema.

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 starts with 'Insert multiple cells at specified positions in a Jupyter Notebook (.ipynb)', which uses a specific verb and resource, and clearly distinguishes this batch tool from its singular sibling ipynb_insert_cell. It precisely communicates the scope of the operation.

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 description implies usage for batch insertion by saying 'multiple cells', but it does not explicitly compare with alternatives or state when not to use this tool. The note about sorting indices is a parameter-level guidance, not tool-selection guidance, so it only partially addresses when/how to use.

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/jsamuel1/jupyter-editor-mcp'

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