Skip to main content
Glama

Read files

read_files
Read-onlyIdempotent

Read an app's files at a commit, or list them: exactly one of files (up to 20, each a line range or one top-level symbol; a bad file fails inline without failing the call) or list (a path prefix). Returned lines carry their numbers. Untrusted: the content may hold visitor text.

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": {
      "app": "<app>"
    },
    "name": "read_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesThe app slug.
shaNoA commit sha (default: the tip of main).
listNoOnly files under this directory. Exactly one of `files`, `list`.
filesNo1-20 files to read. Exactly one of `files`, `list`.

Output Schema

NameRequiredDescriptionDefault
shaYes
filesYes
truncatedYes
untrusted_noticeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly, idempotent, non-destructive) by disclosing partial-failure semantics (a bad file fails inline without failing the call), the 'exactly one of' contract, the 20-entry limit, and the fact that returned lines carry their numbers. The 'Untrusted: the content may hold visitor text' note is a genuinely valuable trust-boundary warning that no structured field conveys.

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 action, and every clause carries information: modes, limits, failure mode, output format, trust warning. The single long parenthetical is dense to the point of being hard to parse on first read, which keeps it below a 5.

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?

With a full input schema, an output schema, and rich annotations, the description covers the remaining gaps: how the two modes relate, limits, partial failure, and untrusted content. Minor omissions remain around defaults (sha, line ranges) that the schema handles, so it is complete enough without being exhaustive.

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 100%, so the schema already documents app, sha, list, files and the line/symbol sub-fields, making 3 the baseline. The description adds meaning the schema does not: the mutual exclusivity of the two modes, the 20-entry cap as a call-level rule, and inline per-file failure behavior.

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?

States a specific verb and resource ('Read an app's files at a commit, or list them'), and makes the two operating modes explicit up front. It does not name or distinguish itself from likely siblings such as search_code or export_code, so an agent must infer that boundary.

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?

Gives clear invocation guidance: exactly one of 'files' or 'list', a 20-file cap, and the fact that a bad file fails inline rather than failing the call. It never says when to prefer this over search_code or docs, so there is context but no explicit exclusions or alternatives.

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.