/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { budgetsSetOrg } from "../../funcs/budgetsSetOrg.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.SetOrgBudgetRequest$inboundSchema, }; export const tool$budgetsSetOrg: ToolDefinition = { name: "budgets-set-org", description: `Set an org budget Creates or updates a budget for the org. One budget per (scope, owner); editing re-evaluates against live spend. Targets the caller's own organization (inferred from the API key or session) unless the optional org_id query parameter names another org — cluster admins only.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await budgetsSetOrg( 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); }, };