add_cell_to_notebook
Insert a new code, markdown, or raw cell into a Jupyter notebook at a specified position with optional metadata.
Instructions
Add a new cell to a Jupyter notebook.
Args:
notebook_path: Absolute path to the .ipynb file
cell_content: Content of the new cell
cell_type: Type of cell ('code', 'markdown', 'raw')
position: Position to insert cell (default: append to end)
metadata: Optional cell metadata
Returns:
Status of the operation
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_content": "<cell_content>"
},
"name": "add_cell_to_notebook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metadata | No | ||
| position | No | ||
| cell_type | No | code | |
| cell_content | Yes | ||
| notebook_path | Yes |