/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { connectionsList } from "../../funcs/connectionsList.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ListConnectionsConnectionsGetRequest$inboundSchema .optional(), }; export const tool$connectionsList: ToolDefinition = { name: "connections-list", description: `List Connections List all connections sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a \`cursor\` will be provided. Use the \`cursor\` parameter to retrieve the subsequent page.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await connectionsList( 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); }, };