Skip to main content
Glama

Wait for

wait_for
Read-only

Pause until an element or visible text becomes visible, hidden, attached or detached. Use after actions that load content asynchronously.

Instructions

Wait until an element (by selector) or a piece of visible text reaches a state: visible (default), hidden, attached or detached. Useful after actions that load content asynchronously.

Input Schema

NameRequiredDescriptionDefault
textNoVisible text to wait for (substring match)
frameNoCSS selector of the iframe containing the element (e.g. "iframe[name^=__privateStripeFrame]"), or a list for nested iframes, outermost first. Not needed with aria-ref selectors.
stateNovisible
timeoutNoTimeout in milliseconds
selectorNoSelector: "aria-ref=e5" from get_page_snapshot (preferred; also reaches into iframes), CSS ("#email", "button.submit"), text ("text=Sign in"), role ("role=button[name=/save/i]") or XPath ("xpath=//a")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true, so the safety profile is already covered. The description adds the default state ('visible') and the fact that it blocks on a target state, which is meaningful beyond the annotations. It omits the polling/blocking nature of the call beyond timeout, and does not say what happens when the timeout expires (error vs. silent return), which is the primary behavioral risk of a wait 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, zero filler. The target states and the default are front-loaded before the usage hint, so an agent can act on the first sentence alone.

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?

With 5 optional parameters, no required params and no output schema, the description should disclose return behavior and timeout-failure semantics. It covers the states and the async rationale but leaves the return value and timeout outcome unstated, which matters for an agent composing subsequent steps.

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 80%, so the schema already documents selector syntax, iframe handling, state enum and timeout. The description restates selector/text/states without adding format or edge-case detail (e.g. interplay of text vs selector, behavior when both are supplied). Baseline 3 is appropriate.

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 two targeting modes (selector, visible text) and enumerates the four target states. An agent can distinguish it from click_element or navigate_url immediately. It does not, however, distinguish itself from the sibling assert_text/assert_visible, which is the closest conceptual neighbor.

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?

'Useful after actions that load content asynchronously' gives a clear positive usage context. There is no guidance on when NOT to use it, nor any pointer to the alternatives (assert_visible, assert_text, get_page_snapshot polling), so the when-to-use-vs-alternative decision is left to inference.

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