Skip to main content
Glama

Get top-up payment instructions

top_up
Read-onlyIdempotent

Retrieve x402 payment requirements to add USDC to an AmpleRun balance by specifying amount_micro. Returns network, contract, treasury, amount, and EIP-712 domain for signing.

Instructions

Get what it takes to top up the AmpleRun USDC balance by amount_micro with x402: the payment requirements (network, USDC contract, treasury payTo, amount, EIP-712 domain). A wallet signs them as an EIP-3009 transferWithAuthorization and repeats POST /api/v1/billing/x402/top-up with the PAYMENT-SIGNATURE header (@amplerun/sdk does this with its x402 option). This server holds no wallet, so it pays nothing; an operator who configures AMPLERUN_MCP_WALLET_KEY_FILE and allows spending lets it pay.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amount_microYesTop-up amount in micro-USDC, e.g. "5000000" for 5 USDC.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds meaningful non-annotation context: the server holds no wallet and pays nothing, and payment only occurs if an operator configures AMPLERUN_MCP_WALLET_KEY_FILE and allows spending. That caveat is genuinely useful behavioral disclosure.

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?

Three dense sentences, front-loaded with the purpose and followed by the usage flow and the wallet caveat. Every sentence carries information, though the parenthetical SDK reference and final sentence are somewhat wordy for an otherwise tight definition.

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?

Despite no output schema, the description enumerates what is returned (network, USDC contract, treasury payTo, amount, EIP-712 domain) and explains the downstream signing/POST step. Combined with full annotation coverage, an agent has everything needed to call and consume this tool correctly.

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 description coverage is 100% and the single parameter is fully documented with a regex pattern and a concrete example, so the schema carries the burden. The description only restates amount_micro, adding no format or constraint detail beyond the schema; baseline 3 applies.

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 ('Get what it takes to top up the AmpleRun USDC balance'), names the exact protocol (x402) and enumerates the returned payment requirements (network, USDC contract, payTo, amount, EIP-712 domain). This is clearly distinguishable from siblings like get_balance and get_quote.

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?

Explains the intended flow clearly: fetch requirements here, then sign as EIP-3009 transferWithAuthorization and repeat the POST with the PAYMENT-SIGNATURE header. It gives strong context for when this tool is used, but does not explicitly name alternatives or state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.