Skip to main content
Glama

browser_wait_for_element

Wait for a CSS selector to appear and become visible before continuing, returning as soon as it is found. Use it for dynamic or JavaScript-rendered content instead of a fixed sleep.

Instructions

Wait for a CSS selector to appear and become visible on the page. Returns immediately when the element is found, rather than sleeping a fixed duration. Use this instead of sleep when waiting for dynamic/JS-rendered content.

Args: selector: CSS selector to wait for (e.g. ".tracking-events", "#results", "[data-loaded]") timeout: Maximum time to wait in milliseconds (default: 10000 = 10s) poll_interval: How often to check in milliseconds (default: 200ms) tab_id: Optional tab to target. Defaults to active tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNo
timeoutNo
selectorYes
poll_intervalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: it returns immediately on success rather than sleeping a fixed duration, and it polls at an interval. It does not state what happens when the timeout elapses (error vs. empty/false return), which is the one behavioral detail an agent most needs 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?

Front-loaded one-line purpose followed by the alternative-to-sleep rationale, then a tidy Args block. Efficient, with only slight redundancy in repeating schema defaults.

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

Completeness4/5

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

No output schema and no annotations, so the description must stand alone; it covers purpose, mechanism, and every parameter. The missing piece is timeout-failure semantics and confirmation of the return value (found element vs. boolean), a notable gap for a waiting tool.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it documents all four parameters with units and examples ('#results', '[data-loaded]', '10000 = 10s', '200ms'), plus the optional/defaulted tab_id. This is richer than the bare schema.

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 for') and resource (CSS selector becoming visible), which clearly separates it from non-wait siblings like browser_screenshot or browser_click. It does not explicitly distinguish itself from the other browser_wait_for_* siblings (url, title, network_idle, result), so it stops short of a 5.

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 a clear condition for use ('waiting for dynamic/JS-rendered content') and names an alternative to avoid ('use this instead of sleep'). No explicit when-not guidance or routing to the sibling wait tools (wait_for_url, wait_for_title), so it is clear context rather than full decision guidance.

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

Deploy Server

Other Tools