Skip to main content
Glama
gurul
by gurul

wait_for_pattern

Block until a regex pattern appears in new device output or times out. Use after flashing to confirm expected log lines appear.

Instructions

Block until PATTERN (regex) appears in NEW device output, or time out.

The behavioral-verification primitive: after flashing, assert the expected log line actually appears instead of assuming success. Max timeout 120s.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYes
sessionNo
timeout_sNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses blocking semantics, that only NEW output is matched (a real gotcha), and a 120s timeout cap. However, it never says what happens on timeout (error, empty result, or false) or whether the call blocks the session, leaving a notable behavioral gap.

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 tight sentences, front-loaded with the core action and constraint ('Max timeout 120s') before the conceptual justification. Every sentence earns its place.

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 documented. Still, for a blocking primitive the absence of timeout-result behavior and any hint about the 'session' parameter leaves an agent guessing about edge cases.

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 coverage is 0%, so the description must compensate. It adds real value for 'pattern' (regex) and 'timeout_s' (max 120s, beyond the schema's bare default of 30), but the 'session' parameter is entirely unexplained in both schema and description.

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 precise verb+resource+scope: blocking wait for a regex PATTERN in NEW device output. The 'NEW output' qualifier implicitly separates it from history-reading siblings like query_logs, but no sibling is named explicitly.

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

Usage Guidelines4/5

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

Gives a concrete when-to-use scenario ('after flashing, assert the expected log line actually appears instead of assuming success'), which is strong context. It stops short of naming alternatives or when NOT to use it (e.g. checking already-emitted logs via query_logs).

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