colab_execute_code
Run Python code in a Colab or Jupyter runtime and retrieve stdout, stderr, expression results, and rich display data.
Instructions
Execute a snippet of Python code in a Colab/Jupyter runtime session and return stdout, stderr, the last expression's repr, and any rich display data.
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": "colab_execute_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python source to execute. | |
| session_id | No | Existing session to run in; omit to use/create the default session. | |
| timeout_seconds | No | Max seconds to wait for execution to finish. |