Skip to main content
Glama

craftos_wait_for_text

Waits until exact text appears on the terminal or a monitor, returning "found" or timing out—use it to monitor a running program's output.

Instructions

Wait until text appears anywhere on the terminal or one monitor, returning "found", or an error after timeoutMs. Use it to wait for a program's output while it runs; craftos_expect waits too and checks several things (text, rectangles, sim values) in one call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "text": "<text>"
    },
    "name": "craftos_wait_for_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId returned by craftos_session_create.
textYesExact text to find, case-sensitive.
windowNo0 = terminal; see craftos_session_list for monitor windows.
timeoutMsNoGive up after this long.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.7.1
    • addedInput schema / properties / text / description
      Added value: +"Exact text to find, case-sensitive."
    • addedInput schema / properties / timeoutMs / description
      Added value: +"Give up after this long."
  2. First observedv0.7.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare only openWorldHint=false and destructiveHint=false; the description adds the meaningful behavioral facts: it blocks until a match, surfaces "found" on success, and errors out at timeoutMs rather than hanging indefinitely. It stops short of describing polling behavior, what region of output is scanned, or whether multiple matches return the first hit.

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?

Two sentences, both carrying load, with the primary behavior and return value front-loaded before the sibling comparison. Minor clutter from the nested quoting and the parenthetical list of what craftos_expect checks, which is more detail than routing requires.

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 correctly compensates by stating the return value ("found") and the error-on-timeout path. For a 4-parameter, blocking wait tool that is close to sufficient; it omits what the error payload looks like and whether the call reports where the text was found.

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%, so the baseline is 3. The description reinforces the timeout behavior and the terminal-or-one-monitor targeting that window selects, but adds no format details (e.g. matching granularity, whether text can span lines) beyond what the schema already documents.

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 and resource (wait for text), the exact scope (anywhere on the terminal or one monitor), the success return value ("found"), and the failure mode (error after timeoutMs). It also distinguishes the tool from the sibling craftos_expect, so an agent can pick correctly without opening either schema.

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?

"Use it to wait for a program's output while it runs" gives a clear usage context, and craftos_expect is named as a sibling that also waits but bundles multiple checks per call. The gap is that it doesn't say explicitly when the bundled checks of craftos_expect make it the better choice over repeated waits, leaving that tradeoff to inference.

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