Skip to main content
Glama

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);

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