Skip to main content
Glama

Set agent account monthly budget

stack_set_account_budget

Set or remove an agent account's monthly spend budget, in USD cents. Owner or admin only; an agent session is refused. Lowering the budget applies at once. Raising it or removing it (monthly_budget_cents null) is a governance approval: the owner approves it in the browser. Setting a budget needs controls (CONTROLS_REQUIRED otherwise). When human approval is required and the chat client supports MCP elicitation, the person is asked to confirm the exact change in the client; the change is applied only after they approve, and a rejection changes nothing. Otherwise it returns GOVERNANCE_APPROVAL_REQUIRED with approval_id and approval_url, the page for that one approval, and the same payload sent with governance_approval_id after approval applies the change. An approval is single-use, bound to the exact payload, and expires after 24 hours. Returns the account with its budget.

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": {
      "account_id": "<account_id>",
      "monthly_budget_cents": "<monthly_budget_cents>"
    },
    "name": "stack_set_account_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
account_idYesAgent account id (acct_*)
monthly_budget_centsYesThe new monthly budget in USD cents (a whole number above zero), or null to remove the budget
governance_approval_idNoApproval id from a GOVERNANCE_APPROVAL_REQUIRED response, once a human approved it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false) by disclosing authorization rules, the immediate-vs-approval asymmetry, the elicitation confirmation path, and the GOVERNANCE_APPROVAL_REQUIRED fallback with its retry contract. The approval lifecycle details — single-use, bound to the exact payload, 24-hour expiry — are behavior an agent cannot infer from any structured field.

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 unit before the governance rules, and nearly every sentence carries required behavior. The elicitation/governance paragraph is a long run-on with a slightly awkward clause ('the page for that one approval'), which costs a point but not much comprehension.

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 3-parameter mutation tool with no output schema, the definition covers permissions, failure codes, the human-approval round trip, retry mechanics, and even the return value ('Returns the account with its budget'). Nothing needed to invoke it correctly in either the direct or approval-required path is missing.

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 earns above that by explaining governance_approval_id as coming 'from a GOVERNANCE_APPROVAL_REQUIRED response' and by describing the null case as budget removal in prose. It adds workflow meaning rather than restating types, though it does not add anything beyond the schema for account_id.

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 pair and resource: 'Set or remove an agent account's monthly spend budget, in USD cents.' The units are stated up front and the effect (add vs. remove via null) is unambiguous, which is enough for an agent to distinguish this from the many stack_set_* siblings that configure other resources.

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?

Gives explicit preconditions and exclusions: 'Owner or admin only; an agent session is refused' and 'Setting a budget needs controls (CONTROLS_REQUIRED otherwise).' It also splits behavior by direction — lowering applies at once, raising or removing requires governance approval — so an agent knows exactly which path it is on before calling.

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.