Skip to main content
Glama

evm_get_token_info

Retrieve ERC20 token metadata—name, symbol, decimals, and total supply—using a chain and contract address to validate tokens and format amounts correctly.

Instructions

Get comprehensive ERC20 token metadata and information from any EVM chain.

Fetches name, symbol, decimals, and total supply directly from the token contract's public methods. Essential for understanding token properties before interacting with it.

CRITICAL RULES:

  • Token MUST implement ERC20 standard interface (name(), symbol(), decimals(), totalSupply())

  • Some tokens may not implement optional methods like name() or symbol()

  • Decimals are critical for proper amount formatting (6 for USDC, 18 for most)

  • Total supply can be 0 for deflationary tokens or before minting

  • Information is read-only, no gas cost (view function)

PARAMETERS:

  • chain: EVM chain where token is deployed (required)

    • Token must be deployed on specified chain

    • Same token name may exist on multiple chains with different addresses

    • Chain-specific deployment addresses

  • tokenAddress: ERC20 token contract address (required)

    • Format: 0x followed by 40 hex characters

    • Must be deployed contract with ERC20 interface

    • Examples: USDC, DAI, WETH, custom tokens

EXAMPLES: ✅ Get USDC info on Polygon: {chain: "polygon", tokenAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}

✅ Get DAI info on Ethereum: {chain: "ethereum", tokenAddress: "0x6B175474E89094C44Da98b954EedeAC495271d0F"}

✅ Get custom token info on BSC: {chain: "bsc", tokenAddress: "0x..."}

❌ Invalid - native token (no contract): {chain: "polygon", tokenAddress: "0x0000000000000000000000000000000000000000"}

❌ Invalid - not an ERC20 token: {chain: "ethereum", tokenAddress: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"} // NFT contract

SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559

CRITICAL GAS CONSIDERATIONS:

  • Ethereum: High gas costs, use gas oracle for timing

  • Polygon/BSC: Very low gas, safe for frequent transactions

  • Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum

  • Avalanche: Dynamic fees, can spike during congestion

  • Always check gas price before executing transactions

TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.

OUTPUT STRUCTURE: • success: Boolean indicating query success • chain: Chain queried • tokenAddress: Token contract address • name: Token name (e.g., "USD Coin") • symbol: Token symbol (e.g., "USDC") • decimals: Number of decimals (6, 8, or 18 typically) • totalSupply: Total token supply (raw units and formatted) • executionTime: Time taken in milliseconds

COMMON MISTAKES:

  • Trying to get info for native tokens (ETH, POL don't have contracts)

  • Using token address from wrong chain

  • Not checking decimals before formatting amounts

  • Assuming all tokens have 18 decimals (USDC has 6)

  • Confusing token symbol with token name

USE CASES:

  • Verify token authenticity before trading

  • Get decimals for proper amount formatting

  • Check total supply for tokenomics analysis

  • Display token metadata in UI

  • Validate token contract before approvals

DECIMALS IMPACT:

  • 18 decimals: 1 token = 1000000000000000000 raw units

  • 6 decimals: 1 token = 1000000 raw units (USDC, USDT)

  • 8 decimals: 1 token = 100000000 raw units (WBTC)

OPTIONAL METHODS: Some tokens may not implement name() or symbol():

  • Fallback to "Unknown" if not implemented

  • Core method decimals() is usually present

  • totalSupply() is part of standard ERC20

Running on Linux.

LINUX-SPECIFIC NOTES:

  • Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)

  • Python 3 is typically 'python3' command

  • GNU tools are standard

  • Use 'xdg-open' command to open files/applications

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>",
      "tokenAddress": "<tokenAddress>"
    },
    "name": "evm_get_token_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesEVM chain to query
tokenAddressYesERC20 token contract address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does so well: it declares the operation read-only with no gas cost (view function), documents graceful degradation ('Fallback to "Unknown" if not implemented' for name()/symbol()), and supplies an OUTPUT STRUCTURE listing every returned field, compensating for the absent output schema. Deductions come from irrelevant sections — transaction gas-cost advice and a Linux/apt/pacman footer have nothing to do with a read-only metadata call and add noise rather than behavioral insight.

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

Conciseness2/5

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

The useful content (purpose, parameters, examples, output structure) is front-loaded and well-sectioned, but the definition is heavily padded: an eleven-line gas-cost essay irrelevant to a view function, a testnet faucet note, a redundant decimals arithmetic primer, and a trailing 'Running on Linux / apt / yum / pacman' block that is entirely off-topic. Roughly half the text does not earn its place and dilutes the operative rules.

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?

For a two-parameter read tool with no output schema, the definition is more than adequately complete: it documents the return fields, edge cases (zero total supply, missing optional methods), invalid inputs, and per-chain deployment semantics. Only the unrelated environment/gas sections keep it from being a clean 5.

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% and the enum is defined, so the baseline is 3; the description earns an extra point by adding meaning beyond the schema — chain-specific deployment addresses, the note that the same symbol can exist at different addresses per chain, the 0x + 40 hex format, and negative examples such as the zero address (native token) and an NFT contract address. That materially reduces misuse of the tokenAddress parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first two sentences state a specific verb and resource ('Get comprehensive ERC20 token metadata'), and enumerate exactly what is fetched (name, symbol, decimals, totalSupply), which implicitly separates it from the single-field siblings like evm_get_token_decimals or evm_get_token_symbol. It never explicitly names those siblings as narrower alternatives, so an agent must infer the aggregation relationship rather than being told it.

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?

A USE CASES block (verify authenticity, get decimals for formatting, tokenomics analysis, UI display) and a COMMON MISTAKES block give clear situational guidance, and the ✅/❌ examples show valid versus invalid inputs. What is missing is explicit routing: nothing says to prefer this tool over evm_get_token_decimals/evm_get_token_name when only a single field is needed.

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

Deploy Server

Other Tools