Skip to main content
Glama

repo_read

Idempotent

Read expanded source text around a citation from indexed chunks, not the filesystem. Use after a code search to view more lines around a citation, with optional context lines.

Instructions

Read a widened window of source text around a citation, from the indexed chunks rather than the filesystem -- works over HTTP, from a different machine, with no shared filesystem, 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

TableJSON 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.8/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, i.e. the tool may modify its environment. That is a same-axis conflict between the prose and the structured hints, so an agent gets contradictory safety signals. The description does add genuinely useful context (indexed chunks have passed secret-path exclusion and redaction, absolute/'..' paths are refused), but the direct contradiction caps this dimension.

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?

Front-loaded with the core action and scope, then cleanly segmented into when-to-use, when-not-to-use, and output. Slightly dense in the opening clause about HTTP/no-shared-filesystem, but every sentence carries information an agent needs.

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?

With no output schema, the description supplies the return shape ('[cite: path:start-end]' header plus bounded text), the error conditions (refused paths), and the workflow placement relative to repo_search/repo_neighbours. Nothing essential for correct invocation 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/context/start_line/end_line are already documented with defaults and the 500-line cap. The description adds only the path-provenance rule (must match a [cite: path:start-end] header) and the refusal behavior, which is baseline-level value over an already complete schema.

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+resource (read a widened window of source text around a citation) and immediately scopes it ('from the indexed chunks rather than the filesystem'). It explicitly distinguishes itself from sibling tools repo_search and repo_neighbours, so an agent can route correctly without opening any 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?

Provides explicit 'When to use' (after repo_search or repo_neighbours to expand a [cite: path:start-end]) and 'When NOT to use' (never-indexed path, absolute or '..' path), plus the named fallbacks repo_search and repo_find_symbol. Both the positive and negative conditions are spelled out, not implied.

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