| 294 | type NotebookEditTool struct{ BaseTool } |
| 295 | |
| 296 | func NewNotebookEditTool() *NotebookEditTool { |
| 297 | return &NotebookEditTool{BaseTool{Spec: ToolSpec{ |
| 298 | Name: "notebook_edit", |
| 299 | Description: "Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. cell_id identifies the cell to edit. Use edit_mode=insert to add a new cell after the identified cell, or edit_mode=delete to remove the cell.", |
| 300 | InputPrototype: NotebookEditInput{}, |
| 301 | ReadOnly: BoolPtr(false), |
| 302 | ConcurrencySafe: BoolPtr(false), |
| 303 | Destructive: BoolPtr(false), |
| 304 | ConfirmFilePaths: true, |
| 305 | }}} |
| 306 | } |
| 307 | |
| 308 | func (t *NotebookEditTool) ValidateInput(execCtx ExecutionContext, input any) (bool, string) { |
| 309 | in := deref[NotebookEditInput](input) |