ipynb_replace_cell
Replace the content of a specific cell in a Jupyter Notebook by supplying the notebook file path, cell index, and new content. Directly modify any cell programmatically without starting a Jupyter server.
Instructions
Replace entire cell content in a Jupyter Notebook (.ipynb).
Args: ipynb_filepath: Path to Jupyter Notebook (.ipynb) file (absolute path preferred) cell_index: Index of cell to replace new_content: New content for cell (provide as raw string, no additional escaping needed)
Returns: Dict with 'success' or 'error' key
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": {
"ipynb_filepath": "<ipynb_filepath>",
"cell_index": "<cell_index>",
"new_content": "<new_content>"
},
"name": "ipynb_replace_cell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell_index | Yes | ||
| new_content | Yes | ||
| ipynb_filepath | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||