Skip to main content
Glama
lmwacn
by lmwacn

read_file_range

Read-onlyIdempotent

Retrieve a specified line range from a workspace-relative UTF-8 text file to review code or planning context while keeping access read-only and sandboxed.

Instructions

Read a bounded line range from one allowed workspace-relative UTF-8 text file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
endLineNo
maxBytesNo
maxLinesNo
startLineNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
bytesYes
contentYes
endLineYes
startLineYes
truncatedYes
totalLinesYes
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds meaningful behavioral constraints: the file must be 'allowed workspace-relative' and UTF-8 text, and the read is 'bounded' to a line range, which is not captured in the structured annotations. It does not disclose error behavior or limits, but the added context justifies a 4.

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?

The entire description is one focused sentence with no filler. It front-loads the verb and states the core constraints immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With five parameters, no parameter descriptions, and no explanation of maxBytes/maxLines semantics in the description, the tool is not fully self-contained. The output schema and annotations cover return values and side-effect safety, but the range-bounding parameters remain ambiguous. A complete description would explain the optional bound parameters or the default behavior when none are supplied.

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?

Schema description coverage is 0%, and the schema provides only bare types with no descriptions (e.g., endLine, maxBytes, and maxLines are $refs). The description mentions a 'bounded line range' and a file path, which supports path and start/end lines, but leaves maxBytes and maxLines undefined. An agent cannot determine how these parameters interact or which are required to bound the read.

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 action ('Read') and a precise resource ('a bounded line range from one allowed workspace-relative UTF-8 text file'). This clearly distinguishes the tool from sibling list_files and search_text, which do not read file content. The scope and constraints are explicit.

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 should be used when a bounded portion of a single file is needed, but it does not explicitly state when to prefer it over alternatives like list_files or search_text. No exclusions or differential guidance are provided, so an agent must infer usage from the verb and resource.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lmwacn/hua-planrelay'

If you have feedback or need assistance with the MCP directory API, please join our Discord server