Skip to main content
Glama

Serial Read

serial_read
Read-onlyIdempotent

Reads buffered lines from a serial monitor session, returns a cursor for incremental reads, and flags data dropped between reads.

Instructions

Read buffered lines from a serial monitor session.

Returns {lines, new_cursor, eof, dropped}. dropped counts lines that aged out of the 10k-line ring buffer between reads, so a value > 0 means you missed data.

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": {
      "session_id": "<session_id>"
    },
    "name": "serial_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_linesNoCap on the lines returned.
session_idYesId from `serial_open`.
since_cursorNoOmit to get everything since your last `serial_read` (an advancing cursor). Pass `since_cursor=N` to re-read from a specific point, or `since_cursor=0` to read from the start of the in-memory buffer.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnly/destructive annotations, the description discloses the 10k-line ring buffer and the meaning of `dropped > 0` (data loss between reads), which is genuinely useful behavior an agent cannot infer from annotations. One tension: the advancing default cursor means repeated identical calls return different data, which sits awkwardly beside idempotentHint=true, but the description does signal statefulness ('between reads').

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?

Two sentences, front-loaded with the action, then the return shape and the one non-obvious field. No filler or repeated annotation content.

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 read tool with annotations and an output schema, this covers what an agent needs: return fields, cursor persistence, and buffer-overflow semantics. Minor gaps: `eof` is unexplained (arguably covered by the output schema) and the description spends a little space restating the return shape the schema already defines.

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%, and the schema already explains max_lines, session_id, and the since_cursor modes in detail, so the description adds nothing parameter-specific. Baseline 3 is appropriate when the schema carries the full parameter burden.

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?

The description opens with a specific verb+resource: 'Read buffered lines from a serial monitor session,' which is unambiguous about what the tool returns. It does not name or differentiate itself from siblings such as serial_open or serial_close, though the schema's 'Id from `serial_open`' reference implies the workflow ordering.

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?

Usage is only implied: the tool reads from an already-open session, and the schema note about the advancing cursor explains re-read behavior. The description itself gives no explicit when-to-use, prerequisites, or when-not-to-use (e.g., whether the session must be kept open by serial_close).

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