Skip to main content
Glama

Read a project file by path

read_file

Read any Galley Typst project file by exact path to retrieve its live replicated text for inspection. Binary files return structured metadata instead of 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.

Input Schema

NameRequiredDescriptionDefault
pathYesExact file path as returned by list_files, e.g. /notes.typ.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.10.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.2/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 well: it discloses read-only behavior, a hard 2 MiB ceiling that errors rather than truncates, and the exact shape of the binary result ({ kind, path, hash, size, mime }). It omits what happens on a nonexistent or unreadable path and what the text response's structure is, which keeps it from 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 tight sentences, front-loaded with the primary behavior, then the refusal limit, then the binary exception. Every sentence carries a distinct operational fact and none repeats what the schema already says.

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 one-parameter, no-annotation, no-output-schema tool, the description covers the return payload in both text and binary cases plus the size limit, which is the information an agent cannot get elsewhere. Error semantics for missing paths and any permission requirements remain unaddressed.

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% and the single parameter is already documented, so the baseline is 3; the description still adds real meaning by forbidding normalization and globbing, which the schema's 'exact file path' phrasing does not spell out. That constraint changes how an agent constructs the argument, so it earns above baseline.

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') plus the exact-path constraint, which pins down scope precisely. Referencing list_files as the source of valid paths separates it from that sibling and from a generic document reader, so an agent can pick it out without opening the schema.

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?

Usage is implied by the path requirement ('as listed by list_files'), which tells the agent to enumerate first, but there is no explicit when-to-use/when-not guidance against read_document, which is the closest sibling. The agent must infer the boundary between raw file read and document read.

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