Skip to main content
Glama

Set the account budget

set_account_budget
DestructiveIdempotent

Set the account budget

Sets or replaces the account's budget: daily, weekly, monthly and lifetime limits at our price (at least one), the alert share and the mode. hard_stop refuses the key's requests with a 402 once a limit is reached (the request that crosses it can go a little over: the check runs before a request, its cost lands after, and the Model API keeps the key's state for about a minute); alert_only never blocks and sends one email per limit and window when the spend crosses alertPct. A limit left out or null is no limit. Requests follow within about a minute.

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": {
      "limits": "<limits>"
    },
    "name": "set_account_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNohard_stop refuses requests with a 402 at a limit; alert_only never blocks (it needs alertPct above 0).hard_stop
limitsYesLimits in USD at our price, to the cent. At least one; null or left out is no limit.
alertPctNoEmail once per limit and window when the spend crosses this share of a limit. 0 turns the alert off.
idempotencyKeyNoOptional. A unique string so that repeating this call never creates twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that overshoot is possible because the check runs before a request and cost lands after, that the Model API retains key state for roughly a minute, that hard_stop returns 402, that alert_only sends exactly one email per limit and window at alertPct, and that omitted/null limits mean no limit. The 'about a minute' propagation caveat is exactly the kind of operational detail annotations cannot carry.

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

Conciseness3/5

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

Front-loaded with the purpose, which is good, but the second paragraph is a single sprawling sentence with nested parentheticals about race conditions and propagation delay. The information earns its place, but splitting the mode and timing semantics into separate sentences or bullets would make it far more parseable.

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

Completeness4/5

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

For a destructive, idempotent mutation with a nested parameter object and no output schema, the description covers the important unknowns: what gets replaced, what survives (null = no limit), enforcement behavior, alerting behavior, and the one-minute propagation lag. It stops short of stating required permissions/scope or what a successful call returns, which leaves a small gap.

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 all four parameters (including nested limits) are already documented, and the description largely restates what the schema says (at least one limit, null means none, alertPct semantics). It adds only marginal new meaning, such as the timing of when new limits take effect; idempotencyKey is not explained in the description at all.

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?

Names a specific verb+resource ('Sets or replaces the account's budget') and immediately enumerates the shape of the resource: daily/weekly/monthly/lifetime USD limits, the alert share, and the mode. The qualifier 'account's' implicitly separates it from the sibling set_key_budget, which the schema even echoes ('On a key, this is its monthlyLimitUsd').

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

Usage Guidelines3/5

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

Guidance is strong for choosing between the two modes (hard_stop blocks with 402 vs alert_only never blocks and needs alertPct above 0), which is genuinely useful decision context. However, it never says when to call this instead of the sibling get_account_budget, remove_account_budget, or set_key_budget, so tool-level routing is left to inference.

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