@oraichain/mcp-server
Version:
Oraichain Multichain MCP Server
15 lines (14 loc) • 437 B
TypeScript
import { z } from "zod";
export type MCPSchemaShape = {
[key: string]: z.ZodType<any>;
};
/**
* Converts a Zod object schema to a flat shape for MCP tools
* @param schema The Zod schema to convert
* @returns A flattened schema shape compatible with MCP tools
* @throws Error if the schema is not an object type
*/
export declare function zodToMCPShape(schema: z.ZodTypeAny): {
result: MCPSchemaShape;
keys: string[];
};