execute_code
Run Python code in a persistent Jupyter kernel, preserving variables and imports across executions.
Instructions
Execute Python code in a persistent Jupyter kernel with maintained state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code to execute (variables persist between executions) | |
| kernel_id | Yes | ID of the kernel to execute code in (use list_kernels to see available kernels) | |
| timeout | No | Maximum execution time in seconds |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | ||
| output | Yes | ||
| result | Yes | ||
| error | Yes | ||
| timestamp | Yes |