Skip to main content
Glama

Wait for the page

wait_for
Read-only

Pause automation until specified text appears or an element becomes visible or hidden. Keeps waiting across navigations and fails if the condition is not met in time.

Instructions

Wait until text appears on the page or an element (ref) becomes visible, or with state "hidden" until it goes away. Keeps waiting across navigations. Fails with WAIT_TIMEOUT if it doesn't happen in time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoWait until this element is visible (or gone). Give either text or ref.
textNoWait until this text is on the page (case-insensitive). Give either text or ref.
stateNo"visible" (default) waits for it to appear; "hidden" waits for it to go away.
timeoutMsNoHow long to wait, in milliseconds (default 10000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, openWorld, non-idempotent), and the description adds genuinely useful behavior: it keeps waiting across navigations and fails with WAIT_TIMEOUT rather than hanging. It stops short of describing what a successful wait returns, though no output schema exists to cover that.

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 primary success condition and followed by the failure mode. Every clause carries information; nothing is padding.

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

Completeness4/5

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

For a four-parameter, no-output-schema wait tool, the description covers the core trigger conditions, the hidden-state variant, cross-navigation persistence, and the timeout failure. The only gap is return value on success, which is minor for a blocking primitive.

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 100% — text vs ref exclusivity, case-insensitive matching, the state enum, and the timeout default/range are all documented in the schema. The description restates the state semantics but adds no syntax or format detail beyond it, so the baseline of 3 applies.

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?

States a specific verb (wait) and the two triggering resources (text on page, element ref), plus the inverse mode (state "hidden"). Nothing in the sibling list does the same thing, so an agent can route to it unambiguously.

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 description — you call it when you need to block until content appears or disappears — but there is no explicit when-to-use versus siblings like snapshot or get_status, and no stated preconditions or exclusions.

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