Skip to main content
Glama

repo_read

Idempotent

Read a widened window of source text around a citation, from the indexed chunks rather than the filesystem -- works with no shared filesystem between client and server, because chunks have already passed secret-path exclusion and…

Instructions

Read a widened window of source text around a citation, from the indexed chunks rather than the filesystem -- works with no shared filesystem between client and server, because chunks have already passed secret-path exclusion and redaction. Read-only, deterministic, zero side effects. When to use: use after repo_search or repo_neighbours to see more lines around a [cite: path:start-end] citation, with optional context lines each side. When NOT to use: do not use for a path never indexed, or an absolute or '..' path (both are refused); use repo_search or repo_find_symbol to find a valid path first. Output: [cite: path:start-end] header plus the text, bounded in size.

Input Schema

NameRequiredDescriptionDefault
pathYesRepo-relative path exactly as it appears in a [cite: path:start-end] header. Absolute paths and '..' segments are refused.
contextNoExtra lines of context on each side of the range (default 0, max 500).
end_lineNoLast line to read (default: start_line).
start_lineNoFirst line to read (default 1).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A3.7/5.0
Behavior1/5

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

The description asserts 'Read-only, deterministic, zero side effects', but the annotations declare readOnlyHint=false, directly contradicting that claim. It does add real context beyond the annotations (indexed-chunk source, secret-path exclusion and redaction, absolute/'..' paths refused, bounded output), but the explicit read-only claim conflicts with the declared safety profile, which is the exact condition for a 1 here.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is on the long side but tightly structured and front-loaded: purpose, then security rationale, then when/when-not, then output. Each sentence carries information, though the read-only/deterministic/zero-side-effects claim partly duplicates annotation territory and turns out to be unreliable.

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 no output schema, the description does explain the return shape ('`[cite: path:start-end]` header plus the text, bounded in size') and covers security and indexing constraints. It is nearly complete, but the unresolved contradiction with readOnlyHint leaves an agent unsure how much to trust the tool's stated safety properties.

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 all four parameters and their defaults/limits are already documented in the schema. The description reinforces the refusal rule for absolute and '..' paths and restates the optional `context` behavior, but adds no syntax or semantics the schema lacks; 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 first sentence names a specific verb and resource ('Read a widened window of source text around a citation') and adds crucial scope: it reads from indexed chunks, not the filesystem. It cleanly separates itself from repo_search/repo_neighbours by explaining the citation-centered window concept, so an agent can choose it without opening a sibling 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 provides explicit 'When to use' and 'When NOT to use' sections, names the exact trigger ('after repo_search or repo_neighbours' to widen a `[cite: path:start-end]`), and routes invalid paths to repo_search or repo_find_symbol. This is textbook when/when-not/alternative guidance.

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