edit_cell
Update the code in a specific Jupyter notebook cell by providing the notebook path, cell ID, and new source.
Instructions
Edit the source code of an existing cell in the notebook.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"notebook_path": "<notebook_path>",
"cell_id": "<cell_id>",
"source": "<source>"
},
"name": "edit_cell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| cell_id | Yes | Unique ID of the cell to edit. This can be obtained using read_notebook_source_only or read_notebook_with_outputs. | |
| notebook_path | Yes |