Skip to main content
Glama

read_file_range

Read a specific line range from a UTF-8 text file to extract only the needed content, avoiding the overhead of reading the entire file when the relevant location is already known.

Instructions

Read a specific one-indexed line range from a UTF-8 text file. Prefer this over reading a whole file when the relevant location is already known.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_lineYes
workspaceYes
start_lineYes
relative_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
end_lineYes
truncatedYes
workspaceYes
start_lineYes
relative_pathYes
Behavior3/5

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

With no annotations available, the description provides some behavioral context (one-indexed, UTF-8) but does not disclose edge-case behavior like invalid line ranges, out-of-bounds, or error handling. For a read operation this is acceptable but not comprehensive.

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?

Two sentences with no redundant information. The first sentence front-loads the core action and resource, the second adds a usage guideline. Every word earns its place.

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 is simple with four self-explanatory parameters and an output schema available. The description covers the essential nuance (one-indexed range, preference over whole-file read), making it sufficiently complete for an agent to invoke correctly.

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 0%, so the description must compensate. It adds meaning to start_line and end_line by specifying one-indexed, and to relative_path by specifying UTF-8 text file. However, it does not elaborate on workspace or path resolution beyond what parameter names imply.

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 clearly states the tool reads a one-indexed line range from a UTF-8 text file, distinguishing it from sibling read_file by focusing on a specific range rather than the whole file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly recommends using this tool over reading a whole file when the relevant location is known, naming the alternative and giving a clear condition for use.

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/negativexq/repo-context-forge'

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