/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { responsesGet } from "../../funcs/responsesGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetResponseResponsesResponseIdGetRequest$inboundSchema, }; export const tool$responsesGet: ToolDefinition = { name: "responses-get", description: `Get Response Get a response by its ID. This will return the response and its status. If the response is still in progress, the status will be \`in_progress\`. If the response is completed, the status will be \`completed\`. If the response is failed, the status will be \`failed\`.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await responsesGet( client, args.request, { 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); }, };