Skip to main content
Glama

read_file

Read specific line ranges from a UTF-8 text file. Specify the file path and optional start and end lines to retrieve only the needed content, ensuring bounded and safe file access.

Instructions

Read a UTF-8 text file using a 1-based inclusive line range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
end_lineNo
start_lineNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.8/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 behavioral disclosure burden. It usefully adds non-obvious details like UTF-8 encoding and 1-based inclusive line ranges beyond the schema, but it does not address edge behavior such as what happens when end_line is null, line numbers exceed the file, or how large reads are handled.

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?

One dense sentence that front-loads the core behavior and file format before any optional details. There is no filler and no redundant restatement of schema properties.

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 simple read operation with an output schema, the description covers the primary behavior, but it leaves the meaning of end_line=null and out-of-range behavior unspecified, and there are no annotations to fill that gap. It is adequate but not fully self-sufficient for all call variants.

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

Parameters2/5

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

With 0% schema description coverage, the description must compensate for parameter meaning, but it only communicates the general line-range concept. It never explains the semantics of end_line defaulting to null, the relationship between start_line and end_line, or how the range behaves when bounds are omitted.

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?

The description names a specific operation ('read'), a typed resource ('UTF-8 text file'), and the line-range mode, which clearly separates it from sibling tools like list_files, search_text, and replace_range. It is unambiguous and not a mere tautology.

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?

The description establishes clear context: use this tool when you need to read the contents of a text file by line range rather than list, search, or modify files. It does not explicitly name sibling alternatives or state when not to use it, so it stops just short of full guidance.

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