Skip to main content
Glama

read_file

Retrieves a file's full text plus its version, revision, and change actor so you can review content and keep the version ID for later edits.

Instructions

Read a file's full text. Returns content, version_id, revision, who changed it (actor_id, agent_id). Keep version_id to edit the file later.

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_id": "<file_id>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYesFile ID from list_files.
version_idNoOptional version ID; omit for the current version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1-alpha.2

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so reasonably: "Read" signals a non-mutating operation, and it enumerates the returned fields (content, version_id, revision, actor_id, agent_id) that would otherwise be invisible since there is no output schema. It omits error behavior such as missing files or permission requirements, which keeps it short of a 5.

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 short sentences, front-loaded with the action and followed by return values and the one workflow hint. No redundant or filler wording.

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 two-parameter read tool with no output schema, the description covers the operation, the returned payload, and the version-chaining workflow. Error conditions and permission requirements are unaddressed, but the core needs of an agent calling it are met.

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 baseline is 3, but the description adds real meaning: it explains the purpose of version_id (retain it to edit that version later), which goes beyond the schema's terse "omit for the current version." The required file_id is left to the schema, which is acceptable given full coverage.

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?

"Read a file's full text" gives a specific verb and resource, and "full text" implies the whole-content read rather than a history or metadata view. It does not explicitly distinguish itself from siblings like file_history or precheck_file, so the differentiation is only implicit.

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?

The closing sentence "Keep version_id to edit the file later" implies the read-then-edit workflow and hints at when the optional version_id matters. There is no explicit when-to-use or when-not-to-use guidance relative to file_history or precheck_file.

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