/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { destinationsCreate } from "../../funcs/destinationsCreate.js"; import * as components from "../../models/components/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { tenantId: z.string(), body: components.DestinationCreate$inboundSchema, }; export const tool$destinationsCreate: ToolDefinition = { name: "destinations-create", description: `Create Destination Creates a new destination for the tenant. The request body structure depends on the \`type\`.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await destinationsCreate( client, args.tenantId, args.body, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };