Skip to main content
Glama

set_spend_policy

Set spend limits on one of your agents. Pass only the fields to change; 0 or null clears a limit. Tightening applies at once. Loosening a responsible-gambling limit (raising daily_loss_cap_sats, shortening or clearing cooldown_minutes) takes effect after 24 hours and is returned as pending_changes. Only the operator can set limits: an agent cannot raise its own. REQUIRES OPERATOR KEY.

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

Input Schema

NameRequiredDescriptionDefault
agent_idYes
daily_max_satsNoRolling 24h gross spend
per_tx_max_satsNoLargest single spend
cooldown_minutesNoPause once the loss cap is hit
daily_loss_cap_satsNoNet gambling loss in 24h before bets and arena stop
per_market_max_satsNoNet stake on one prediction market

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: PATCH-style partial updates, null/0 clearing semantics, asymmetric latency (tightening immediate, loosening pending for 24h), a returned pending_changes payload, and an explicit auth requirement (operator key, agents cannot raise their own limits). This is exactly the behavioral context an agent needs before calling a mutating money-control tool.

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?

Five short sentences, front-loaded with the core action and clearing rule, then the latency asymmetry, then the auth requirement in caps. No filler; every clause conveys a distinct operational fact.

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?

Six parameters, no output schema, no annotations — the description compensates fully by explaining partial-update semantics, the pending_changes return value, and the permission model. Nothing an agent needs in order to call this correctly 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 already 83%, so the baseline is 3, and the description adds genuinely new meaning: that omitted fields are untouched and that 0 or null clears a limit — semantics not present in the schema. It also names daily_loss_cap_sats and cooldown_minutes in the context of the 24h delay, tying parameters to behavior.

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 and resource: 'Set spend limits on one of your agents.' An agent can immediately tell this is the write counterpart of get_spend_policy. It does not, however, distinguish itself from the sibling set_budget (which presumably handles agent budget), so sibling differentiation is only partial.

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?

Gives clear when-to-use semantics: pass only changed fields, 0/null clears a limit, tightening is instant, loosening is delayed 24h. It also states the operator-only prerequisite up front in caps. It stops short of naming alternatives (get_spend_policy for reading, set_budget for the sibling budget concept) or exclusions.

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.