Skip to main content
Glama

Wait for

wait_for

Poll the macOS UI tree until a selector appears or timeout, enabling automation to synchronize with dynamic interface states.

Instructions

Poll the UI tree until a selector appears, or time out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pollMsNoDefault 100.
windowNo
selectorYes
timeoutMsNoDefault 5000.
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It discloses the polling behavior and timeout, which is useful. However, it does not specify what happens on timeout (error vs. return value), whether it blocks, or whether it returns the matching element. These gaps are significant 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?

The description is a single sentence with no extraneous words. It is front-loaded with the core action and condition, making it immediately scannable. There is zero redundancy.

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?

With four parameters, no output schema, and no annotations, the description leaves critical gaps: return value, timeout behavior, selector semantics, and window usage. The tool is not fully usable without additional documentation or inspection of the schema, which is only partial.

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?

The schema only describes pollMs and timeoutMs with defaults (50% coverage), leaving selector and window unexplained. The description's phrase 'until a selector appears' hints at selector's role but does not clarify its format (e.g., CSS vs. XPath) or the window parameter's purpose. Since the required parameter selector is undocumented, the tool is hard to call correctly.

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?

The description states a specific verb ('Poll') and resource ('UI tree') with a clear condition ('until a selector appears, or time out'). It distinguishes itself from siblings like get_ui_tree (which retrieves immediately) and click/type (which act on elements), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., a window must be active) nor does it contrast with get_ui_tree or polling approaches. An agent must infer that it's for waiting on UI elements, but the description never explicitly states when it should be chosen over others.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thangduonghuu/macos-ui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server