colab_execute_file
Execute a local Python file on a Google Colab GPU runtime (T4 or L4) by specifying the file path, accelerator, and timeout. Enables GPU-accelerated code without local hardware.
Instructions
Execute a local Python file on a Google Colab GPU runtime.
Reads the file contents and sends them for execution on a Colab GPU.
Args: file_path: Path to a local .py file to execute on Colab. 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": {
"file_path": "<file_path>"
},
"name": "colab_execute_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| accelerator | No | T4 | |
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |