wait-seconds
Pause execution for a specified number of seconds during blockchain operations. Use this tool to manage timing in automated workflows or wait for transaction confirmations.
Instructions
Wait the given seconds.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seconds | Yes |
Implementation Reference
- src/tools/wait-seconds.ts:11-22 (handler)The execute function for the 'wait-seconds' tool, which waits for the specified number of seconds using the wait helper and returns a text response.execute: async (args) => { const seconds = args.seconds; await wait(seconds * 1000); return { content: [ { type: "text", text: `Wait for ${seconds} seconds`, }, ], }; },
- src/tools/wait-seconds.ts:8-10 (schema)Zod schema defining the input parameter 'seconds' as a coerced number.parameters: z.object({ seconds: z.coerce.number(), }),
- src/tools/wait-seconds.ts:4-24 (registration)The registerWaitSecondsTools function that adds the 'wait-seconds' tool to the FastMCP server using server.addTool, including name, description, schema, and handler.export function registerWaitSecondsTools(server: FastMCP): void { 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`, }, ], }; }, }); };
- src/tools/register-tools.ts:57-57 (registration)Invocation of registerWaitSecondsTools(server) as part of the central registerTools function.registerWaitSecondsTools(server);
- src/tools/wait-seconds.ts:26-32 (helper)Utility function 'wait' that creates a Promise resolved after the specified timeout in milliseconds using setTimeout.async function wait(timeout: number) { return new Promise((resolve) => { setTimeout(() => { resolve(undefined); }, timeout); }); }