/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { attemptsList } from "../../funcs/attemptsList.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ListAttemptsRequest$inboundSchema, }; export const tool$attemptsList: ToolDefinition = { name: "attempts-list", description: `List Attempts Retrieves a paginated list of attempts. When authenticated with a Tenant JWT, returns only attempts belonging to that tenant. When authenticated with Admin API Key, returns attempts across all tenants. Use \`tenant_id\` query parameter to filter by tenant. `, args, tool: async (client, args, ctx) => { const [result, apiCall] = await attemptsList( 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.result; return formatResult(value, apiCall); }, };