Skip to main content
Glama

qemu_wait_serial

Read-only

Waits until specified text appears on a QEMU guest's serial console, or times out, so you can confirm a boot stage before sending keystrokes or taking screenshots.

Instructions

Block until text appears on the serial console, or time out.

The reliable way to know a guest reached a boot stage ("login:", "kernel ready", a shell prompt) before typing or screenshotting. Each wait searches only output after the previous successful wait's match, so waiting for "$ " after typing a command finds the NEW prompt, not the one already on screen. The first wait searches from the start of the log (so a marker printed before the call is still found); from_start=True searches the whole log again. Returns the serial tail either way, prefixed FOUND or TIMEOUT. Always checks at least once, even if timeout_s is 0 or negative. poll_interval_s (default 0.25s) must be positive. Each poll reads only the serial log bytes written since the previous poll, not the whole file, so a long wait against a chatty guest doesn't cost ever-more I/O per poll. text must be non-empty.

Input Schema

NameRequiredDescriptionDefault
nameYes
textYes
timeout_sNo
from_startNo
poll_interval_sNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (read-only, non-destructive), and the description adds substantial behavior beyond them: incremental search cursor semantics, from_start reset, FOUND/TIMEOUT prefixing of the returned tail, guaranteed single check for non-positive timeouts, and per-poll incremental I/O. The main gap is that `name` (the target VM) is never explained, so the agent must infer which guest is being waited on.

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?

It is front-loaded with the core contract in the first line, then layers on cursor semantics and parameter constraints in short, purposeful sentences. The closing note on per-poll incremental I/O is informative but is the one sentence least relevant to deciding whether to call the tool.

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 and the description still usefully signals the FOUND/TIMEOUT prefix shape, and it covers timeout and cursor behavior thoroughly for a blocking tool. The unexplained `name` parameter is the only meaningful omission for a 5-parameter definition.

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?

Schema coverage is 0%, so the description carries the load and does well: it constrains `text` to be non-empty, defines from_start as re-searching the whole log, clarifies that timeout_s of 0 or negative still yields one check, and pins poll_interval_s's default and positivity requirement. Only `name` receives no semantic explanation.

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?

The opening sentence states a specific verb and resource: block until `text` appears on the serial console, or time out. It is immediately distinguishable from the sibling qemu_serial (non-blocking read) and qemu_wait_screen (screen rather than console text) because the blocking-on-console-text behavior is explicit.

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?

It gives a clear when-to-use rule: the reliable way to know a guest reached a boot stage before typing or screenshotting. It does not explicitly name the alternative (e.g. qemu_serial for a non-blocking read) or state when not to use it, which keeps it below a 5.

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