Skip to main content
Glama

accountCredit

Adds prepaid credit to an account, in USDC. Past the period's units a keyed call or a linked box's watch hit draws it (see Overage under Accounts), and it never expires.

  • Cost: The amount in the body, at least 1 USDC, paid over x402. Anyone may pay, not only the owner. No key and no signature.

  • Inputs: address (path), any letter case, and amount (body), whole USDC base units as a string: "1000000" is 1 USDC. The 402 asks for exactly that. A missing amount is priced at the minimum, and an amount under it is refused with 400 before anything settles.

  • Returns: accountId and credit: added and the balance after this payment, in base units.

  • Errors:

    • 400 invalid_request: amount is missing, not a whole number, or under 1 USDC. Nothing settles.

    • 404 account_not_found: the address has no account. Create one with accountCreate. Nothing settles.

  • Next:

    • accountStatus: read the credit balance and what 1,000 units cost from it.

    • boxStatus: a linked box that was paused for want of units is active again.

Costs at least 1 USDC, the amount in the body; the exact amount comes back in the payment-required result. Payment goes in params._meta["x402/payment"]; use an x402-aware MCP client (see https://docs.arcgate.dev/#arcgate/description/mcp-for-agents).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesHow much credit to buy, in USDC base units (6 decimals) as a whole-number string: "1000000" is 1 USDC. At least the deployment's minimum (the 400 names it); the payment-required amount is exactly this. Left out, the 402 quotes the minimum.
addressYesThe account owner's address, any letter case. One account per address, and a signed request must be signed by it.

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 richly: it discloses the x402 payment flow (payment goes in params._meta["x402/payment"], needs an x402-aware client), that no key/signature is required, that credit never expires, the 1 USDC minimum and 400-before-settlement behavior, and exact error codes with side-effect status.

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?

Front-loaded purpose sentence followed by scannable labeled bullets (Cost, Inputs, Returns, Errors, Next), which is efficient for a multi-faceted tool. The closing paragraph restates the minimum cost and body-amount point already made in the Cost bullet, a minor redundancy.

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 2-parameter payment tool with no output schema and no annotations, it covers cost, payment channel, inputs, return fields (accountId, credit.added, balance), error codes with settlement guarantees, and next-step tools. Nothing needed 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 already 100%, so the baseline is 3, but the description adds real meaning: the base-unit string convention ("1000000" = 1 USDC), that the 402 quotes exactly the amount, and the fallback/refusal behavior for missing or sub-minimum amounts. It does not add much on `address` beyond the schema, keeping it just shy of 5.

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 ('Adds prepaid credit to an account, in USDC') and immediately frames it as overage credit drawn past a period's units, which separates it from siblings like boxTopUp or boxUnitsBuy. An agent can identify the operation without opening the schema.

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?

Explicitly covers when credit is consumed (keyed calls or a linked box's watch hit past the period's units), who may invoke it (anyone, no key or signature), and routes to alternatives for follow-up: accountStatus for balances, accountCreate on 404, boxStatus for reactivated boxes. Conditions and alternatives are both named.

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