Skip to main content
Glama
wait-seconds.ts849 B
import { FastMCP } from "fastmcp"; import { z } from "zod"; import { getAccount } from "@wagmi/core" import { wagmiConfig } from "../wagmi-config.js"; import { JSONStringify } from "../utils/json-stringify.js"; 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`, }, ], } }, }); }; 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/mcpilot'

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