Skip to main content
Glama

wait_for

Read-only

Delays browser actions until the specified selector appears, using an optional URL and timeout to avoid acting before the page element is ready.

Instructions

Wait until a selector appears (up to timeout_ms).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
selectorYes
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. Beyond that, the description says nothing about polling behavior, whether a timeout throws an error or returns false/null, or what an agent should do after a timeout — the most decision-relevant behavior for 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, and the timeout bound is stated inline. It is efficient but telegraphic, packing meaning into a parenthetical rather than spelling out the semantics.

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

Completeness2/5

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

With no output schema, the description should say what a successful and a timed-out wait yield; it says neither. Combined with the undocumented url parameter and 0% schema coverage, an agent cannot call this tool confidently in edge cases.

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 carries the full burden. It only clarifies selector and timeout_ms implicitly; the 'url' parameter is left completely unexplained (page context? tab target? navigation?), which is a material ambiguity for a three-parameter tool.

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 condition being awaited ('until a selector appears') and bounds it by timeout_ms, which is enough to distinguish it from action siblings like click or read_page. It does not explicitly contrast itself with page_elements or read_page, which also observe page state.

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?

No guidance on when to prefer this over page_elements/read_page, or on what to do when the wait fails. Usage must be inferred from the single sentence; there are no stated preconditions or alternatives.

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