Skip to main content
Glama
zod-compat.ts543 B
import { z, type ParseParams, type ZodTypeAny } from "zod"; /** * Ensure Zod v3 schemas expose safeParseAsync for compatibility with * MCP server helpers that always call safeParseAsync. */ export function ensureZodSafeParseAsync(): void { const proto = z.ZodType.prototype as ZodTypeAny & { safeParseAsync?: (value: unknown, params?: ParseParams) => Promise<unknown>; }; if (!proto.safeParseAsync) { proto.safeParseAsync = async function (value: unknown, params?: ParseParams) { return this.safeParse(value, params); }; } }

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/QuentinCody/entrez-mcp-server'

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