ashlr__notebook_edit
Edit one Jupyter notebook cell and return it with nearby cells.
ashlr__notebook_edit edits one cell in a Jupyter notebook (.ipynb) and returns the edited cell with its neighbors. Unrelated cells are elided.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
notebookPath | string | yes | Absolute or working-directory-relative path to the notebook, within an allowed project root. |
cellIndex | integer | yes | Zero-based index of an existing cell. |
newSource | string | yes | New source content for the cell. |
cellType | string | no | code or markdown; omitted preserves the existing type. |
Cell outputs are preserved unless cellType is set to markdown, which removes outputs and execution count. Invalid arguments and failed edits return MCP tool errors. For plain text files, use ashlr__edit.