Skip to main content
Glama

read_lines

Retrieve captured serial output oldest-first with sequence numbers. Use after_seq to fetch only newer lines, grep to filter by regex, and wait_seconds to block for fresh output after a command.

Instructions

Return captured lines (oldest first, newest last) with sequence numbers.

Use after_seq to fetch only output newer than your last read, grep for a regex filter (e.g. "error|warn"), and wait_seconds to block briefly for fresh output after a command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grepNo
portYes
after_seqNo
max_linesNo
wait_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It discloses ordering, sequence numbers, and that wait_seconds blocks briefly for fresh output (default non-blocking), which is useful. It omits critical traits: whether reading consumes/clears the captured buffer (directly relevant given the clear_buffer sibling), and how max_lines truncation behaves when the buffer holds more lines than requested.

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 return contract (what is returned, in what order) before parameter guidance, and the whole description is two short paragraphs with no filler. Slightly dense in the second sentence but every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 re-explained, which helps. Still, for a 5-parameter tool with no annotations and 0% schema coverage, the description leaves port and max_lines unexplained and never states whether reads are non-destructive or how they interact with the buffer's lifecycle.

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% for 5 parameters, so the description must compensate. It explains three of them well: grep as a regex filter with an example, after_seq as a cursor for newer output, and wait_seconds as a blocking window. The required 'port' and the impactful 'max_lines' are left undocumented, leaving a partial gap.

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 (Return) plus resource (captured lines) and adds ordering semantics (oldest first, newest last) with sequence numbers. This is clearly distinguishable from siblings like clear_buffer and write_line. It does not explicitly name an alternative, but the read semantics are unambiguous.

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?

The second sentence gives real usage guidance for the parameters ('after_seq to fetch only output newer than your last read', 'wait_seconds to block briefly for fresh output after a command'), which implies when to use incremental reads. However, it never states when to use read_lines versus clear_buffer or how it relates to open_port, so tool-selection guidance is only implied.

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