notebook_run
Execute selected Jupyter notebook cells in resume, replay, or full mode, preserving kernel state and writing fresh outputs; inspect executed cell status to catch failures.
Instructions
Execute notebook cells. mode='resume' runs only target cells in the live kernel; 'replay' silently rebuilds state from cell 0 first; 'full' runs all code cells without resetting a live kernel or its import cache. For clean validation, restart the kernel before full. Inspect executed[].status for cell failures; completed does not mean all cells succeeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Execution mode: 'auto' (default) | 'resume' | 'replay' | 'full' | |
| path | Yes | Notebook path | |
| cell_selector | No | Which code cells to run: 'all' (default), '3', '0-4', or a comma list like '0-4,7,9'. This is a string selector — do not pass an array. | |
| create_backup | No | Default true | |
| write_outputs | No | Write fresh outputs back to the .ipynb. Default true | |
| timeout_seconds | No | Per-cell timeout in seconds (1..86400; default from server config) | |
| clear_outputs_before | No | Clear target cells' outputs before running. Default true | |
| expected_content_hash | No | Optional optimistic-lock hash |