Skip to main content
Glama

Read file

read_file
Read-onlyIdempotent

Read plain text files (source, config, Markdown, scripts, logs) from the local computer. Use offset and length to page through large files, with negative offset reading from the end.

Instructions

Read a plain text or line-oriented file on this computer: source, config, Markdown, scripts or logs. Use read_document for PDF, DOCX, XLSX and other structured documents. Legacy .docx/.pdf extraction remains supported for compatibility. Use offset and length to page through large text files; a negative offset reads from the end.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path of the file to read. Relative paths resolve against the runtime working directory.
lengthNoMaximum number of lines to return.
offsetNoZero-based first line to read. Negative values read the last N lines.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesHuman-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already disclose read-only and idempotent behavior)Skip the description. The description adds real behavioral context: it limits the tool to text-like files, explains paging semantics, and discloses the legacy docx/pdf extraction behavior. This goes beyond annotation coverage without redundancy.

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 sentences, each with a distinct purpose: scope definition, alternative routing, and paging guidance. No fluff or repetition of schema fields. The phrasing is compact and 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 single-file read tool, the description covers scope, exclusions, paging, and compatibility, while the output schema and read-only annotations cover the rest. An agent has enough information to invoke it correctly and to decide when another tool is better.

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. The description adds value beyond the schema by explaining how offset and length should be used together to page through large files and clarifying the negative-offset behavior. This is meaningful, though the schema already documents each 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 action (read), a specific resource type (plain text or line-oriented file), and concrete examples (source, config, Markdown, scripts, logs). Explicitly distinguishes from read_document for PDF/DOCX/XLSX, so an agent can select it among several sibling read tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit routing guidance: use read_document for structured documentsainer and notes legacy .docx/.pdf support for compatibility. Also gives concrete usage advice for large files with offset/length paging and negative offsets.

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