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
| Name | Required | Description | Default |
|---|---|---|---|
| ms | Yes | Time to wait in milliseconds |
Implementation Reference
- dist/tools/waiting.js:68-72 (handler)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 })); });
- dist/schemas.js:119-121 (schema)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);