Skip to main content
Glama

colab_file_execute

Execute a Python file inside a Colab session to capture stdout, stderr, exit code, and execution time, with configurable timeout and environment variables.

Instructions

Execute a Python file in a Colab session.

Args: session: Session display name file_path: Path to Python file to execute timeout: Execution timeout in seconds (1-300, default: 30) env: Environment variables to set before execution

Returns: Execution result with stdout, stderr, exit_code, execution_time

Raises: ToolError: SESSION_NOT_FOUND, EXECUTION_TIMEOUT, KERNEL_ERROR, AUTH_EXPIRED, QUOTA_EXCEEDED, CLI_ERROR

Input Schema

NameRequiredDescriptionDefault
envNo
sessionYes
timeoutNo
file_pathYes

Output Schema

NameRequiredDescriptionDefault
stderrYesStandard error from execution
stdoutYesStandard output from execution
exit_codeYesProcess exit code (0 = success)
execution_timeYesExecution time in seconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden: it usefully lists return fields and named error conditions such as SESSION_NOT_FOUND, EXECUTION_TIMEOUT, KERNEL_ERROR, AUTH_EXPIRED, QUOTA_EXCEEDED, and CLI_ERROR. However, it does not disclose side effects, permission requirements, or whether execution mutates session state.

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 front-loaded with the purpose and then organized into Args, Returns, and Raises sections. Every section adds useful information without excessive verbosity.

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?

The description covers all parameters, return shape, and error cases, which is strong for a 4-parameter execution tool with no annotations. It is only missing explicit guidance about when to use this tool versus `colab_code_execute` and any side-effect or permission disclosure.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must document all four parameters, and it does: session display name, file path, timeout with range/default, and environment variables. This adds clear semantics beyond the bare schema types.

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 states a specific verb and resource: 'Execute a Python file in a Colab session.' The 'file' wording implicitly distinguishes it from the sibling `colab_code_execute`, though it does not explicitly name or compare against that alternative.

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

Usage Guidelines3/5

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

Usage is implied by the distinction between executing a file versus executing code, but the description never explicitly says when to choose this tool over `colab_code_execute`. It also gives no prerequisites or exclusions.

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