Skip to main content
Glama

browser_wait_for_selector

Wait for a CSS selector to become visible, attached, hidden, or detached on a page, with a configurable timeout. Synchronize automation steps until elements are ready.

Instructions

Wait for an element to appear on the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoState: 'attached', 'detached', 'visible', 'hidden'visible
timeoutNoTimeout in milliseconds
selectorYesCSS selector of the element
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It only says 'wait for an element to appear' and does not disclose timeout behavior, supported states (visible, hidden, attached, detached), or what happens on timeout (throw vs return). This leaves significant behavioral ambiguity.

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?

The description is a single, concise sentence that directly states the tool's purpose without unnecessary words.

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

Completeness2/5

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

For a tool with no output schema, the description lacks important context like return value or error behavior. It also doesn't explain the 'state' parameter despite schema having it. The minimal description leaves gaps for an AI agent, though the schema provides some parameter details.

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% with each parameter clearly described (selector, state, timeout). The description adds no additional parameter information, so it meets the baseline for full schema coverage.

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

Purpose5/5

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

The description uses a specific verb (wait) and resource (element) and clearly differentiates from sibling tools like browser_query_selector_all or browser_click by describing a waiting behavior rather than querying or interacting.

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?

The description implies the tool should be used when needing to wait for an element to appear, but it provides no explicit guidance on when to use it versus alternatives or any preconditions. It is clear but not fully directive.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mazamakasa/octo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server