Skip to main content
Glama

ipynb_extract_cells

Extract matching cells from multiple Jupyter notebooks into a new notebook using regex pattern and cell type filters, enabling targeted reuse of notebook content.

Instructions

Extract matching cells from multiple Jupyter Notebooks (.ipynb) into a new notebook.

Args: output_ipynb_filepath: Path for output notebook (absolute path preferred) input_ipynb_filepaths: List of source notebook paths (absolute paths preferred) pattern: Optional regex pattern to match cell_type: Optional cell type filter

Returns: Dict with 'success', 'cells_extracted', 'source_notebooks' or 'error' key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternNo
cell_typeNo
input_ipynb_filepathsYes
output_ipynb_filepathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description must carry the full burden. It lists parameters and return keys, but omits potential side effects (e.g., whether input notebooks are modified, whether output file is overwritten) and details about how 'pattern' matches against cell content. This leaves notable gaps in behavioral understanding.

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 well-structured with a one-line summary, an Args section, and a Returns section. Every sentence is useful and there is no fluff. This format is ideal for machine parsing and agent comprehension.

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?

The tool has no annotations and a large sibling set, yet the description does not explicitly differentiate from similar operations like ipynb_filter_cells or ipynb_merge_notebooks. It also lacks critical context such as overwrite behavior and exact matching semantics. Despite having a Returns section, the overall context is incomplete for a tool of this complexity.

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

Parameters4/5

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

The input schema has no parameter descriptions (0% coverage), but the description provides meaningful explanations for all four parameters, noting optionality and path preferences. It does not specify valid cell_type values or what pattern matches against, so it doesn't fully compensate for the schema's silence, but it adds substantial value.

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 a specific action ('Extract matching cells from multiple Jupyter Notebooks') and the output resource ('into a new notebook'). This distinguishes it from siblings like ipynb_merge_notebooks or ipynb_filter_cells, which operate on entire notebooks or a single notebook respectively.

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 extracting filtered cells from multiple notebooks into one, but does not explicitly state when to use this tool over sibling tools or provide exclusion criteria. It leaves the agent to infer the context from the action alone.

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