Skip to main content
Glama

Read a file

herdr_file_read

Read lines from a text file on a local or remote machine, starting at a chosen offset and capped by a limit, and return the content plus total line count.

Instructions

Read a text file here or on another machine: lines from offset, at most limit. Returns the text and how many lines the file has.

Input Schema

NameRequiredDescriptionDefault
onNoAnother machine (see herdr_machines); default: this one.
cwdNoWorking directory. Default: the core's; on another machine, its home.
pathYesAbsolute, or from cwd.
limitNoAt most this many lines.
offsetNoThe first line to give, from 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 does disclose useful behavior: partial reads via offset/limit and a return value that includes total line count, which implies the file may be longer than what is returned. It says nothing about encoding, binary files, permission errors, or whether the operation is side-effect free.

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 compact sentence with the read scope front-loaded, followed by the pagination contract and return shape. No filler and no repetition of the title.

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?

With no output schema, the description correctly compensates by stating the return values (text plus total line count). Remote-machine and cwd behavior are covered by the schema. Only minor gaps remain around failure modes and file-type limits.

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 all five parameters including `on`, `cwd`, `offset`, and `limit` are already documented in the schema. The description restates the offset/limit behavior ('lines from offset, at most limit') without adding syntax or edge-case meaning beyond it. Baseline 3 applies when the schema does the heavy lifting.

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?

Specific verb+resource ('Read a text file') with the important scope qualifier 'here or on another machine'. It is clearly distinguishable from herdr_file_write and herdr_file_edit by the read verb, though it never names those siblings explicitly.

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 use case is implied by the name and the 'here or on another machine' hint, which points at the `on` parameter and herdr_machines. There is no explicit guidance on when to prefer this over shelling out via herdr_exec, nor any exclusions (binary files, size limits).

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