Skip to main content
Glama

Read a project file by path

read_file

Reads the live replicated text of any project file by exact path for read-only inspection. Oversized files are refused and binary files return metadata, not content.

Instructions

Returns the live replicated text of any project file by EXACT path (as listed by list_files — no normalization, no globbing). Read-only. Files over 2097152 UTF-8 bytes are refused with an error, never truncated. A BINARY file (image/PDF) returns structured metadata { kind: "binary", path, hash, size, mime } instead of text — its bytes are not available through this tool.

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": {
      "project": "<project>",
      "path": "<path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesExact file path as returned by list_files, e.g. /notes.typ.
projectYesThe projectId of the project to work on, as returned by list_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2026.11.16
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "The projectId of the project to work on, as returned by list_projects.",
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "path"
      -]New value: +[
      +  "project",
      +  "path"
      +]
  2. Changed1 schema field changedv2026.10.2
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden and does meaningful work: read-only status, a hard 2097152-byte rejection that fails loudly rather than truncating, and a documented non-text return shape. It does not cover authorization or visibility (e.g. whether a missing project errors differently from a missing file), leaving real gaps for a no-annotation tool.

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?

Four short sentences, each load-bearing: scope, read-only, size ceiling, binary fallback. The constraint that matters most for correct invocation (exact path) is front-loaded.

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?

For a two-parameter read tool with no output schema and no annotations, this covers what an agent needs: how to get the path, what the success payload is, what the failure modes are, and what comes back for binary files. Nothing material is left to guesswork.

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 genuine meaning: paths must be exact, are never normalized, and accept no glob patterns — constraints the schema's 'Exact file path as returned by list_files' does not spell out. The 2 MB limit is also surfaced even though it is not a parameter.

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 live replicated text of any project file') and immediately scopes it to an EXACT path. The 'no normalization, no globbing' clause plus the pointer to list_files separates it cleanly from the listing siblings.

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?

Tells the agent how to obtain a valid argument (paths come from list_files) and rules out globbing, which is the most likely misuse. It stops short of explicitly naming when to prefer a sibling such as project_context, so the routing guidance is clear but not exhaustive.

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