Skip to main content
Glama

Create Budget

create_budget

Create a budget for the organization (POST /api/budgets). Required: name, amount (positive, in the org's display currency), and start_date (YYYY-MM-DD). Optional: period (monthly | quarterly | annual; default monthly), end_date (YYYY-MM-DD; omit for ongoing), integration_id to scope it, a structured scope ({ platform | accountIds | services | tagKey+tagValue | costCenterId }), threshold_pcts (e.g. [80, 100]), and who to notify on a crossing: notification_channel_ids (ids from list_notification_channels — any number, any type) and/or emails (up to 5 addresses). Omit both for an informational-only budget. Webhook URLs are not accepted here — create a channel with create_notification_channel and attach its id. The currency is NOT settable — the backend stamps your organization's display currency. Returns the created 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. Reversible (a budget can be deleted/edited). Example: { "name": "Prod AWS monthly", "amount": 50000, "start_date": "2026-07-01", "period": "monthly", "threshold_pcts": [80, 100], "notification_channel_ids": ["<channel_id>"], "emails": ["ops@acme.com"], "confirm": true }.

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": {
      "name": "<name>",
      "amount": "<amount>",
      "start_date": "<start_date>"
    },
    "name": "create_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name for the budget (e.g. "Prod AWS monthly"). Required.
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.
amountYesBudget amount, a positive number in the organization's display currency. Required.
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.
periodNoBudget period: monthly (default) | quarterly | annual.monthly
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.
end_dateNoWhen tracking stops (YYYY-MM-DD). Omit for an ongoing budget; must be on or after start_date.
start_dateYesWhen the budget takes effect, YYYY-MM-DD (e.g. "2026-07-01"). Required.
integration_idNoScope the budget to a single provider connection. Omit for org-wide / cross-platform.
threshold_pctsNoAlert thresholds as percentages of the budget (e.g. [50, 80, 100]). Crossing one fires an alert.
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
Behavior4/5

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

The annotations already declare a non-read-only, non-idempotent, non-destructive, open-world write, and the description goes well beyond them: the MCP write gate and its four conditions, that read-only cak_ keys can never succeed, that the currency is backend-stamped and not settable, that failures change nothing, and that the operation is reversible. Not a 5 only because return semantics are limited to 'Returns the created budget' with no shape detail, though no output schema exists to cover it.

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 required parameters, then optionals, then the write gate, then a concrete example — a sensible order for an agent reading top-down. The write-gate paragraph is dense and somewhat repetitive ('Missing any one of them it refuses and changes nothing'), but every clause carries actionable constraint information.

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 an 11-parameter nested-scope write tool with no output schema, the definition covers prerequisites, parameter defaults and caps, currency behavior, error handling, reversibility, and cross-tool routing. An agent has everything needed to either call it correctly or correctly refuse and explain why.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds value by separating required from optional inputs, restating the period default, capping emails at 5, giving threshold examples, and clarifying that omitting both notification inputs means informational-only. The subtle scope hierarchy is left to the schema's own nested description, so it does not fully re-earn parameter credit.

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?

Opens with a specific verb and resource ('Create a budget for the organization') plus the underlying endpoint, so there is no ambiguity against siblings like get_budget, update_budget, or delete_budget. It also makes the creation-only intent unmistakable by noting the result is reversible via edit/delete.

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 routes the agent: webhook URLs are rejected here and must go through create_notification_channel, channel ids come from list_notification_channels, and omitting both notification inputs produces an informational-only budget. It also enumerates the exact preconditions (admin:write scope, org switch, admin/super_admin role, confirm:true) and tells the agent to relay the error rather than retry.

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