insert_execute_code_cell
Insert a code cell at a given index in the active notebook and execute it with a configurable timeout, returning the cell outputs.
Instructions
Insert a cell at specified index from the currently activated notebook and then execute it with timeout and return it's outputs It is a shortcut tool for insert_cell and execute_cell tools, recommended to use if you want to insert a cell and execute it at the same time
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cell_index": "<cell_index>",
"cell_source": "<cell_source>"
},
"name": "insert_execute_code_cell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Maximum seconds to wait for execution (0 = use config default) | |
| cell_index | Yes | Index of the cell to insert and execute (0-based) | |
| cell_source | Yes | Code source for the cell |