Skip to main content
Glama

serial_wait_for

Read-only

Wait for a regex match in serial output without sending data. Use it to detect expected prompts, login prompts, or log lines while observing a device.

Instructions

Wait for a regex in serial output without sending. Use when you know the text to expect (a prompt, login:, a log line). Works for observers. Ends early on a critical anomaly ([ABORTED anomaly:...]). Open-ended listening: serial_monitor. Output that already arrived: serial_output_history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesRegex to match in device output (listen-only; no TX).
timeout_msNoMax wait in ms (default 30000, clamp 100–3600000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: it transmits nothing ('no TX', 'Works for observers') and terminates early on a critical anomaly ('[ABORTED anomaly:...]'). It does not describe the return value on a normal timeout, which keeps it short of a 5.

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?

Four compact sentences, front-loaded with the core action, then usage, then behavior, then alternatives. No filler or restatement of the tool name.

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?

No output schema exists, so the description carries the return-shape burden; it partially covers this by noting early termination on anomalies, and the timeout semantics live in the schema. The only gap is what a successful match returns to the caller.

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 both parameters are fully documented in the schema, including the default and clamp range for timeout_ms. The description adds no syntax or format detail beyond what the schema provides, so baseline 3 applies.

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?

States a specific verb ('wait for') and resource ('a regex in serial output') plus a distinguishing constraint ('without sending'), which separates it from siblings like serial_read and serial_monitor. The parenthetical examples (prompt, login:, log line) make the trigger condition concrete.

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

Usage Guidelines5/5

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

Explicitly says when to use it ('when you know the text to expect') and routes two named alternatives: 'Open-ended listening: serial_monitor' and 'Output that already arrived: serial_output_history.' Both siblings exist in the tool list, so the routing is actionable.

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