Skip to main content
Glama

insert_and_execute_cell

Insert a cell at a given position and execute code or render markdown, with optional slideshow settings.

Instructions

Insert a cell at the specified position and execute it, and optionally set slideshow type. If code cell, it will be executed. If markdown cell, it will be rendered.

Args:
    cell_type: The type of cell ('code' or 'markdown')
    position: The position to insert the cell at
    content: The content of the cell
    slideshow_type: Optional slideshow type ('slide', 'subslide', 'fragment', 'skip', 'notes')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cell_typeNocode
positionNo
contentNo
slideshow_typeNo
Behavior2/5

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

No annotations provided, so description must bear full burden. It mentions execution/rendering behavior but fails to disclose side effects (e.g., whether the notebook is modified, permission requirements, error handling on invalid position). This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is front-loaded with the main action and then breaks down parameters. It is mostly concise, though the backtick formatting is slightly informal.

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?

With no output schema and no annotations, the description covers the main action and parameters but omits return values, error conditions, and the fact that the tool modifies the notebook. It is adequate but not thorough.

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%, but description's Args section explains each parameter's meaning and lists acceptable values for slideshow_type. This fully compensates for the missing 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 it inserts a cell at a specified position and executes it, distinguishing code vs markdown execution. This differentiates it from siblings like run_cell (runs existing cell) and edit_cell_content (edits without insert).

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 when to use (insert+execute) but does not explicitly state when not to use or suggest alternatives. For example, it doesn't mention that set_slideshow_type sibling could be used separately.

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/jjsantos01/jupyter-notebook-mcp'

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