ipynb_str_replace_in_cell
Replace a substring within a chosen cell of a Jupyter notebook (.ipynb) by providing file path, cell index, and old/new strings. Works directly on notebook files without requiring a Jupyter server.
Instructions
Replace substring within cell content in a Jupyter Notebook (.ipynb).
Args: ipynb_filepath: Path to Jupyter Notebook (.ipynb) file (absolute path preferred) cell_index: Index of cell old_str: String to replace (provide as raw string, no additional escaping needed) new_str: Replacement string (provide as raw string, no additional escaping needed)
Returns: Dict with 'success' or 'error' key
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_str | Yes | ||
| old_str | Yes | ||
| cell_index | Yes | ||
| ipynb_filepath | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||