/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { eventsGet } from "../../funcs/eventsGet.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { eventId: z.string(), }; export const tool$eventsGet: ToolDefinition = { name: "events-get", description: `Get Event Retrieves details for a specific event. When authenticated with a Tenant JWT, only events belonging to that tenant can be accessed. When authenticated with Admin API Key, events from any tenant can be accessed. `, args, tool: async (client, args, ctx) => { const [result, apiCall] = await eventsGet( client, args.eventId, { 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); }, };