Skip to main content
Glama
dwgx

SmartCLI

by dwgx

wait_ready

Read-onlyIdempotent

Waits for a regex marker or a quiet, stable screen, then snapshots the terminal so agents know when a program is ready to interact with.

Instructions

Wait for a regex marker OR for the screen to go quiet (stable), then snapshot. Use marker="" to wait purely for stability.

Returns a snapshot plus reason: "MARKER" (the regex appeared), "STABLE" (the screen went quiet), "TIMEOUT", or — only on a session started with detect_child_exit — "EXITED" (the child died; the wait returned at once rather than running to max_wait_ms). exited reports the same fact as a boolean on every wait tool. Timeout is not an error: the call still returns ok=true with the final screen snapshot. Screen lines are right-padded with spaces — end-anchored markers never match; use unanchored markers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidYes
markerNo
quiet_msNo
max_wait_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them: it enumerates the `reason` outcomes (MARKER/STABLE/TIMEOUT/EXITED), clarifies that timeout is not an error and still returns ok=true, explains the `exited` boolean, and warns that right-padded screen lines break end-anchored markers.

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?

The core behavior and the marker="" tip are front-loaded in the first two lines, and the return-value discussion follows logically. The parenthetical EXITED clause is slightly dense, but every sentence adds distinct information.

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?

With no output schema, the description must explain returns, and it does so thoroughly via the `reason` enum and `exited` boolean. The remaining gap is operational detail on the timing parameters and the session id, which the agent must guess from names.

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 burden and largely does: it defines `marker` as a regex with the empty-string stability mode, and references `max_wait_ms` (the wait bound) and the stability concept behind `quiet_ms`. Only `sid` and explicit units/defaults for the two timing params are left undocumented.

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 states a specific dual-capability verb: wait for a regex marker OR for screen stability, then snapshot. This implicitly distinguishes it from wait_regex (marker only) and wait_change/wait_visual_change (change-based), but it never names those siblings explicitly, so differentiation requires inference.

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?

'Use marker="" to wait purely for stability' is a concrete configuration directive, but it explains parameter usage rather than when to choose wait_ready over wait_regex, wait_any, or a plain snapshot. No when-not conditions or alternatives are given, so guidance is implied rather than explicit.

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