Skip to main content
Glama

wait_for_console_pattern

Wait for a regex pattern in a UART console stream, checking history first, then blocking until match or timeout. Ideal for detecting boot messages, login prompts, or errors after reset.

Instructions

Wait for a line matching regex pattern in target UART console stream.

First checks recent buffer history (unless check_history=False). If not found, blocks until matching line appears or timeout expires. Ideal for waiting for bootloader, kernel messages, login prompts or errors after reset.

Args: pattern: Regular expression to match (e.g. 'login:', r'(?:[$#]\s*$|\w+@\w+:.[$#]\s)', or 'kernel panic'). timeout: Maximum seconds to wait (default: 30.0s). check_history: If True, inspect recent buffered lines first before waiting for new lines (default: True).

Input Schema

NameRequiredDescriptionDefault
patternYes
timeoutNo
check_historyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations, so the description carries the full load and does well: it discloses the history-check-first behavior, the blocking-until-match semantics, and the timeout bound. It stops short of saying what happens on timeout (error vs. empty result), leaving one 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose sentence followed by a short behavioral paragraph and a clean Args block. Every line earns its place; the regex example in the Args is slightly verbose but useful.

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?

An output schema exists, so return values needn't be re-explained, and the description covers purpose, blocking behavior, history handling, and each parameter. The only residual gap is timeout-failure semantics, which is minor for a well-typed 3-param tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well: it explains check_history's meaning (inspect buffered lines before waiting), gives regex examples for pattern, and restates the timeout default. Only minor value-add beyond type/default repetition keeps it from a 5.

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 specific verb+resource+scope: waiting for a regex-matched line in the target UART console stream. An agent can distinguish it from read_target_console (non-blocking read) and send_target_command, though the description never explicitly contrasts with those siblings.

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 concrete when-to-use context: 'Ideal for waiting for bootloader, kernel messages, login prompts or errors after reset.' It also explains the history-vs-new-lines decision via check_history, but never states when NOT to use it or names an alternative sibling.

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