Skip to main content
Glama
sangingeum
by sangingeum

file_read

Read-onlyIdempotent

Read a text file, optionally by line range, with byte limits and truncation details; binary content is refused unless an encoding is supplied.

Instructions

Read a text file, optionally a bounded line range.

    Line numbers are 1-based and inclusive. Omitting both returns from the
    first line. A byte limit smaller than the range truncates honestly:
    truncated, truncation_reason and next_start_line say where to resume. A
    UTF-8 byte-order mark is preserved and line endings are returned exactly
    as stored. Binary content is refused with BINARY_CONTENT_REFUSED unless
    an encoding is named. Read-only; no history is recorded. With a
    workspace rooted at the filesystem root, the reported path keeps its
    leading '/' so it is exactly the absolute path.
    

Input Schema

NameRequiredDescriptionDefault
pathYes
encodingNo
end_lineNo
max_bytesNo
start_lineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4/5.0
Behavior5/5

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

The annotations already establish read-only, idempotent, non-destructive, and closed-world behavior. The description adds substantial beyond that: binary content is refused with BINARY_CONTENT_REFUSED unless an encoding is named, truncation fields indicate where to resume, BOMs are preserved, line endings are returned exactly, and no history is recorded.

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 purpose is front-loaded in the first sentence, and the remaining sentences focus on relevant edge cases and return behavior. The description is somewhat dense but every sentence provides useful operational detail, with little waste.

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?

The tool has five parameters, no schema descriptions, no output schema, and annotations that cover safety. The description compensates well by explaining line ranges, encoding, byte truncation, resume fields, BOM handling, line endings, and binary refusal. Minor gaps remain around general output shape and path input semantics, but the description is substantially complete.

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?

With 0% schema description coverage, the description carries the burden of explaining parameter meaning. It covers the 1-based inclusive line range, omitting both line parameters, max_bytes truncation behavior, encoding behavior for binary content, and path reporting semantics. It does not fully specify path input expectations such as relative versus absolute paths.

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 uses a specific verb and resource: "Read a text file, optionally a bounded line range." It is immediately clear what the tool does and that line-range access is optional, but it does not explicitly distinguish itself from siblings such as file_read_many or content_search.

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 gives useful usage context for line ranges, including that omitting both line parameters returns from the first line. However, it does not say when to use this tool instead of alternatives like file_read_many, file_info, or content_search, leaving sibling selection to inference.

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