Skip to main content
Glama

Read a file from the editable source tree

read_source_file
Read-onlyIdempotent

Return the bytes of one source file (the platform's editable copy of the pre-build code), letting an AI in any future chat fetch and edit content without needing the original local files. Use list_source_files first to discover paths. For the served dist, use read_file instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
pathYesSite-relative path inside the source tree, e.g. 'src/App.tsx'.
siteIdNo
maxBytesNoPer-file size cap. Default 1048576, hard max 5242880.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathYes
sizeYes
siteIdYes
contentYes
encodingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  2. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark readOnly, idempotent, non-destructive; the description adds context that this reads the editable source copy and is useful when original local files are unavailable. No hidden side effects are implied, and no contradictions with annotations exist.

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?

Three purpose-driven sentences, with the core behavior front-loaded. The prerequisite and sibling routing are given in compact, unambiguous sentences with no filler.

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 read-only tool with strong annotations and an output schema, the description covers the essential call pattern and disambiguation. The only notable completeness gap is the unresolved semantics of name and siteId.

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

Parameters2/5

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

The schema documents path and maxBytes, but name and siteId have no schema descriptions and the tool description does not clarify them either. With only 50% schema coverage, the description needed to compensate for those opaque optional parameters and does not.

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: 'Return the bytes of one source file' from the platform's editable pre-build source tree. It also differentiates from read_file by explicitly targeting the editable copy, not the served dist.

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?

Gives an explicit prerequisite ('Use list_source_files first to discover paths') and an explicit alternative ('For the served dist, use read_file instead'). An agent knows exactly when to choose this tool versus the sibling.

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.