Skip to main content
Glama
MOT1209

Google Colab MCP Server

by MOT1209

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython source to execute.
session_idNoExisting session to run in; omit to use/create the default session.
timeout_secondsNoMax seconds to wait for execution to finish.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return payload (stdout, stderr, last expression repr, rich display data), which is useful, but it does not mention behavioral traits like persistent session state, potential side effects of the executed code, or exception/timeout handling. It offers some transparency but not comprehensive context.

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

Conciseness5/5

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

The description is a single, well-structured sentence with no filler. Every word contributes: verb, target environment, and return outputs. It is appropriately sized and front-loaded.

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

Completeness4/5

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

Given the tool's complexity (arbitrary code execution) and lack of output schema, the description covers the core invocation context and return values. It lacks some behavioral caveats about session persistence and side effects, but the schema covers session_id and timeout, and the return contract is stated. It is reasonably complete for a successful call, though a warning about side effects would be beneficial.

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 description coverage is 100%, with all three parameters described meaningfully. The tool description adds only the term 'snippet' and does not enrich the parameter semantics beyond the schema, which is acceptable given the high schema coverage. Baseline of 3 is appropriate.

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 clearly identifies the tool's function: executing Python code snippets in a Colab/Jupyter runtime and returning execution outputs. It uses a specific verb and resource, but does not explicitly contrast with sibling tools like colab_execute_cell or colab_execute_notebook, which weakens sibling differentiation.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives such as colab_execute_cell or colab_execute_notebook. It only states what the tool does, with no context for selecting it over siblings and no exclusions.

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