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