ipynb_insert_cells_batch
Insert multiple cells into a Jupyter Notebook at specified positions, providing content and cell type for each insertion.
Instructions
Insert multiple cells at specified positions in a Jupyter Notebook (.ipynb).
Args: ipynb_filepath: Path to Jupyter Notebook (.ipynb) file (absolute path preferred) insertions: List of dicts with 'cell_index', 'content', 'cell_type' keys (provide content as raw strings, no additional escaping needed)
Returns: Dict with 'success' and 'cells_inserted' or 'error' key
Note: Uses 0-based indexing. Insertions are processed in order, so later indices will be affected by earlier insertions. Consider sorting by index descending to maintain intended positions.
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>",
"insertions": "<insertions>"
},
"name": "ipynb_insert_cells_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| insertions | Yes | ||
| ipynb_filepath | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||