Skip to main content
Glama

read_file_lines

Read specific lines from a file by specifying start and end line numbers, with out-of-range values automatically clamped to the file's actual length.

Instructions

Read a range of lines (1-based, inclusive) from a file.

Out-of-range numbers are clamped to the file's actual length.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesLast line number (1-based, inclusive).
pathYesFile to read.
startYesFirst line number (1-based).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description explicitly states that out-of-range numbers are clamped to the file's actual length, which is a key behavioral detail beyond the input schema. Since no annotations are provided, the description adequately fills this gap.

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 description is extremely concise with only two sentences, both providing essential information without any wasted words. The key behavior (clamping) is front-loaded in the second sentence.

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

Completeness3/5

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

Given there is an output schema, the return values don't need explanation. However, the tool reads from a file but doesn't mention error cases (e.g., file not found, permissions), and with 3 required parameters, some context about the range format would be helpful for agents.

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?

The input schema already provides 100% coverage with descriptions for all three parameters, so the baseline is 3. The description adds minimal semantic value beyond confirming the 1-based inclusive range and clamping behavior.

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 specifies the verb 'Read' and the resource 'lines from a file,' and it clarifies the range is 1-based and inclusive. However, it doesn't differentiate from siblings like 'grep' or 'read_file' which also read file content.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus siblings like 'read_file' for the whole file, 'grep' for pattern matching, or other tools. No exclusions or prerequisites are mentioned.

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/jvcaesar/gremlin-mcp'

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