wait-seconds
Pause execution for a specified number of seconds within MCPilot, enabling precise timing for blockchain interactions and workflow synchronization without exposing private keys.
Instructions
Wait the given seconds
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seconds | Yes |
Implementation Reference
- The execute handler for the 'wait-seconds' tool, which extracts the seconds parameter, waits for that duration in milliseconds using the wait helper, and returns a structured text response confirming the wait.execute: async (args) => { const seconds = args.seconds await wait(seconds * 1000) return { content: [ { type: "text", text: `Wait for ${seconds} seconds`, }, ], } },
- Zod schema defining the input parameters for the wait-seconds tool: an object with a 'seconds' field coerced to number.parameters: z.object({ seconds: z.coerce.number() }),
- packages/metamask-mcp/src/tools/wait-seconds.ts:8-26 (registration)Local registration of the wait-seconds tool within the registerWaitSecondsTools function using server.addTool, including name, description, schema, and handler.server.addTool({ name: "wait-seconds", description: "Wait the given seconds", parameters: z.object({ seconds: z.coerce.number() }), execute: async (args) => { const seconds = args.seconds await wait(seconds * 1000) return { content: [ { type: "text", text: `Wait for ${seconds} seconds`, }, ], } }, });
- packages/metamask-mcp/src/index.ts:60-60 (registration)Global registration call in the main server file, invoking registerWaitSecondsTools to add the tool to the FastMCP server instance.registerWaitSecondsTools(server);
- Utility helper function that creates a Promise-based delay using setTimeout for the specified timeout in milliseconds.async function wait(timeout: number) { return new Promise((resolve) => { setTimeout(() => { resolve(undefined) }, timeout) }) }