Skip to main content
Glama
andytango
by andytango

wait

Pauses browser automation for a specified duration in milliseconds to ensure proper timing between actions or page loading.

Instructions

Wait for a specified number of milliseconds

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
msYesTime to wait in milliseconds

Implementation Reference

  • Registration and inline handler for the 'wait' tool. Pauses execution using setTimeout for the given milliseconds and returns confirmation.
    // Wait for timeout
    server.tool('wait', 'Wait for a specified number of milliseconds', waitSchema.shape, async ({ ms }) => {
        await new Promise((resolve) => setTimeout(resolve, ms));
        return handleResult(ok({ waited: ms }));
    });
  • Zod input schema for the 'wait' tool, validating the 'ms' parameter.
    export const waitSchema = z.object({
        ms: z.number().int().min(0).max(30000).describe('Time to wait in milliseconds'),
    });
  • dist/server.js:24-24 (registration)
    Call to register the waiting tools, including 'wait', on the MCP server.
    registerWaitingTools(server);
Behavior3/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 behavioral trait of waiting for a specified time, but it does not mention potential side effects like blocking execution, thread behavior, or error handling. It adds basic context but lacks depth for a tool with no annotation coverage.

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, efficient sentence that directly states the tool's function without any unnecessary words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally complete. It explains what the tool does but does not address potential issues like maximum wait times or interaction with other tools, leaving some contextual gaps.

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?

The schema description coverage is 100%, with the parameter 'ms' fully documented in the schema. The description adds no additional meaning beyond what the schema provides, such as usage examples or edge cases, so it meets the baseline of 3 for high 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 clearly states the tool's purpose with a specific verb ('wait') and resource ('milliseconds'), and it distinguishes itself from siblings like 'wait_for_navigation' and 'wait_for_selector' by focusing on a simple time delay rather than event-based waiting.

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 implies usage for timing delays, but it does not explicitly state when to use this tool versus alternatives like 'wait_for_navigation' or 'wait_for_selector'. It provides clear context for a basic wait but lacks explicit exclusions or comparisons.

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/andytango/puppeteer-mcp'

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