Skip to main content
Glama

files_read_code

Read-onlyIdempotent

Returns the SOURCE CODE of a code cell (Python, SQL connection, or Formula) at a given cell, plus its run stdout/stderr. files_read returns only the computed DISPLAY values; use this to see (and then modify) the actual code. Pass any cell within the code cell's output — the anchor is resolved automatically. Returns code_cell: null when there is no code cell there. Signature: files_read_code(file_uuid, cell, sheet?).

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_uuid": "<file_uuid>",
      "cell": "<cell>"
    },
    "name": "files_read_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
cellYesA cell (A1) at or inside the code cell, e.g. 'B2'.
sheetNoSheet name (defaults to the first sheet).
file_uuidYes

Output Schema

NameRequiredDescriptionDefault
code_cellYes
file_uuidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds genuinely non-obvious behavior: the anchor is auto-resolved so any cell in the output range works, and code_cell is null when no code cell exists. It does not address output size, stdout/stderr truncation, or what happens with external SQL connection cells beyond listing the type, so it falls short of fully rich disclosure.

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?

Front-loaded with the core behavior and contrast, and every sentence carries information about behavior or routing. The trailing 'Signature:' line largely restates the input schema and is the one expendable element.

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

Completeness5/5

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

An output schema exists, so return values need not be enumerated, yet the description still flags the meaningful null case. Combined with the read-vs-display distinction and the anchor rule, an agent has everything needed to invoke this correctly and interpret an empty result.

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 coverage is 67% and the only undocumented param is file_uuid, which is self-evident. The description meaningfully extends the `cell` param by explaining that any cell inside the code cell's output resolves automatically, which the schema's 'A cell (A1) at or inside the code cell' only partially conveys.

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?

States a specific verb and resource ('Returns the SOURCE CODE of a code cell') and enumerates the cell types covered (Python, SQL connection, Formula). It explicitly contrasts itself with files_read, which returns display values, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Names the alternative (files_read) and the exact condition that selects this tool instead: use this 'to see (and then modify) the actual code.' The downstream intent (read-then-modify) is spelled out, leaving nothing to inference about when to reach for it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources