Skip to main content
Glama

file_read

Read a text file's contents, optionally specifying start and end lines to extract only the needed portion.

Instructions

Read contents of a text file with optional start and end line ranges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesTarget file path.
end_lineNoOptional end line (1-indexed).
start_lineNoOptional start line (1-indexed).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 full burden. It states the core read behavior but does not disclose potential errors, encoding assumptions, or return format. It is not misleading but is minimal.

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?

A single, clear sentence with no extraneous detail. The essential purpose is front-loaded, and there is no wasted wording.

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 simple read tool with a fully documented schema, the description covers the primary purpose and the optional line ranges. It doesn't mention edge cases or output details, but given the low complexity, this is adequate.

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%, with each parameter already documented. The description adds 'optional start and end line ranges' which maps to start_line and end_line, but it doesn't add meaning beyond the schema's own descriptions, including 1-indexing.

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 states a specific verb ('Read') and resource ('contents of a text file'), and distinguishes itself from sibling file tools like file_write, file_stat, and file_list. The mention of 'optional start and end line ranges' adds specificity.

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 the tool is for reading text files, but it doesn't explicitly state when to use it over alternatives like file_stat or file_list. It lacks explicit when-to-use/when-not-to-use guidance.

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