Skip to main content
Glama
rpc402-mcp

rpc402-mcp

token_balance

token_balance

Retrieve a wallet's token balance on Ethereum, Solana, or Base in one paid RPC402 call, returning raw balance, decimals, symbol, and formatted amount.

Instructions

Balance of one token for one wallet, composed in a single RPC402 call ($0.002 USDC via x402): ERC-20 balanceOf+decimals+symbol (EVM) or SPL token-account sum + mint decimals (Solana). Returns balance (raw integer string), decimals, symbol (null on Solana), formatted.

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": {
      "chain": "<chain>",
      "wallet": "<wallet>",
      "token": "<token>"
    },
    "name": "token_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesChain to READ (settlement network is separate, configured by env)
tokenYesToken contract (EVM) or mint (Solana) address
walletYesWallet address: 0x… (EVM) or base58 (solana)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/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 well: it discloses that the call is paid ($0.002 USDC via x402), that it is a single composed RPC402 call rather than multiple round trips, and exactly what fields come back including the Solana-specific null symbol. It omits failure behavior, e.g. whether an invalid token or empty account still incurs the charge.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense but well-ordered sentences: purpose and cost first, composition detail second, return shape last. No filler, and the cost, which materially affects invocation decisions, is front-loaded rather than buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description enumerates every return field and its type semantics (raw integer string, decimals, symbol null on Solana, formatted), which is more than most. For a paid, three-parameter read tool the remaining gap is error and billing-on-failure behavior.

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 100% and every parameter already carries a description, so baseline is 3. The description adds only the EVM-vs-Solana address-form mapping and the note that symbol is null on Solana, which is return-value semantics rather than parameter guidance.

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 with an explicit scope constraint: 'Balance of one token for one wallet'. That scope alone separates it from the plural sibling wallet_balances, and the composition detail (ERC-20 balanceOf+decimals+symbol vs SPL token-account sum + mint decimals) pins down exactly what is computed.

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 'one token for one wallet' framing tells the agent this is the single-asset lookup rather than a portfolio sweep, and the cost line ('$0.002 USDC via x402') gives a real reason to prefer cheaper alternatives for bulk needs. It stops short of naming an alternative tool or stating 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.