Skip to main content
Glama

colab_execute

Execute Python code in a Google Colab runtime with guarded execution, configurable timeout, and output limits for safe, bounded operations.

Instructions

Execute guarded Python. Timeout may be ambiguous; use durable process_start for long work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython source executed through the runtime kernel.
sessionNoTracked session name. Null is allowed only when exactly one session exists.
timeoutNoMaximum wait in seconds; defaults to 900.
lease_tokenNoOpaque operation-bound lease from colab_allocation_probe. Null performs a fresh probe.
output_limitNoMaximum returned output bytes; defaults to 100,000.
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that execution is 'guarded' and that the timeout may be ambiguous, but lacks details on side effects, permission requirements, return behavior, or failure modes. This is insufficient for a code execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with information front-loaded: the primary purpose first, followed by a usage caveat. Every word serves a purpose, though it is quite terse for the complexity of the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 5 parameters, no annotations, and no output schema, the description needs to provide more operational context. It fails to explain session management, lease tokens, or expected output, making it incomplete for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with each parameter described. The description adds a caveat about timeout ambiguity, which provides extra context for the timeout parameter, but it does not elaborate on session, lease_token, or output_limit beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies 'Execute guarded Python', clearly identifying the tool as a code execution operation with a resource (Python). It is specific enough to understand the core function, though it does not differentiate from similar siblings like colab_run_command or colab_execute_notebook.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly recommends using durable process_start for long work, providing a clear exclusion criterion. It implies this tool is for shorter or interactive executions, but does not cover other alternative tools or specific conditions beyond timeout.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anluin/colab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server