Skip to main content
Glama

Update Budget

update_budget
Idempotent

Update an existing budget (PUT /api/budgets/{budget_id}). Provide budget_id and any of: name, amount, start_date (YYYY-MM-DD), end_date (YYYY-MM-DD), period, integration_id, scope, threshold_pcts, notification_channel_ids (replaces the attached channels; [] detaches all), emails (replaces the ad-hoc addresses, max 5; [] clears), enabled. A true PARTIAL update — only the fields you send are changed; everything omitted is preserved (so { enabled: false } disables without touching scope, thresholds, channels or emails). The currency is NOT settable. Returns the updated budget. WRITE TOOL — MCP WRITES ARE OFF BY DEFAULT FOR EVERY ORGANIZATION. This call needs ALL FOUR of: the admin:write scope, the organization switch turned on (an org admin enables it in Settings → Organization → AI agent access), an admin or super_admin org role, and confirm:true. Missing any one of them it refuses and changes nothing, and the error names which one — relay that to the user rather than retrying. Read-only cak_ API keys can never perform it. Example: { "budget_id": "b1a2c3d4-...", "enabled": false, "confirm": true } disables a budget; { "budget_id": "…", "amount": 60000, "confirm": true } changes only the amount.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "budget_id": "<budget_id>"
    },
    "name": "update_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoNew display name for the budget.
scopeNoOptional structured scope. Combined with integration_id to express the scope hierarchy: omit everything + no integration_id = org-wide; { platform } = a whole platform; { costCenterId } = a cost center; integration_id + optional { accountIds, services, tagKey, tagValue } = that integration, optionally narrowed to sub-accounts / services / a tag.
amountNoNew budget amount (positive, org display currency).
emailsNoUp to 5 email addresses to notify directly, without a channel. On update this REPLACES the list; [] clears it; omit to keep it. For a longer list, create an email channel and attach its id.
periodNoNew period: monthly | quarterly | annual.
confirmNoSet to true to actually create the budget. Required: the tool refuses the mutation unless confirm:true is present. Authorization for the change itself is your org role, checked server-side.
enabledNoEnable or disable the budget.
end_dateNoWhen tracking stops (YYYY-MM-DD). Omit for an ongoing budget; must be on or after start_date.
budget_idYesThe id of the budget to update (substituted into PUT /api/budgets/{budgetId}). Required.
start_dateNoNew effective date, YYYY-MM-DD.
integration_idNoRe-scope the budget to a single provider connection.
threshold_pctsNoReplace the alert thresholds (percentages of the budget, e.g. [80, 100]).
notification_channel_idsNoIds of the organization's notification channels (any number, any type — email, Slack, Teams) to deliver threshold crossings to. Get them from list_notification_channels. On update this REPLACES the set; [] detaches every channel; omit to keep the current channels.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations only telling us it is a non-read-only, idempotent, non-destructive write, the description carries the rest: four-part authorization gating, the fact that failure changes nothing and names the missing condition, that read-only cak_ keys can never call it, and that the updated budget is returned. The replacement semantics for notification_channel_ids and emails and the preservation of omitted fields go well beyond annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and endpoint, then field list, then mutation semantics, then auth gating — a sensible order. It is longer than typical, and a few clauses (date format, [] clears) duplicate the schema, but no sentence is truly wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter nested-object mutation with no output schema, the description covers the return value ("Returns the updated budget"), the auth failure modes, the partial-update contract, and the non-settable currency. An agent has everything needed to invoke it correctly the first time.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents every parameter, including the replaces/[] clears behavior for emails and channels. The description adds some value by grouping the settable fields, restating date formats, and giving two worked examples, but it largely mirrors what the schema already says, which is the baseline-3 case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb plus resource ("Update an existing budget") and anchors it to PUT /api/budgets/{budget_id}, which cleanly separates it from create_budget, delete_budget and get_budget among the siblings. The field list and partial-update semantics make the scope of the operation unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly frames the tool as a true partial update and warns that currency is not settable, so an agent knows what this tool cannot do and need not fall back to experimentation. It also spells out the four preconditions and instructs the agent to relay the specific error rather than retry, which is direct when-to-use / when-it-fails guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources