Skip to main content
Glama
tmlksu

notebook-edit

by tmlksu

insert_cells

Insert multiple notebook cells contiguously before a specified index with atomic validation. Returns new indices and revision for synchronization.

Instructions

Insert several cells at once, contiguously BEFORE index (0-based).

Prefer this over many insert_cell calls when adding a block of cells: one round-trip, no index bookkeeping between inserts. cells is a list of objects {cell_type, source, summary?} inserted in order (index == cell count appends). The batch is atomic: all items are validated first, and if any is invalid nothing is written and the offending items are named — fix those and resend. Optionally pass expected_rev to guard against concurrent external edits. Returns {"indices": [...], "ids": [...], "rev": ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
cellsYes
indexYes
expected_revNo
Behavior5/5

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

Since no annotations are provided, the description fully discloses behavioral traits: atomic batch validation, error reporting with offending items named, concurrency guard with 'expected_rev', and the return structure. It accurately portrays the tool as a safe, atomic, and efficient batch operation.

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 concise with about 4-5 sentences, each serving a purpose. It front-loads the core functionality, then provides usage guidance, atomicity details, and return information. No unnecessary words or repetition.

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 of 4 parameters (3 required) and no output schema, the description covers all essentials: purpose, usage, cell structure, atomicity, error handling, concurrency, and return format. It is complete for an agent to select and invoke correctly, especially compared to siblings.

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?

With 0% schema coverage, the description adds crucial meaning: explains that 'cells' is a list of objects with {cell_type, source, summary?}, that 'index' is 0-based and appends when equal to cell count, and that 'expected_rev' guards against concurrent edits. This effectively compensates for the lack of schema descriptions.

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 tool inserts several cells contiguously before a 0-based index. It specifies the verb 'insert', the resource 'cells', and the scope 'at once'. It also distinguishes itself from the sibling tool 'insert_cell' by indicating preference for batch operations.

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?

The description provides explicit guidance on when to use this tool: 'Prefer this over many insert_cell calls' with reasons like one round-trip and no index bookkeeping. It also explains the atomicity of the batch and suggests using 'expected_rev' for concurrent edits, offering clear context for usage.

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