/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { budgetsList } from "../../funcs/budgetsList.js"; import { formatResult, ToolDefinition } from "../tools.js"; export const tool$budgetsList: ToolDefinition = { name: "budgets-list", description: `List budgets Cluster admins see all budgets; org admins see their org's budgets (including member budgets and per-member default budgets) plus budgets on API keys in their org.`, tool: async (client, ctx) => { const [result, apiCall] = await budgetsList( client, { 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); }, };