Skip to main content
Glama

set_spend_policy

Idempotent

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_idYesAgent id (integer) from list_agents, for example 7
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. Changed1 schema field changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Agent id (integer) from list_agents, for example 7"
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond annotations: it discloses that tightening applies immediately while loosening responsible-gambling limits is delayed 24 hours and surfaced in `pending_changes`. It also flags the operator-key requirement and that an agent cannot raise its own limit. Annotations only cover readOnly/idempotent/destructive hints, so this added context is genuinely valuable.

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?

Front-loads the action, then the update semantics, then the delay behavior, then the permission constraint. Every sentence carries distinct information, and the uppercase operator-key warning is a justified escalation.

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 six-parameter mutation tool with no output schema, the description covers partial-update semantics, clearing rules, delayed application, the pending_changes return signal, and authorization. Nothing an agent needs to call it 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 100%, so the baseline is 3, but the description adds real meaning the schema lacks: 0 versus null both clear a limit, and `daily_loss_cap_sats`/`cooldown_minutes` are identified as responsible-gambling fields subject to the 24-hour delay. It does not explain `per_market_max_sats` or `per_tx_max_sats` beyond what the schema says.

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 with scope: "Set spend limits on one of your agents." That is unambiguous and clearly the write counterpart to a read tool. It never names the sibling `get_spend_policy` explicitly, so it falls short of full sibling differentiation.

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 strong operational context: partial updates via "Pass only the fields to change", clearing semantics via "0 or null clears a limit", and the permission boundary via "Only the operator can set limits". No explicit when-not or named alternative (e.g. read with get_spend_policy first), which keeps it below a 5.

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.