notebook_edit
Replace, insert, or delete a Jupyter notebook cell on a remote machine while preserving the rest of the file; guarded fleets require explicit user confirmation before changes.
Instructions
Replace, insert or delete a cell of a Jupyter notebook on the remote machine; the rest of the notebook is preserved. On a guarded fleet you must first ask the user and get their explicit agreement; only then set confirm to the fleet name.
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": {
"path": "<path>",
"edit_mode": "<edit_mode>"
},
"name": "notebook_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the .ipynb file. | |
| fleet | No | Fleet name. Omit to use the default. | |
| cell_id | No | Cell id (replace, delete); for insert the new cell goes after this cell, or first when omitted. | |
| confirm | No | Guarded fleets only: the fleet name, set only after the user explicitly agreed. Never set it on your own. | |
| context | No | Context name. Omit to use the default. | |
| cell_type | No | Required for insert. | |
| edit_mode | Yes | ||
| workspace | No | Workspace id. Omit to use this session's workspace on the fleet. | |
| new_source | No | New cell source (replace, insert). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| mime | No | ||
| note | No | ||
| path | No | ||
| size | No | ||
| count | No | ||
| lines | No | ||
| where | Yes | ||
| sha256 | No | ||
| content | No | ||
| entries | No | ||
| new_file | No | ||
| warnings | No | ||
| truncated | No | ||
| workspace | Yes | ||
| next_offset | No | ||
| total_lines | No | ||
| omitted_bytes | No | ||
| written_bytes | No |