notebook_insert_cell
Insert a new cell at any position in a Jupyter notebook, shifting down existing cells. Specify cell type and source code or text.
Instructions
Insert a new cell at the given position.
Cells at index and above are shifted down. To append after the last cell, pass index equal to the total number of cells.
Args: notebook_path: Path to the .ipynb file, relative to the workspace root. index: Position to insert at (0 = before first cell). source: Source code or text for the new cell. cell_type: 'code', 'markdown', or 'raw' (default: 'code'). checkpoint: Write a backup before editing (default: true).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| source | Yes | ||
| cell_type | No | code | |
| checkpoint | No | ||
| notebook_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |