notebook_edit
Edit Jupyter notebook cells safely by requiring compare-and-swap anchors; mismatches fail the request before any write.
Instructions
Edit notebook cells. Every source change requires a compare-and-swap anchor (expected_source_hash or expected_text); a mismatch fails the whole request without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | 1..32 edit ops (replace_lines, insert_lines, replace_source, insert_cell, delete_cell, move_cell, set_cell_type, clear_outputs) | |
| path | Yes | Notebook path | |
| dry_run | No | Compute everything but do not write. Default false | |
| create_backup | No | Default true | |
| expected_content_hash | No | Optional optimistic-lock hash |