Skip to main content
Glama
Unagi-cq
by Unagi-cq

browser_wait

Waits until a JavaScript expression returns a truthy value, with configurable timeout and interval, and optional tab switch before waiting.

Instructions

Wait until JavaScript condition returns a truthy value.

Args: condition_js: JavaScript expression or script. The return value is tested for truthiness. timeout: Maximum seconds to wait. interval: Seconds between checks. switch_tab_id: Optional tab ID to make active before waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
intervalNo
condition_jsYes
switch_tab_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Discloses polling behavior with timeout and interval, and truthiness test. But doesn't state what happens on timeout (likely throws error) or if condition has side effects. No annotations provided, so description carries full burden but is adequate.

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?

Concise with clear bullet points for parameters. First sentence directly states purpose. Minor informality with 'Args:' but overall efficient and front-loaded.

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?

Covers purpose and parameters but lacks return value description. Output schema exists but description doesn't integrate it. Missing edge cases like timeout behavior. Adequate but not complete.

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

Parameters4/5

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

Schema coverage is 0%, but description adds meaning: condition_js is a 'JavaScript expression or script' with truthiness check, timeout is 'Maximum seconds to wait', interval is 'Seconds between checks', switch_tab_id is 'Optional tab ID to make active before waiting.' Adds value beyond schema.

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?

Clearly states 'Wait until JavaScript condition returns a truthy value.' This is a specific verb+resource and distinguishes from siblings like browser_execute_js which executes JS without waiting.

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?

No explicit guidance on when to use this tool vs alternatives. Does not mention when-not to use or suggest sibling tools for different scenarios. Only mentions optional tab switch.

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/Unagi-cq/cdp-bridge-mcp'

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