Skip to main content
Glama

read_file

Read-onlyIdempotent

Retrieve source code by line range from a project to answer code questions. Default is 200 lines, max 1000; omit snapshot for current code.

Instructions

Read source to answer code questions; default 200, max 1000 lines. Omit snapshot for current code, use 'previous', or reuse repo_overview's opaque handle for consistent reads. Report code findings, not handles, hashes or synchronization metadata, unless requested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
end_lineNo
snapshotNo
project_idYes
start_lineNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real behavioral context: default 200 and max 1000 lines, snapshot consistency semantics, and output-reporting guidance ("report code findings, not handles, hashes..."). That is more than the annotations provide.

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-loads the purpose, then adds two compact clauses on snapshot semantics and reporting. Dense but every sentence carries information; minor awkwardness in the mid-clause aside, it is appropriately sized.

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-value detail is unnecessary, and the description covers the non-obvious snapshot and line-limit behavior. Given the low schema coverage, project_id and path could be clarified, but an agent has enough to invoke it correctly.

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 0%, so the description must carry the load. It explains snapshot values well and the default/max line count maps to start_line/end_line behavior, but path and project_id are left entirely undocumented. Partial compensation only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Read source") and ties it to a goal ("answer code questions"), which distinguishes it from list_projects, search_code, and get_diff. It references repo_overview's handle, but does not otherwise differentiate itself from siblings that also surface code, so it falls short of a 5.

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

Usage Guidelines3/5

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

Provides condition-based guidance for the snapshot parameter (omit for current, 'previous', or reuse a repo_overview handle), which is genuinely useful. However, it never states when to prefer read_file over search_code or get_diff, so usage relative to alternatives remains implied.

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