Skip to main content
Glama

set_agent_budget

Idempotent

Set or remove an agent's USD spending cap, and raise the cap to let a budget-stopped agent resume on its next turn. Use null to remove the limit.

Instructions

Set or remove the cap (limit_usd: null = unlimited). Also the recovery loop: raising the cap lets a budget-stopped agent run again on the next turn

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": {
      "agent_id": "<agent_id>",
      "limit_usd": "<limit_usd>"
    },
    "name": "set_agent_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYesAgent UUID
limit_usdYesSpending cap in USD, at least zero; null removes the cap

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.4
    • changedInput schema / properties / agent_id / description
      Previous value: -"UUID do agente"New value: +"Agent UUID"
    • changedInput schema / properties / limit_usd / description
      Previous value: -"Teto em USD (>= 0) ou null para remover o teto"New value: +"Spending cap in USD, at least zero; null removes the cap"
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only but idempotent, non-destructive, closed-world mutation. The description adds real behavioral context beyond that: setting null means unlimited, and raising the cap takes effect 'on the next turn' for a stopped agent. It omits what happens when lowering a cap below already-incurred spend or to a currently running turn, which keeps it short of a 5.

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?

Two tight clauses, front-loaded with the core action and immediately followed by the operational reason to use it. The parenthetical and the elliptical 'Also the recovery loop' phrasing are slightly compressed but nothing is wasted.

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 2-parameter tool with full schema coverage, complete annotations, and no output schema, the description covers what changes, what null means, and the downstream effect on a stopped agent. Only the edge case of lowering a cap during active execution is unaddressed.

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 coverage is 100% and the schema already documents agent_id as a UUID and limit_usd as a nullable cap with 'null removes the cap'. The description's 'null = unlimited' mostly restates that, though it does add the semantic nuance that removal means unbounded rather than zero.

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

Purpose4/5

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

The description uses a specific verb+resource pair ('Set or remove the cap') tied to an agent's spending budget, which is clearly distinct from read-oriented siblings like get_agent_budget or list_agent_budgets. It stops short of naming a sibling explicitly, so it is clear but not fully differentiated by name.

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

Usage Guidelines4/5

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

It supplies a concrete usage scenario beyond the obvious one: the 'recovery loop' case where a budget-stopped agent can be resumed by raising the cap. It does not state exclusions or contrast with sibling budget tools, so an agent still has to infer that reads belong to get_agent_budget.

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

Deploy Server

Other Tools