Skip to main content
Glama

delete_cell

Destructive

Remove specific cells from a Jupyter notebook and optionally retrieve their source code for reference or reuse.

Instructions

Delete specific cells from the currently activated notebook and return the cell source of deleted cells (if include_source=True).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cell_indicesYesList of cell indices to delete (0-based)
include_sourceNoWhether to include the source of deleted cells

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesSuccess message with list of deleted cells and their source (if include_source=True)
Behavior4/5

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

Annotations provide destructiveHint=true, which the description doesn't contradict. The description adds valuable behavioral context beyond annotations: it specifies what gets returned (cell source when include_source=True), clarifies the operation scope (currently activated notebook), and mentions the conditional return behavior. This provides useful operational details not covered by annotations alone.

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 a single, well-structured sentence that efficiently communicates the core action, target, and key behavioral detail. Every element earns its place with no redundancy or unnecessary elaboration. It's front-loaded with the primary action and appropriately sized for the tool's complexity.

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?

Given the tool has destructiveHint annotation, 100% schema coverage, and an output schema (implied by context signals), the description provides adequate context. It covers the main action, target resource, and key return behavior. However, it doesn't mention error conditions, what happens with invalid indices, or dependencies on notebook activation state, which could be helpful for a destructive operation.

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

Parameters3/5

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

With 100% schema description coverage, the schema fully documents both parameters. The description adds minimal semantic context by mentioning include_source parameter's effect on return values, but doesn't provide additional meaning beyond what the schema already states about cell_indices or include_source. This meets the baseline for high schema coverage.

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 specific action ('Delete specific cells'), identifies the target resource ('from the currently activated notebook'), and distinguishes from siblings by specifying it returns cell source (unlike other deletion or modification tools like overwrite_cell_source). It uses precise verb+resource+scope language.

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 context ('currently activated notebook') which suggests it should be used after activating a notebook via use_notebook, but doesn't explicitly state when to use this vs alternatives like overwrite_cell_source or when not to use it. No explicit alternatives or exclusions are mentioned.

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/datalayer/jupyter-mcp-server'

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