Skip to main content
Glama

AI Code Security Gate

Set Agent Budget

set_budget
Idempotent

Set or update a per-agent spending budget (cents). Free — this is configuration, not a metered call.

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>",
      "max_limit_cents": "<max_limit_cents>"
    },
    "name": "set_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyNo
agent_idYes
max_limit_centsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

'Free — this is configuration, not a metered call' is genuinely valuable context in a spend-related tool family and confirms the idempotentHint annotation. Beyond that it adds nothing about overwriting an existing budget or any authorization requirements for the agent_id being modified.

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

Conciseness5/5

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

Two short sentences with the core verb and resource front-loaded and the cost clarification second. No filler or restatement of the title.

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?

An output schema exists, so return values need no explanation, and the mutation/upsert behavior is covered. The only gap is the undocumented api_key parameter and no hint about what happens when the budget is exceeded.

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?

With 0% schema coverage, the description must compensate. It does clarify the units of max_limit_cents (cents) and the per-agent scoping of agent_id, which the bare schema does not. The optional api_key parameter remains unexplained.

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?

States a specific verb pair (set or update) and resource (per-agent spending budget) and clarifies the unit is cents. It is distinguishable from the spend-tracking siblings because it declares itself as configuration rather than a metered call, though no sibling is named directly.

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?

'Set or update' implies create-or-overwrite semantics, which is useful. However, it never says when an agent should set a budget versus checking one with spend_check or recording spend with spend_record, leaving the routing decision 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.