Skip to main content
Glama
N0moreher0
by N0moreher0

Read file ranges

project_read_ranges
Read-only

Read up to 16 disjoint line ranges from the same file in one call to avoid repeated round-trips when gathering targeted segments.

Instructions

Read multiple disjoint line ranges of the SAME file in a single call (max 16 ranges). Use when: you need several disjoint segments of one file (e.g. around search hits) without multiple round-trips. Avoid when: you need the whole file (project_read_file) or different files (project_read_batch). Speed: fast; reuses the per-range read_file cache. Output: file_read_ranges: ranges[] with text/truncated/next_start_line. Batch-safe: no

Input Schema

NameRequiredDescriptionDefault
rangesYes
relative_pathYesPath inside the workspace (relative, or absolute inside the workspace)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

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

Goes beyond the readOnlyHint/openWorldHint annotations by disclosing the range cap, cache reuse ('reuses the per-range read_file cache'), the response shape (text/truncated/next_start_line), and 'Batch-safe: no'. It stops short of covering edge behavior such as overlapping ranges or what happens when start_line exceeds file length, so it is strong but not exhaustive.

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?

Compact, front-loaded, and organized into labeled clauses (Use when / Avoid when / Speed / Output / Batch-safe). Each line carries information an agent needs; there is no filler.

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 usefully summarizes the return shape, and read-only safety is covered by annotations. The remaining gap is parameter-level behavior for the nested range objects and how truncation/next_start_line should be followed, which an agent may still have to discover by trial.

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 coverage is 50%: relative_path is documented in-schema, while the nested range fields (start_line, end_line, max_bytes) have no descriptions anywhere. The description adds the 16-range limit and mentions next_start_line in the output, but never explains that end_line/max_bytes are optional or how omitted bounds are treated, so it only partially compensates for the gap.

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 multiple disjoint line ranges of the SAME file in a single call') with the hard cap of 16 ranges baked in. The capitalized SAME file immediately distinguishes it from project_read_batch, which handles different files.

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?

Explicit 'Use when' (several disjoint segments of one file, e.g. around search hits, avoiding round-trips) and 'Avoid when' clauses that name the correct alternatives by name: project_read_file for whole files and project_read_batch for multiple files. Nothing is left to inference.

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