Skip to main content
Glama

browser.wait_for_selector

Read-only

Wait for a CSS selector to reach a specific state (visible, hidden, attached, detached) and return when condition is met, or raise an error on timeout.

Instructions

Wait for a CSS selector to reach a specific state (visible, hidden, attached, detached). Returns when the condition is met or raises on timeout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
selectorYes
timeout_msNo
stateNovisible
Behavior4/5

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

Annotations already indicate read-only and non-destructive behavior. The description adds important behavioral context: it blocks until the condition is met or times out, and mentions the timeout raise. This goes beyond the annotations and clarifies the tool's execution model.

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 two sentences, front-loaded with the core purpose, and contains no unnecessary words. Every sentence adds value, making it highly efficient.

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?

For a tool with 4 parameters and no output schema, the description covers the main behavior (waiting, states, timeout). It doesn't explain return values or session context, but those are implicit. Overall, it provides sufficient context for an agent to use the tool correctly.

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 0%, so the description must compensate. It implicitly covers selector (via 'CSS selector'), state (lists states), and timeout (via 'raises on timeout'). However, session_id is not mentioned, and parameter details are not explicitly explained. Adequate but not thorough.

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 clearly states the verb 'Wait', the resource 'CSS selector', and the specific states 'visible, hidden, attached, detached'. It distinguishes from sibling tools like find_elements and observe by focusing on waiting for a condition rather than immediate querying.

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?

The description provides clear context for when to use this tool (waiting for a selector to reach a state). It does not explicitly exclude alternatives or provide when-not-to-use guidance, but the context is sufficient for an agent to infer its typical use case.

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/LvcidPsyche/auto-browser'

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