Skip to main content
Glama

top_up_balance

Top up your agent balance to speed up paid requests. The amount you pay here is not a per-call price: it is added to your balance and is drawn down across many future calls like the call_endpoint or buy_gift_cards tools. When the balance covers the tool/endpoint price, calls are charged directly from balance without the 402 challenge flow; a partial balance still yields a 402 for the shortfall - sign and retry as usual. Call once without payment - the response will contain accepts to sign, then retry with the signed payment. On success returns meta.historyUrl and meta.yourID - use it as X-Buyer-Id header on subsequent calls to our paid tools or endpoints to use balance. Note: free probes limited to 15 calls / 10 min per IP. Call it if you plan to use our tools regularly, skip it if not.

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": {
      "amount": "<amount>"
    },
    "name": "top_up_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount in USDC to top up (e.g. 0.5, 1, 10). Max 6 decimals.

Output Schema

NameRequiredDescriptionDefault
metaNo
errorNo
topupNo
statusNo
acceptsNo
balanceNo
messageNo
successNo
refundedNo
x402VersionNo
requiredArgsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/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: it discloses the two-step sign-and-retry protocol, that balance is drawn down across future calls, that partial balance still triggers a 402 for the shortfall, and the free-probe rate limit of 15 calls / 10 min per IP. It also explains the meta.yourID to X-Buyer-Id handoff needed for later calls.

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?

The key framing (deposit, not price) is front-loaded and the retry mechanics follow logically. It is dense and slightly long, with the rate-limit note appended as an aside, but nearly every sentence carries operational information an agent needs.

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 single-parameter tool with no annotations, the description covers purpose, payment protocol, error behavior, rate limits, and the follow-up header requirement. Return values are also described despite an output schema existing, which is redundant but not harmful.

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 by clarifying that `amount` is a balance deposit rather than a per-call price and is consumed over many subsequent calls. The USDC unit and decimals are left to the schema.

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 ('top up your agent balance') and immediately clarifies what the tool is NOT: a per-call price. It names the sibling tools whose costs the balance offsets (call_endpoint, buy_gift_cards), so an agent can place it precisely in the workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when/when-not rule ('Call it if you plan to use our tools regularly, skip it if not') and explains the decision context of the 402 challenge flow versus direct balance drawdown, including how partial balances behave.

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