Skip to main content
Glama

Smart Wait

wait_for

Wait for an element, text, network idle, URL navigation, or JS expression to be true, then receive an updated snapshot.

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.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the return of a fresh snapshot after the wait and the timeout behavior (default 10000, max 30000), which are important behavioral traits.

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 concise sentences with no wasted words. The first sentence states the primary purpose, and the second adds key details.

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

Completeness5/5

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

Given no output schema, the description mentions the return value (snapshot) and covers all condition types. The schema handles parameter details, making the description complete for a wait tool.

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 100% with each parameter described. The description does not add additional semantics per parameter beyond what the schema provides, but it provides overall context (e.g., return behavior). Baseline 3 is appropriate.

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 tool's purpose: 'Wait for a condition before proceeding.' It lists supported conditions, making it specific and distinct from siblings like 'wait_for_human'.

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 lists the supported conditions, implying when to use each. It does not explicitly exclude cases or mention alternatives, but the enumeration provides sufficient context.

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