Skip to main content
Glama

Read an exact line range from a raw doc file

read_lines
Read-only

Read an exact line range from a raw RedM/RDR3 doc file by absolute line number — the windowed-read companion to grep_docs. When grep_docs returns a hit at path:line inside a large file, call read_lines({ path, start, end }) to pull the surrounding block. This is the ONLY way to read around a hit in the largest rdr3_discoveries data tables (audio_banks, ingameanims_list, ptfx, soundsets, imaps_with_coords, megadictanims, etc.): their full bodies are NOT in the vector/heading index (only an ~80-line preview is), so semantic_search can't reach them and get_document resolves real section headings only — NOT synthetic lines N-M offsets. start/end are 1-based and inclusive; omit end for a 50-line window; one call returns at most 400 lines (narrow the range for more). For prose .md docs prefer get_document with a heading; to search values use grep_docs; for individual script natives use lookup_native.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoLast line to return (1-based, inclusive). Omit for a 50-line window from `start`. Spans over 400 lines are capped.
pathYesDoc path exactly as returned by `grep_docs` / `browse` / `semantic_search`, e.g. `discoveries/audio/audio_banks/audio_banks.lua`. Do not invent paths.
startYesFirst line to return (1-based, inclusive). Use the line number from a `grep_docs` hit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / end / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / start / maximum
      Added value: +9007199254740991
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only and non-destructive safety. The description adds critical behavioral context beyond that: full bodies of the largest rdr3_discoveries tables are not in the vector/heading index (only an ~80-line preview), get_document cannot resolve synthetic 'lines N-M' offsets, and calls are capped at 400 lines. This is exactly the kind of non-obvious behavior an agent needs.

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?

The description is long but front-loads the core action and workflow, then moves to alternatives and constraints. Most sentences earn their place by preventing specific failure modes, though the density could be trimmed slightly without losing essential guidance.

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?

For a complex retrieval tool with no output schema, the description is complete: it explains what the tool returns, how to select ranges, hard limits, why competing tools fail for this use case, and exactly when to use it relative to a large sibling set.

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 the schema already documents 1-based inclusive start/end, the 50-line default window, and the 400-line cap. The description largely restates these semantics and does not add new parameter syntax or format details beyond tying start to a grep_docs hit line number. Baseline 3 is appropriate.

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 with scope ('Read an exact line range from a raw RedM/RDR3 doc file by absolute line number') and explicitly names it as the windowed-read companion to grep_docs. It is easily distinguishable from all siblings.

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 guidance tied to a concrete workflow ('When grep_docs returns a hit at path:line... call read_lines') and names alternatives with conditions: get_document for prose .md headings, grep_docs for searching values, lookup_native for script natives. Also explains why semantic_search and get_document cannot substitute here.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources