Skip to main content
Glama

MCP Claude Code

by SDGLBL

notebook_edit

Edit, insert, or delete cells in Jupyter notebooks (.ipynb files) by specifying the cell index and new content. Supports code or markdown cell types for precise modifications.

Instructions

Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.

Input Schema

NameRequiredDescriptionDefault
cell_numberYesThe index of the cell to edit (0-based)
cell_typeNoThe of the cell (code or markdown). If not specified, it defaults to the current cell type. If using edit_mode=insert, this is required.code
edit_modeNoThe of edit to make (replace, insert, delete). Defaults to replace.replace
new_sourceNoThe new source for the cell
notebook_pathYesThe absolute path to the Jupyter notebook file to edit (must be absolute, not relative)

Input Schema (JSON Schema)

{ "properties": { "cell_number": { "description": "The index of the cell to edit (0-based)", "minimum": 0, "title": "Cell Number", "type": "integer" }, "cell_type": { "default": "code", "description": "The of the cell (code or markdown). If not specified, it defaults to the current cell type. If using edit_mode=insert, this is required.", "enum": [ "code", "markdown" ], "title": "Cell Type", "type": "string" }, "edit_mode": { "default": "replace", "description": "The of edit to make (replace, insert, delete). Defaults to replace.", "enum": [ "replace", "insert", "delete" ], "title": "Edit Mode", "type": "string" }, "new_source": { "default": "", "description": "The new source for the cell", "title": "New Source", "type": "string" }, "notebook_path": { "description": "The absolute path to the Jupyter notebook file to edit (must be absolute, not relative)", "title": "Notebook Path", "type": "string" } }, "required": [ "notebook_path", "cell_number" ], "type": "object" }

Other Tools from MCP Claude Code

Related Tools

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/SDGLBL/mcp-claude-code'

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