Skip to main content
Glama

cua_wait_for

Waits until specified on-screen text, UI element, app window, or visual screen change appears, so desktop automation can synchronize before acting.

Instructions

Smart wait until on-screen text appears (Offline OCR), an Accessibility/UIA element appears, an app window opens, or the screen visually changes.

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": {
      "condition": "<condition>"
    },
    "name": "cua_wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueNo
app_nameNo
conditionYes
timeout_secNo
poll_intervalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does add real behavioral context beyond the schema: the OCR is offline/local, waiting is 'smart' (i.e. polling internally), and the four trigger types. However it never says what happens on timeout (return, raise, or empty result), nor what value is returned on success, which are critical for a blocking wait primitive.

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?

A single front-loaded sentence with no filler; the condition list is the most useful information and comes first. The parenthetical '(Offline OCR)' is slightly awkward inline, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter blocking tool with no annotations and no output schema, the definition should explain the return value and timeout semantics, and should clarify how 'value' and 'app_name' interact with each condition mode. None of that is present, leaving an agent unable to predict what it gets back on success or failure.

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

Parameters2/5

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

Schema description coverage is 0%, so all five parameters rely on the description, and it only implicitly explains 'condition'. The meaning of 'value' (the text/element to look for?), 'app_name' (scope the wait to a specific window?), 'timeout_sec', and 'poll_interval' is left entirely to name inference, which is risky given the four heterogeneous modes.

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 ('wait until') plus the four concrete conditions it can block on, and the phrasing maps almost one-to-one onto the 'condition' enum values (text, element, window, screen_change). It does not distinguish this tool from siblings like cua_find_elements or cua_ocr, which could also be used to detect on-screen content, so it falls short of a 5.

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?

The word 'wait' and the enumerated conditions imply the use case (blocking until something renders or changes), but there is no explicit statement of when to prefer this over cua_find_elements/cua_ocr polling, nor any note about when not to use it. Guidance is inferable rather than stated.

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