Skip to main content
Glama

clear_cell_output

Destructive

Remove the output and execution count from a specific code cell in a Jupyter notebook while keeping the cell itself.

Instructions

Clear the outputs and execution count of a single code cell in the currently activated notebook, without deleting the cell itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cell_indexYesIndex of the code cell to clear (0-based)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesSuccess message with the number of outputs removed
Behavior4/5

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

The description adds value beyond the destructiveHint annotation by clarifying that the cell itself is not deleted, only outputs are cleared. This resolves potential ambiguity about the tool's destructiveness. It does not mention permissions or side effects but sufficiently explains the behavior.

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, clear sentence with no wasted words. It is front-loaded with the key action and context, making it easy to parse quickly.

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?

The tool is simple with one parameter, and there is an output schema present, so return values need not be detailed. The description covers the core functionality adequately. Missing edge cases like invalid indices are minor given the context.

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 coverage, the schema already describes the parameter well. The description does not add significant new meaning beyond confirming it operates on a single cell and reiterating the index's role.

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 verb 'clear' and the specific resource 'outputs and execution count of a single code cell'. It also provides context (currently activated notebook) and distinguishes from deleting the cell, making it distinct from siblings like delete_cell.

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 does not explicitly state when to use this tool over alternatives. While the context of siblings helps, the description itself lacks guidance on when to use or not use it, such as preferring it over delete_cell to retain the cell.

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