Skip to main content
Glama

Smart Wait

wait_for

Halt automation until target browser conditions occur. Monitors element visibility, text appearance, network idle, URL navigation, and JavaScript expressions before continuing execution.

Instructions

Wait for a condition before proceeding. Supports: element visible, text appears, network idle, URL navigation, JS expression truthy. Returns a fresh snapshot after the wait completes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID.
conditionYesWhat to wait for.
targetNo@eN ref or CSS selector (for element/text conditions).
textNoText to find (for text condition) or URL pattern (for navigation).
jsNoJS expression that should return truthy (for js condition).
timeoutNoMax wait time in ms. Default 10000, max 30000.
Behavior3/5

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

With no annotations, description carries full burden. It correctly states the return value (fresh snapshot) and implies blocking behavior, but fails to disclose timeout failure behavior (error thrown or silent return?), polling frequency, or resource consumption during wait.

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 efficient sentences with zero waste. First sentence front-loads purpose and lists capabilities; second sentence explains return value. Every word earns its place.

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 6-parameter tool with complete schema coverage, description adequately covers the conceptual model (wait conditions) and return format. Missing only timeout failure behavior and explicit sibling differentiation to be fully 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 100% so baseline is 3. Description adds significant value by mapping abstract enum values ('element', 'text', 'js') to concrete semantics ('element visible', 'text appears', 'JS expression truthy'), clarifying what each condition type actually waits for.

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?

Clear verb 'Wait' and resource 'condition', with specific scope defined by listing the five supported condition types (element visible, text appears, etc.). Mentions return value (fresh snapshot) which implicitly distinguishes from sibling wait_for_human, though explicit comparison is absent.

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?

Implies synchronization use case ('before proceeding') by listing condition types, but lacks explicit when-to-use guidance versus polling snapshot manually or versus wait_for_human, and doesn't state prerequisites like needing an active session.

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/anthonybono21-cloud/leapfrog'

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