/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 03d25d0a5e59
 */

import * as z from "zod/v4";
import {
  FunctionT,
  FunctionT$Outbound,
  FunctionT$outboundSchema,
} from "./function.js";

export type Tool = {
  type: "function";
  function: FunctionT;
};

/** @internal */
export type Tool$Outbound = {
  type: "function";
  function: FunctionT$Outbound;
};

/** @internal */
export const Tool$outboundSchema: z.ZodType<Tool$Outbound, Tool> = z.object({
  type: z.literal("function"),
  function: FunctionT$outboundSchema,
});

export function toolToJSON(tool: Tool): string {
  return JSON.stringify(Tool$outboundSchema.parse(tool));
}
