Skip to main content
Glama

wait-seconds

Pause execution for a specified number of seconds in MetaMask MCP workflows, enabling timed delays for blockchain interactions or process synchronization.

Instructions

Wait the given seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secondsYes

Implementation Reference

  • Handler function that extracts seconds from args, waits the equivalent milliseconds using the wait helper, and returns a text content response indicating the wait completed.
    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 parameter 'seconds' as a coerced number.
    parameters: z.object({ seconds: z.coerce.number(), }),
  • Function that registers the 'wait-seconds' tool on the FastMCP server by calling addTool with name, description, schema, and execute 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`, }, ], }; }, }); };
  • Invocation of the registerWaitSecondsTools function within the central registerTools function to add the wait-seconds tool.
    registerWaitSecondsTools(server);
  • Helper utility function that returns a Promise resolving after the specified timeout in milliseconds using setTimeout.
    async function wait(timeout: number) { return new Promise((resolve) => { setTimeout(() => { resolve(undefined); }, timeout); }); }

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/Xiawpohr/metamask-mcp'

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