Function zodToMCPShape

  • Converts a Zod object schema to a flat shape for MCP tools

    Parameters

    • schema: ZodTypeAny

      The Zod schema to convert

    Returns { keys: string[]; result: MCPSchemaShape }

    A flattened schema shape compatible with MCP tools

    Error if the schema is not an object type