Skip to main content
Glama

files/read

Read file contents with precise control: specify byte offsets or line ranges, and stream large files in chunks for efficient handling.

Instructions

Precision reading of file contents with chunking/streaming support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file to read
limitNoNumber of bytes to read.
offsetNoStarting byte offset.
end_lineNoEnding line number (inclusive).
privilegedNoSet to true to read as root
start_lineNoStarting line number (1-indexed). Takes precedence over byte offsets.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses chunking/streaming support and the ability to read as root (via the privileged parameter), which adds behavioral context. However, it doesn't mention what happens with large files, encoding, or error cases, and the 'precision reading' phrasing is vague.

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?

The description is a single sentence that is concise and front-loads the core purpose ('Precision reading of file contents'). The chunking/streaming detail is useful and earns its place, though 'precision' is somewhat filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read tool with six parameters and no output schema, the description is adequate but not complete. It doesn't explain return format, pagination behavior, or how line-based and byte-based reads interact. The schema covers parameter semantics, but the description could add more context about expected output and edge cases.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all six parameters. The description adds the concept of chunking/streaming, which hints at how limit/offset/start_line/end_line work together, but it doesn't explain precedence or interaction beyond what the schema states. Baseline 3 is appropriate.

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?

The description states a specific verb ('reading') and resource ('file contents'), and mentions chunking/streaming support, which distinguishes it from sibling tools like files/list or files/find. However, it doesn't explicitly name a sibling alternative or contrast itself with other file tools, so it falls short of full differentiation.

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 description implies usage for reading file contents with chunking/streaming, but provides no explicit guidance on when to use this tool versus alternatives like files/list, files/find, or files/filetype. The context is clear enough for a read operation, but no exclusions or alternative routing are stated.

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