Skip to main content
Glama

read_lines

Read-only

Retrieves exact numbered lines from a file in an indexed repo so you can open a citation in full before quoting or editing, since search results are trimmed snippets.

Instructions

Exact, numbered lines from a file in an indexed repo. Use this to open a citation in full before quoting or editing it, since search results are trimmed snippets. Refuses paths outside the repo.

Input Schema

NameRequiredDescriptionDefault
endYesLast line to return (inclusive).
pathYesThe file, relative to the repo root, as a citation shows it.
repoNoName of an indexed repo, as list_repos shows it. Leave out when only one repo is indexed.
startYesFirst line to return (1-based).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.1
    • addedInput schema / properties / end / description
      Added value: +"Last line to return (inclusive)."
    • addedInput schema / properties / path / description
      Added value: +"The file, relative to the repo root, as a citation shows it."
    • addedInput schema / properties / repo / description
      Added value: +"Name of an indexed repo, as list_repos shows it. Leave out when only one repo is indexed."
    • addedInput schema / properties / start / description
      Added value: +"First line to return (1-based)."
  2. First observedv0.2.0

TDQS

A4.2/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 the description only needs to add constraints. It does so usefully by stating the tool 'Refuses paths outside the repo', which tells the agent a sandbox boundary exists and invalid paths will error rather than silently resolve. Return-format detail is delegated to the output schema, which is appropriate.

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 short sentences, purpose front-loaded, followed by the use condition and then the safety constraint. No filler and nothing repeated from structured fields.

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?

With annotations and an output schema present, the description covers purpose, trigger, and the repo-boundary constraint, which is enough to call the tool correctly. It leaves unaddressed edge behavior such as out-of-range start/end values or any cap on range size, a minor gap for a read tool.

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, start, end, and repo are all already documented in the schema, including 1-based indexing and the inclusive end. The description adds no extra syntax or range semantics beyond that, so the baseline of 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?

States a specific verb and resource ('Exact, numbered lines from a file in an indexed repo') and scopes it to a repo. It also distinguishes itself from the snippet-based search sibling by noting that 'search results are trimmed snippets'.

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

Usage Guidelines4/5

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

Gives a concrete trigger for use: open a citation in full before quoting or editing it. The alternative (search snippets) is implied clearly, but there is no explicit when-not-to-use guidance, such as preferring search for discovery.

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