Skip to main content
Glama

run_code_cell

Run a code cell in an active Colab browser session by providing its cell ID, enabling direct execution of Python code.

Instructions

Execute a code cell in the Colab notebook by cellId (from add_code_cell or get_cells). Requires an active browser connection via open_colab_browser_connection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cellIdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses a key behavioral dependency (active browser connection) and the source of cellId, but it does not describe execution behavior such as whether the cell runs synchronously, what happens on error, or whether output is returned. This is partially transparent but leaves room for ambiguity.

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 two sentences, front-loads the main purpose, and wastes no words. The prerequisite is a separate concise sentence. Every sentence earns its place.

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?

For a simple one-parameter tool with an output schema, the description covers the essential context: what to pass, where the ID comes from, and the required connection. It lacks details on execution semantics, but given the output schema exists and the low complexity, it is reasonably complete.

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

Parameters4/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 compensate. It does add meaning by explaining that cellId is a code cell identifier obtained from add_code_cell or get_cells, which is useful. However, it does not clarify whether cellId is required or what happens with the default empty string, so it is not fully explicit.

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

Purpose5/5

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

The description clearly states the action ('Execute a code cell') and the resource ('in the Colab notebook by cellId'), which is specific and distinct from sibling tools like add_code_cell or update_cell. It also adds context that the cellId comes from add_code_cell or get_cells, removing ambiguity.

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 provides a clear prerequisite: 'Requires an active browser connection via open_colab_browser_connection.' It implies the tool is for running existing cells and not for creating/editing them, but it does not explicitly mention alternatives or exclusions. Still, the context is clear enough for an agent to decide when to use it.

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/kamalrana22/colab-mcp'

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