Skip to main content
Glama

wait_for

Read-onlyIdempotent

Waits for a specified element to appear in the DOM after dynamic content loads, ensuring subsequent browser actions target elements that are actually available.

Instructions

[Agent Browser] Wait for an element to appear in the DOM. Use after actions that load dynamic content. Most interaction tools auto-wait, so only use this for elements that appear asynchronously after page interactions.

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
selectorYes
timeout_msNo

Output Schema

NameRequiredDescriptionDefault
dataNo
hintsNo
messageNo
successNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.5/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 safety is covered. The description usefully discloses that general interaction tools auto-wait, avoiding redundant waits, but says nothing about what happens when the timeout elapses (error vs. empty result) or how it polls.

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?

Three short sentences, the core action first and the caveat about auto-waiting immediately after. No filler, no repetition of the title or schema.

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?

An output schema exists, so return-value explanation is not required, and the annotations cover safety. However, in a catalog dense with wait_* siblings, the definition never states which conditions belong to this tool versus wait_for_text, wait_for_url, or wait_for_change, and it omits timeout failure behavior for a tool whose only real risk is hanging or erroring.

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% across both parameters, so the description carries the full burden and adds nothing: no explanation of selector syntax (CSS vs. XPath vs. text), no mention of the 10000ms default, and no note on what timeout_ms controls when hit. The parameter names are largely self-describing, which prevents a 1.

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 concrete verb and resource: waits for an element to appear in the DOM. It also implicitly separates itself from the many wait_* siblings by scoping the tool to DOM element appearance after async interactions, though it never names wait_for_text or wait_for_url to make the distinction explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives both a positive condition ('use after actions that load dynamic content', 'elements that appear asynchronously after page interactions') and a negative one ('most interaction tools auto-wait, so only use this for...'). It does not route the agent to the sibling wait_* tools for other conditions, which keeps it short of a 5.

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