Skip to main content
Glama

serial_read

Read-onlyIdempotent

Retrieve new lines from a serial port since the last read, waiting up to a specified time for fresh data to avoid empty responses.

Instructions

Return lines captured since the previous serial_read (tail-follow semantics). Waits up to wait_ms for fresh data instead of returning empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoSerial port name, e.g. COM5 or /dev/ttyUSB0
wait_msNoWait this long for at least one new line (default 0)
max_linesNoCap on returned lines (default 200)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior1/5

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

The description states 'tail-follow semantics' and 'since the previous serial_read', implying a stateful, non-idempotent operation. However, annotations declare idempotentHint: true, which contradicts this behavior. This is a direct conflict, so the score is 1 per the contradiction rule.

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?

The description is a single, front-loaded sentence that delivers the core behavior (tail-follow) and the wait logic immediately. No fluff or redundant information; it is concise and to the point.

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?

For a simple read tool, the description covers the essential behavior: what is returned, the tail-follow semantics, and the waiting behavior. It does not explicitly mention max_lines or what happens after a wait with no data, but these are covered by the schema. The main gap is the contradiction with idempotentHint, which is an annotation issue rather than a description completeness issue.

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?

The schema has 100% coverage with descriptive parameter definitions. The description adds minimal extra meaning, mostly reinforcing the wait_ms behavior ('Waits up to wait_ms for fresh data'), but does not add significant new semantic detail beyond the schema.

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?

The description clearly states the action (return lines) and the resource (lines captured since previous call), with explicit 'tail-follow semantics' that distinguishes it from sibling read tools like serial_get_recent or serial_wait_for. The verb and resource are specific, and the stateful nature is evident.

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 description implies when to use it (to read new lines incrementally) but does not explicitly contrast with alternatives or state when not to use it. It mentions tail-follow, which hints at usage, but lacks explicit exclusions or conditions compared to other read tools in the sibling list.

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