ERC-20 token metadata on Base ($0.002)
token_metadataPAID ($0.002 USDC via x402). Name, symbol, decimals and total supply for any ERC-20 contract on Base — the identity fields an agent needs before pricing or safety-checking a token. Without payment this returns the 402 challenge; the fiatdock-mcp npm package pays automatically. A non-ERC-20 / bad address returns 4xx and is NOT charged; on any RPC failure it returns 5xx and is NOT charged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | An ERC-20 contract address (0x…, 40 hex) on Base | |
| payment | No | Base64 of a single x402 v2 PaymentPayload (EIP-3009 transferWithAuthorization on Base USDC). OMIT it on the first call: the 402 you get back carries `howToPay.payloadTemplate` — the exact envelope to fill in — plus the price and the EIP-712 domain. Send it on the second call to complete the purchase; it is forwarded as the PAYMENT-SIGNATURE header, never as body data. Nothing is charged for the 402 itself, and a call that fails after payment settles nothing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | Yes | ISO 8601 read time | |
| name | Yes | Token name (null if the contract omits name()) | |
| symbol | Yes | Token symbol (null if the contract omits symbol()) | |
| network | Yes | Chain read (always base) | |
| contract | Yes | The ERC-20 contract address queried | |
| decimals | Yes | Token decimals | |
| totalSupply | Yes | Total supply as a decimal string (null if unavailable) | |
| totalSupplyAtomic | Yes | Total supply in atomic units (string; null if unavailable) |