Skip to main content
Glama

ExchangeRebel — pay-per-call APIs for AI agents (x402 on Solana)

spend_check

Check a proposed agent spend against the agent's budget policy. $0.01 per call — USDC on Solana via x402 (over MCP: call without payment to get the PaymentRequired challenge, then retry with the payment at _meta["x402/payment"]). HTTP equivalent: POST https://exchangerebel.com/toll/spend/check.

Input Schema

NameRequiredDescriptionDefault
agent_idNostring
categoryNostring (optional)
recipientNostring (optional)
amount_usd_centsNointeger

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Adds substantial context beyond annotations: a hard price ($0.01/call), the USDC-on-Solana/x402 payment rail, the 402-challenge-then-retry handshake, and the _meta["x402/payment"] slot — all consistent with readOnlyHint=false and idempotentHint=false. It does not warn that retrying an already-paid call may incur a second charge, which matters given non-idempotency.

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?

Purpose is front-loaded in the first sentence and the second sentence is dense but every clause is operationally load-bearing (price, chain, asset, MCP handshake, payment key, HTTP endpoint). Slightly overpacked for a single sentence, but no filler.

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?

With no output schema, the description never says what a successful check returns (approved/denied? remaining budget? denial reason?) or what happens on rejection, which is the agent's actual decision input. Payment mechanics are covered thoroughly; the result contract and the zero-required-parameter anomaly are not.

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 nominally 100%, but the field descriptions are placeholders ('string', 'integer', 'string (optional)') that carry no meaning, and the description never mentions agent_id, category, recipient, or amount_usd_cents. Baseline 3 applies by the coverage rule, but the description does nothing to compensate for the hollow schema text or to clarify why the schema reports zero required parameters for what look like required inputs.

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 ('Check a proposed agent spend') plus the exact decision context ('against the agent's budget policy'), so an agent knows this is a pre-spend authorization check with no ambiguity. No sibling tool in the list covers budget adjudication, and the description makes that scope explicit.

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?

The framing 'proposed ... spend' implies the when (before committing a payment) and the second sentence gives concrete invocation sequencing: call without payment to receive the PaymentRequired challenge, then retry with payment. It stops short of explicit exclusions or naming an alternative tool, but the operational context is clear.

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