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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| insertions | Yes | ||
| ipynb_filepath | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||