Skip to main content
Glama

read_text_lines

Read a bounded range of numbered lines from a UTF-8 text file to inspect specific areas around search results or errors without loading the whole file.

Instructions

Read a bounded range of numbered lines (1-based, up to 100 lines) from a UTF-8 text file inside the configured Owner read roots. Use when you need specific lines (for example around a line number from search_code results or an error message) rather than the whole file. For whole small files use read_text_file; for byte-based paging of large files use read_text_page. Read-only; no approval window.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "read_text_lines"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the target within the already-configured Owner read/edit roots; path alone grants no access.
max_linesNoMaximum line count, 1 to 100; default 50.
start_lineNoFirst 1-based line to read (1 to 1000000); default 1.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key traits: read-only, no approval window, confined to configured Owner read roots, and a hard 100-line cap. It does not cover failure behavior (missing file, start_line past EOF, non-UTF-8 content), which is the main remaining 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?

Three sentences, front-loaded with the core action and bounds, then the use case, then the sibling routing. Every clause carries information; there is no filler.

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

Completeness5/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 semantics need not be explained. For a three-parameter read tool with full schema coverage, the description covers scope, limits, safety profile, and alternatives — nothing an agent needs is missing.

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 path, max_lines, and start_line are already fully documented with defaults and ranges. The description's '1-based, up to 100 lines' restates schema constraints rather than adding new meaning, so the baseline 3 applies.

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 states a specific verb and resource ('Read a bounded range of numbered lines ... from a UTF-8 text file'), plus hard scope limits (1-based, max 100 lines, Owner read roots). It explicitly distinguishes itself from read_text_file and read_text_page, so an agent can pick it without opening a schema.

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?

It gives an explicit when-to-use trigger ('when you need specific lines ... around a line number from search_code results or an error message') and names two alternatives with the conditions that select them (whole small files, byte-based paging of large files). Nothing is left to inference.

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