Skip to main content
Glama

Set agent spend caps

spend_cap_set
Idempotent

0.005 USDC per call via x402, no key (unpaid call returns PaymentRequired; retry with params.meta["x402/payment"]). Advisory spend caps that complement your wallet's enforced hard limits (Coinbase Agentic Wallet / CDP spendControls); cannot block payments. Set per-call / per-day (rolling 24h) / per-session USD limits and optional allow-lists (payTo, hosts, networks) for a payer wallet address (replaces the previous policy for that payer). Optional ownerLock secret so the agent cannot loosen the caps later. Advisory and non-custodial. Needs a key mts (X-API-Key header or apiKey argument). No key? call settle_trial_key (free, 50 calls/7 days). Full plan 1 USDC/30d incl. 1,000 calls via x402.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "spend_cap_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
payerNoPayer / agent wallet address 0x… (40 hex).
apiKeyNoYour MoneyTools Settle key mts_… (alternative to the X-API-Key header). No key: call settle_trial_key.
ownerLockNoOwner secret (>=12 chars); once set, caps can only be loosened with it.
perDayUsdNoMax USD per rolling 24h.
allowHostsNoAllowed seller hostnames.
allowPayToNoAllowed seller payTo addresses.
perCallUsdNoMax USD per single payment, e.g. "0.10".
allowNetworksNoAllowed CAIP-2 networks.
perSessionUsdNoMax USD per sessionId.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Goes well past the annotations by disclosing that caps are advisory and 'cannot block payments', that setting replaces the prior policy for the payer, that ownerLock freezes caps against later loosening, and that the service is non-custodial. What's missing is the response shape on success/failure and any conflict behavior with the wallet's enforced limits beyond 'complement'.

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?

Dense and packed with useful facts, but the opening sentence leads with x402 pricing and payment retry mechanics rather than the tool's purpose, and the closing plan pitch ('Full plan 1 USDC/30d incl. 1,000 calls') is promotional rather than operational.

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

Completeness3/5

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

Covers auth, cost, advisory semantics and the replace-the-policy caveat for a 9-parameter write tool with no output schema. However, with no output schema and no description of the return payload or what happens to unspecified cap fields on replacement, an agent still guesses at the result.

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; the description earns an extra point by adding semantics the schema does not state — that the write wholesale replaces the payer's previous policy, and that ownerLock exists specifically so 'the agent cannot loosen the caps later'.

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?

States a specific verb and resource ('Set per-call / per-day (rolling 24h) / per-session USD limits and optional allow-lists (payTo, hosts, networks) for a payer wallet address') and its 'set' semantics contrast cleanly with the sibling spend_cap_get. An agent immediately knows this writes a policy rather than reading one.

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 prerequisite and fallback routing explicitly: 'Needs a key mts_ ... No key? call settle_trial_key (free, 50 calls/7 days)', plus the x402 payment retry path and plan pricing. It doesn't say when to prefer spend_check or spend_cap_get over this, but the use context is unambiguous.

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