Skip to main content
Glama

read_repository_file

Read a specific line range from an indexed repository file to inspect exact implementation details without loading entire large files into context.

Instructions

Read a specific line range from a file indexed in the local repository vault.

Use this after search_my_repositories or get_project_blueprint to inspect exact implementation details without loading entire large files into the context window.

Args: repo_name: Exact repository name. file_path: Relative file path inside the repository. start_line: 1-based inclusive start line (default 1). end_line: 1-based inclusive end line (default 200).

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": {
      "repo_name": "<repo_name>",
      "file_path": "<file_path>"
    },
    "name": "read_repository_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_lineNo
file_pathYes
repo_nameYes
start_lineNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations at all, the description must carry the full behavioral burden. It discloses the read-only intent implicitly ('Read'), the partial-read behavior via line ranges, and the context-window motivation, but says nothing about how missing files, unindexed paths, or out-of-range line numbers are handled.

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 purpose, then usage context, then a compact args list. No filler sentences; the args lines earn their place by adding semantics the bare schema lacks.

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?

An output schema exists, so return values need not be described, and the main call path is fully specified. Gaps remain around error conditions and whether unindexed files can be read, which matter for a file-access tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the Args section does real work: it clarifies repo_name must be exact, file_path is relative to the repository root, and start_line/end_line are 1-based inclusive with defaults of 1 and 200. It does not cover behavior when end_line exceeds file length or when start_line > end_line.

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 ('Read a specific line range from a file') plus the scope qualifier 'indexed in the local repository vault.' The line-range framing and the reference to search_my_repositories/get_project_blueprint make it distinguishable from sibling tools that locate or summarize repositories.

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 explicit sequencing guidance ('Use this after search_my_repositories or get_project_blueprint') and explains the reason: inspecting exact implementation details without loading entire large files. It lacks an explicit when-not clause, but the usage context is clear.

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