Skip to main content
Glama

web_wait

Pauses automation until an element matching a CSS selector appears, polling until it exists or timeout_seconds elapses; use it to synchronize actions with dynamic pages.

Instructions

Wait until an element matching 'selector' appears (polls), up to timeout_seconds.

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": "web_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorYes
target_idNoTab id from web_tabs. Omit to use the first/active tab.
timeout_secondsNo

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?

With no annotations, the description carries the full burden, and it does disclose the key behavioral trait: the tool polls rather than returning immediately, and is bounded by timeout_seconds. It omits critical behavior for a blocking wait - what happens when the timeout elapses (error, null, empty result), the polling interval, and whether it blocks the whole session.

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?

A single dense sentence with zero filler, front-loading the wait condition and appending the polling and timeout constraints in a parenthetical. Nothing could be removed without losing information.

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?

For a three-parameter tool with no annotations and no output schema, the definition covers the core contract but leaves the return-value behavior on timeout and the default timeout unspecified - exactly the facts an agent needs to handle failure correctly. Adequate but with clear gaps.

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 coverage is only 33% (only target_id is documented), so the description must compensate. It gives meaning to 'selector' (element to match) and 'timeout_seconds' (the wait bound), but supplies no default timeout, no selector syntax examples, and no units detail beyond the parameter name itself, leaving roughly a third of the semantic space unfilled.

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?

The description states a specific verb ('wait'), the exact condition being awaited (an element matching 'selector'), and the mechanism ('polls'), which clearly separates it from siblings like web_read or web_html that extract content immediately. It stops short of naming an alternative tool for the non-waiting case, so the differentiation is implicit rather than explicit.

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 polling semantics - an agent can infer this is for elements that appear asynchronously after navigation or a click. However, there is no explicit statement of when to prefer this over simply retrying web_read or web_html, and no guidance on choosing a timeout value.

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