Skip to main content
Glama
duplonicus
by duplonicus

read_file

Read-only

Read text files in WSL using Windows or Linux paths, returning numbered lines with offset and limit for targeted inspection.

Instructions

Read a text file. Each line comes back as ''.

path: the file (~/dev/..., an absolute WSL path, a Windows spelling of one, or relative to the first root). offset: first line to return, counting from 1. limit: how many lines to return.

Input Schema

NameRequiredDescriptionDefault
pathYes
limitNo
offsetNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely useful behavior beyond that: the returned line format ('<number><tab><text>') and the accepted path spellings (WSL absolute, Windows-style, or relative). It is silent on encoding, binary files, and error behavior for missing paths.

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?

Four short, front-loaded sentences: the core action and output shape first, then one line per parameter. No filler, no restatement of the tool name.

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?

An output schema exists, so return-value documentation is not required, yet the description still states the line-numbering format, which helps the agent parse results. Given the tool's simplicity, the only meaningful omissions are default values and failure behavior for non-existent or unreadable files.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the burden and it does: path lists the accepted path forms, offset is defined as 1-based line numbering, and limit is defined as a line count. Every parameter gets meaning beyond its bare name, fully compensating for the empty schema descriptions.

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 opens with a specific verb+resource ('Read a text file') and immediately specifies the output format, so the operation is unambiguous. It does not explicitly contrast itself with siblings like write_file, edit_file, or search, but the verb makes the distinction obvious.

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?

Usage is implied by 'Read a text file' and by the offset/limit paging semantics, which tell the agent how to read a slice rather than the whole file. There is no explicit when-to-use/when-not guidance, no mention that this is unsuitable for binary files, and no pointer to search or find_files for locating content.

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