Skip to main content
Glama

evm_get_account_info

Retrieve complete account state on an EVM chain in one call, including balance, nonce, contract status, and bytecode to verify accounts and contracts.

Instructions

Get comprehensive account information including balance, nonce, contract code, and account type.

Retrieves complete account state from the blockchain in a single call. More efficient than multiple separate queries for balance, nonce, and contract status.

CRITICAL RULES:

  • Returns balance in both wei and ether units

  • Nonce indicates number of transactions sent from this address

  • Contract code is returned if address is a smart contract

  • All data reflects current blockchain state (not historical)

PARAMETERS:

  • chain: EVM chain to query (required)

    • Account state is chain-specific

    • Same address can have different states on different chains

  • address: Ethereum address to query (required)

    • Format: 0x followed by 40 hexadecimal characters

    • Works for both EOA and contract addresses

    • Example: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

EXAMPLES: ✅ Check wallet account info: {chain: "ethereum", address: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"}

✅ Inspect contract account: {chain: "polygon", address: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619"}

✅ Verify nonce before transaction: {chain: "bsc", address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"}

❌ Invalid - wrong format: {chain: "ethereum", address: "0x123"}

❌ Invalid - not checksummed warning: {chain: "polygon", address: "0X742D35CC6634C0532925A3B844BC9E7595F0BEB"}

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 operation success • address: Queried address • balance: Object with wei (string) and ether (string) values • nonce: Transaction count (number of txs sent from this address) • isContract: Boolean indicating if this is a contract • contractCode: Hex string of bytecode (if contract), null otherwise • codeHash: Keccak256 hash of contract code • executionTime: Time taken in milliseconds

COMMON MISTAKES:

  • Expecting historical balance (this returns current state only)

  • Confusing nonce with transaction count (nonce = sent transactions only)

  • Not checking isContract before attempting contract interactions

  • Assuming zero nonce means unused address (could have received funds)

USE CASES:

  • Get complete account overview in one call

  • Verify account has sufficient balance and correct nonce before signing

  • Determine if address is contract before attempting transfer

  • Audit account state for analytics

  • Debug transaction nonce issues

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>",
      "address": "<address>"
    },
    "name": "evm_get_account_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesEVM chain to query
addressYesEthereum address (0x... - 42 characters)

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 behavioral burden and does well: it states that data reflects current state only, that account state is chain-specific, and that contract code is returned only for contracts. It also describes nonce semantics and the output shape, though irrelevant gas and testnet commentary dilutes focus.

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 description is front-loaded and sectioned, but it is heavily bloated with gas considerations, testnet faucet notes, generic use cases, and even Linux-specific notes unrelated to this tool. Much of that content does not earn its place and increases the chance of distracting the agent.

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 two-parameter read tool with full schema coverage, the description is complete: it explains purpose, parameters, behavior, output fields, and common pitfalls. No output schema exists, and the inline output structure compensates for that.

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 100%, so the schema already documents both parameters. The description still adds value by explaining that account state is chain-specific, that the same address can differ across chains, and that addresses work for both EOA and contract accounts with format examples.

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?

The description states a specific verb and resource: it retrieves comprehensive account state, including balance, nonce, contract code, and account type. It also distinguishes the tool from separate balance, nonce, and contract-status queries by presenting it as a single-call alternative.

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?

It provides multiple concrete use cases and examples, such as checking wallet info, inspecting contracts, and verifying nonce before transactions. However, it does not explicitly name overlapping siblings like evm_get_balance, evm_get_code, or evm_get_wallet_info, so routing is still partly inferential.

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