Skip to main content
Glama

Wait for an explicit condition

wait_for

Pause browser interaction until a specified selector becomes visible or text appears, using an explicit timeout instead of assuming page readiness.

Instructions

Wait until a selector is visible or a text appears, up to timeout_ms. There is no implicit 'ready' heuristic.

Input Schema

NameRequiredDescriptionDefault
textNo
selectorNo
stage_idYes
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden, and it only discloses one trait (no implicit ready check). It does not say what happens on timeout (throw, return false, empty result), whether waiting is blocking, what the default timeout is, or whether both conditions must be met — all critical for a wait primitive with no output schema.

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 short sentences, the primary condition and timeout bound front-loaded, and the 'no implicit ready heuristic' caveat placed immediately after as a genuine behavioral clarification. Nothing is padded.

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 tool with zero schema coverage, no annotations and no output schema, the description leaves meaningful holes: required stage_id, timeout failure behavior, and combined-condition semantics. An agent can guess the happy path but cannot predict the failure path or the required identifier.

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 description coverage is 0%, so the description must define all four parameters. It conveys the meaning of selector, text and timeout_ms at a rough level, but stage_id — the only required parameter — is entirely unexplained, and it never clarifies whether selector and text are ANDed or alternatives.

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) plus the two concrete conditions it resolves on (selector visible, text appears) and the timeout bound, so the action is unambiguous. It does not name or contrast any sibling (act, capture, measure, stage_state), but the semantics are distinct enough that an agent can place it without opening a schema.

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?

The line 'There is no implicit ready heuristic' implies you must call this before acting, which is a useful usage cue. However, it never says when to prefer selector vs text mode, whether both may be supplied, or which sibling to use instead if the condition is already satisfied.

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