/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: da578d9a5ae4
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { FunctionT$inboundSchema, FunctionT$outboundSchema, } from "./function.js";
/** @internal */
export const FunctionTool$inboundSchema = z
    .object({
    type: z.literal("function"),
    function: FunctionT$inboundSchema,
});
/** @internal */
export const FunctionTool$outboundSchema = z.object({
    type: z.literal("function"),
    function: FunctionT$outboundSchema,
});
export function functionToolToJSON(functionTool) {
    return JSON.stringify(FunctionTool$outboundSchema.parse(functionTool));
}
export function functionToolFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FunctionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FunctionTool' from JSON`);
}
//# sourceMappingURL=functiontool.js.map