move_cell
Relocate a notebook cell to a new position, shifting other cells automatically while preserving cell content and metadata.
Instructions
Move a cell from source_index to target_index within the currently activated notebook.
The cell is removed from source_index and placed at target_index. Cells in between shift
to fill the gap. The cell's type, source, and outputs are preserved.
Example: in a notebook [A, B, C, D], move_cell(1, 3) produces [A, C, D, B].
Use this tool instead of manually deleting and re-inserting a cell — it is atomic and
preserves cell metadata. Use read_notebook first to see cell indices if needed.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_index | Yes | Index of the cell to move (0-based) | |
| target_index | Yes | Destination index where the cell will end up (0-based) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Success message with moved cell info and surrounding context |