Skip to main content
Glama

ui_wait

Read-only

Polls a window until a control containing specified text appears or disappears, replacing fixed sleeps in Windows UI automation.

Instructions

Poll a window until a control containing text appears (or, with gone, disappears). Use instead of sleeping.

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

Input Schema

NameRequiredDescriptionDefault
goneNowait for it to disappear
textYestext to wait for
titleYespart of the window title (case-insensitive; an exact title wins) or a handle from list_windows (0x...)
timeout_msNodefault 10000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description usefully adds that the call blocks by polling rather than returning immediately. However, it never says what happens when the condition is not met — whether it raises, returns a failure value, or how timeout_ms surfaces — which is the key behavioral question for a polling tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core polling behavior and the gone variant, with zero filler. Nothing could be removed without losing meaning.

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

Completeness3/5

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

For a simple blocking tool with full schema coverage and read-only annotations, the essentials are present, and no output schema exists to explain. The gap is the outcome on timeout and the observable change caused by the call, which an agent needs to branch on afterwards.

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 100%, so the baseline is 3, but the description adds real meaning: matching is a containment test on a control's text, not an exact title match. The parenthetical also clarifies gone as an inverted wait condition, which the schema only states tersely as "wait for it to disappear".

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?

"Poll a window until a control containing text appears (or, with gone, disappears)" gives a specific verb (poll), resource (window), and the exact condition that ends the wait. It is clearly distinct from a plain tree/window inspection call, though it does not name a sibling to contrast against.

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 instead of sleeping" is an explicit, actionable usage rule that tells the agent when this tool is the right choice over an ad-hoc delay. It stops short of stating when-not-to-use or naming an alternative such as ui_tree for one-shot inspection.

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