/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: eb9603e91876
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { MCPServerIcon$inboundSchema } from "./mcpservericon.js";
import { MCPToolMeta$inboundSchema } from "./mcptoolmeta.js";
import { ToolAnnotations$inboundSchema, } from "./toolannotations.js";
import { ToolExecution$inboundSchema } from "./toolexecution.js";
/** @internal */
export const MCPTool$inboundSchema = z.object({
    name: z.string(),
    title: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    inputSchema: z.record(z.string(), z.any()),
    outputSchema: z.nullable(z.record(z.string(), z.any())).optional(),
    icons: z.nullable(z.array(MCPServerIcon$inboundSchema)).optional(),
    annotations: z.nullable(ToolAnnotations$inboundSchema).optional(),
    _meta: z.nullable(MCPToolMeta$inboundSchema).optional(),
    execution: z.nullable(ToolExecution$inboundSchema).optional(),
}).catchall(z.any()).transform((v) => {
    return remap$(v, {
        "_meta": "meta",
    });
});
export function mcpToolFromJSON(jsonString) {
    return safeParse(jsonString, (x) => MCPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MCPTool' from JSON`);
}
//# sourceMappingURL=mcptool.js.map