kernel_execute
Execute code on the running kernel and retrieve structured output: stdout, stderr, errors, and plots. On timeout, returns partial results and a pending ID to fetch the rest.
Instructions
Execute code on the running kernel and return structured output.
Output is returned as tagged text blocks: [stdout], [stderr], [result] (last expression value), [error] (with traceback), plus image blocks for plots and display calls.
If timeout is set and execution exceeds it, returns any output collected so far plus a [pending] block with a msg_id. Pass that msg_id to kernel_get_output to retrieve the rest. Without timeout, blocks until done.
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": {
"code": "<code>"
},
"name": "kernel_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout | No |