Skip to main content
Glama

wait_for_text

Wait for specific text to appear or disappear on screen using OCR polling, returning as soon as the condition is met or reporting a timeout instead of sleeping blindly.

Instructions

Wait until text appears on screen (or, appear=false, disappears) — by OCR/parse polling. The honest replacement for "sleep and hope" after navigation or a submit: returns as soon as the text is (not) there, or reports "timed_out": true.

Returns {"ok", "instance", "found": bool, "satisfied": bool, "elapsed_ms", "polls", "element": {id, type, label, center} | null, "timed_out"}. "satisfied" is what you waited for; "timed_out": true with satisfied: false is reported, not hidden — screenshot to see what IS there. timeout_ms max 60000, interval_ms 300–5000. Fails (isError) if the instance is down or there is no grounding backend (vision mode 'none').

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": {
      "text": "<text>"
    },
    "name": "wait_for_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
appearNo
instanceNo
timeout_msNo
interval_msNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.1

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does well: it discloses polling semantics, that it returns as soon as the condition is met, that `timed_out: true` is reported rather than hidden, and that it fails (isError) when the instance is down or there is no grounding backend (vision mode 'none'). That is real behavioral context beyond the schema, though it does not cover permissions or side effects of polling on a live UI.

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 with the core verb and condition, then bounds, then failure modes. It is somewhat dense and enumerates the return payload even though an output schema exists, but the `found` vs `satisfied` distinction and the timeout guidance earn most of that space.

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?

Covers the wait semantics, timing bounds, timeout reporting, and failure conditions that an agent needs to call this correctly; the output schema removes the need to detail return values further. The main residual gap is the meaning of the `instance` parameter for multi-instance setups.

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 0%, so the description must compensate. It explains `appear`'s inverse meaning and gives hard bounds for `timeout_ms` (max 60000) and `interval_ms` (300–5000), which is genuinely useful. It says nothing about `instance` beyond the default 1, leaving one of five parameters unexplained.

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 action on a specific target: wait until `text` appears on screen, with the inverse mode (appear=false) spelled out. The parenthetical 'by OCR/parse polling' distinguishes it from a blind sleep, so an agent can tell it apart from wait_ms or wait_for_stable without opening a 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?

Explicitly positions itself as 'the honest replacement for "sleep and hope" after navigation or a submit', which gives a concrete when-to-use context and an implied when-not-to (don't use a fixed sleep). It does not name a specific sibling to use instead in edge cases such as waiting for page stability rather than text.

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