Skip to main content
Glama

pio_monitor_read

Read new serial output from an active PlatformIO monitor session. Use a regex to wait for specific messages or set a timeout to fetch at least one new line.

Instructions

Read new serial lines from a session since cursor (start at 0) and get the next cursor back. Set wait_for to a regex to block up to timeout_s until a matching line arrives (e.g. wait_for='setup done|Guru Meditation'). Without wait_for and with timeout_s>0 it waits for at least one new line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNo
wait_forNo
max_linesNo
timeout_sNo
session_idYes

Output Schema

TableJSON 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?

With no annotations, the description carries the behavioral transparency burden. It discloses the cursor-based incremental read model, the blocking behavior with wait_for, the timeout_s role, and the behavior when wait_for is omitted. These are meaningful behavioral details beyond the schema, though it does not mention edge cases like invalid session ids or what happens on timeout.

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 two sentences with no filler. It front-loads the core action and cursor contract, then provides targeted parameter usage examples. The regex example adds concrete value without bloating the text.

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 tool with 5 parameters and an output schema, the description covers the non-obvious behavioral aspects well enough to guide correct use. It leaves max_lines to be inferred from the schema and does not mention session lifecycle dependencies, but these are minor gaps given the output schema exists and the core reading semantics are clearly explained.

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%, so the description must compensate. It adds meaning for cursor, wait_for, and timeout_s, including regex behavior and waiting semantics. However, it does not describe max_lines, and session_id is only implicit from the context, so not all parameters receive equivalent semantic clarification.

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 clearly states the primary action: 'Read new serial lines from a session since cursor' and explains the cursor-return contract. It is specific about the resource (serial session) and verb (read), but it does not explicitly differentiate it from sibling tools like pio_monitor_capture or pio_monitor_write beyond the term 'read'.

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 gives useful operational guidance for parameters like wait_for and timeout_s, such as blocking until a regex matches. However, it does not explicitly state when to prefer this tool over alternatives like pio_monitor_capture or pio_monitor_write, leaving the usage context mostly implied from the tool name.

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