Skip to main content
Glama
Browser MCP Server

Browser MCP Server

wait_for_element

Pause browser automation until a specified element reaches a chosen state—attached, detached, visible, or hidden—or times out, so scripts act only when the page is ready.

Instructions

Wait for element to appear.

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_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateNo
pageIdNo
timeoutNo
selectorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

D1.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it discloses nothing about what happens on timeout (throw, return false, null), the default polling interval, the default timeout value, or whether it resolves once or continuously. The only behavioral hint is "to appear," which is a thin fragment for a wait primitive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The single sentence is front-loaded and free of redundant wording, so there is nothing to trim. However, its brevity comes from omission rather than economy, leaving the definition under-specified rather than concise.

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

Completeness1/5

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

With four parameters, a state enum, zero schema coverage, no annotations, and no output schema, the definition supplies almost nothing an agent needs to call this correctly. It does not explain the return value, timeout behavior, or how state interacts with the "appear" framing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and four parameters exist, including a state enum (attached/detached/visible/hidden), pageId, and timeout. The description mentions none of them, so an agent gets no meaning for state semantics (which directly contradict the "appear" wording) or timeout units and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Wait for element to appear" essentially restates the tool name wait_for_element, adding only the word "appear." It conveys no scope beyond the default case and never distinguishes this from siblings such as wait_for_text, wait_for_navigation, or element_exists.

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?

There is no guidance on when to use this tool versus the many other wait_for_* siblings or the polling-free element_exists check. Use is only implied by the name; no when-not conditions, prerequisites, or alternatives are stated.

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