Skip to main content
Glama

wait_for

Pauses automation until a UI element matching given text or resource ID appears, with a configurable timeout, so scripts can synchronize with screen changes.

Instructions

Wait until an element whose label (text or content description) contains text, and/or with resource id resource_id, appears.

Input Schema

NameRequiredDescriptionDefault
textNo
timeoutNo
resource_idNo
observe_afterNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and leaves out the most consequential details: what happens when the timeout elapses (exception, false, silently continue), whether the tool polls, and what observe_after actually toggles. It only states the waiting condition.

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, which is the right size for a simple wait primitive. The 'and/or' construction is the one piece of wording that costs clarity rather than saving space.

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?

An output schema exists, so return values need not be described. However, for a blocking/conditional tool with zero annotation coverage and no documented parameters, the definition is missing timeout semantics and the effect of observe_after, which an agent needs before calling it reliably.

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 coverage is 0%, so the description must compensate for all four parameters. It adds real meaning for `text` ('label ... contains', matching text or content description) but says nothing about `timeout` (units, default 5, failure mode) or the non-obvious `observe_after` boolean.

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?

The description gives a specific verb ('wait until ... appears') plus the matching criteria (label text or resource id), which is enough to distinguish it from wait_idle in the sibling list by inference. It stops short of explicitly naming that sibling or stating that no other tool blocks on a specific element.

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?

There is no guidance on when to prefer this over wait_idle or observe, nor on what to do if the element never appears. The 'and/or' phrasing also leaves the agent unsure whether both criteria are ANDed or ORed when both are supplied.

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