colab_execute_notebook
Execute Python code on a remote Colab GPU runtime and download generated artifacts (images, CSVs, models) to a local directory.
Instructions
Execute Python code on Colab GPU and collect generated artifacts.
Runs the code, then scans the runtime for output files (images, CSVs, models, etc.), zips them, and downloads to a local directory.
Args: code: Python code to execute on the Colab GPU runtime. output_dir: Local directory to save the artifacts zip and extracted files. accelerator: GPU type — "T4" (free-tier) or "L4" (premium). Default: "T4". timeout: Max execution time in seconds. Default: 300.
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>",
"output_dir": "<output_dir>"
},
"name": "colab_execute_notebook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| output_dir | Yes | ||
| accelerator | No | T4 | |
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |