Skip to main content
Glama

read_lines

Read-only

Reads a specified range of up to 150 numbered lines from an approved text file, enabling bounded inspection without loading the entire file.

Instructions

Read at most 150 numbered lines of a scoped text file

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": {
      "path": "<path>",
      "start": "<start>",
      "end": "<end>"
    },
    "name": "read_lines"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYes
pathYesAbsolute path under configured approved roots
startYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds the meaningful 150-line cap and notes lines are numbered, but says nothing about what happens when the range exceeds 150 (truncation vs. error), whether end is inclusive, or how line numbers are emitted.

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?

A single twelve-word sentence with the cap front-loaded and zero filler. Nothing is redundant or out of order.

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?

This is a simple three-parameter read tool with full annotation coverage and no output schema, so the description needs only scope and limits. It covers both, with only minor gaps around boundary/truncation behavior.

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 only 33% — only 'path' is documented, while 'start' and 'end' are bare integers. The description partially compensates by implying these are line numbers and that a call spans at most 150 lines, but it never clarifies 1-based indexing, end inclusivity, or the behavior at the 150-line boundary.

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 ('Read') and resource ('numbered lines of a scoped text file') with a hard cap of 150 lines, which distinguishes it from a whole-file reader like read_text_file. It stops short of naming any sibling explicitly, so the differentiation is inferred rather than stated.

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

Usage Guidelines2/5

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

The description supplies no when-to-use guidance, no prerequisites, and no indication of when read_text_file, search_text, or a command-based alternative would be preferable. Only the implicit line-range scope hints at appropriate usage.

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