Skip to main content
Glama

Wait for an element

wait_for
Read-onlyIdempotent

Pause execution until an element matching label/value text or role appears, or with gone=true disappears, then return a fresh observation.

Instructions

Wait until an element whose label or value contains text (optionally of a role) appears, or disappears with gone=true. Returns a fresh observation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNo
goneNoWait until the element disappears instead
textNoWait for an element whose label or value contains this
ref_roleNoOnly elements of this role (e.g. 'button')
window_idNo
timeout_msNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds that the call yields a fresh observation and the gone=true semantics, but says nothing about blocking behavior, timeout expiry (the schema caps timeout_ms at 30000), or what happens when the wait fails.

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 tight sentences with no filler; the primary appear-mode is front-loaded and the gone=true variant follows immediately, making it easy to scan.

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

Completeness5/5

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

An output schema exists, so the return value need not be spelled out, and the description still notes it returns a fresh observation. Combined with annotations covering the safety profile, the definition is sufficient for an agent to call this correctly, with only minor gaps around timeout failure behavior.

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 50%: text, gone and ref_role are documented in the schema, and the description reinforces text/role/gone. However, app, window_id and timeout_ms carry no descriptions anywhere, and the description does not compensate by explaining scoping or timeout semantics beyond the default value.

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 and resource ('wait until an element ... appears') plus the inverted mode via gone=true, so the core purpose is unambiguous. It does not differentiate itself from siblings like locate or observe, even though the 'returns a fresh observation' phrasing hints at overlap with observe.

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?

Usage is implied by the wording: use it to wait for an element to appear or, with gone=true, to disappear. There is no explicit when-not guidance, no mention of locate/observe as alternatives, and no statement about what to do if the element never arrives.

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