Skip to main content
Glama
ZenRows
by ZenRows

browser_wait_for_selector

Read-only

Wait until an element matching a CSS selector is stable in the DOM, optionally visible, to synchronize scraping or automation after dynamic content loads.

Instructions

Wait until an element matching the CSS selector is stable in the DOM. Set visible=true to also require the element to be visible (not hidden).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
visibleNoAlso require the element to be visible, not just present in the DOM (default false)
selectorYesCSS selector to wait for
session_idYesSession ID returned by browser_navigate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.7.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds genuine behavioral context by defining 'stable in the DOM' as the wait condition and explaining the visible flag's effect, but it omits timeout behavior, what happens when the condition is never met, and any error/return semantics.

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 with zero filler, and the core wait condition is front-loaded before the optional modifier. Every clause earns its place.

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 wait primitive with no output schema, the description covers the condition and the optional flag but is silent on the most operationally important unknown: what happens on timeout or if the element never becomes stable, and whether the call throws or returns a status. Annotations handle safety, so the gap is narrow but real.

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 description coverage is 100%, so session_id, selector, and visible are all documented in the schema itself. The description's restatement of the visible flag duplicates the schema text and adds no syntax, format, or edge-case detail beyond it.

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) and a specific resource (an element matching a CSS selector), with the exact condition being waited on (DOM stability). This clearly separates it from browser_wait_for_navigation, but the description never names or contrasts with the other wait siblings (browser_wait, crawl_wait, batch_wait), leaving differentiation to the tool name alone.

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 when-to-use or when-not-to-use guidance, and no mention of the alternative wait tools that exist in the sibling set. The agent must infer from the name that this is the right primitive before interacting with a dynamic element.

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