Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

get_balance_ether

Check ETH balance for any Ethereum address on Arbitrum networks using this tool. Query wallet holdings to monitor funds across Arbitrum chains.

Instructions

Get balance of an address in ETH

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpcUrlNoThe RPC URL of the chain (optional if default is set)
addressYesEthereum address to check balance for

Implementation Reference

  • MCP tool handler for 'get_balance_ether': resolves RPC URL, instantiates EthereumAccountClient, calls getBalanceInEther on the provided address, formats response as text content.
    case "get_balance_ether": {
      const rpcUrl = await this.resolveRpcUrl(
        (args.rpcUrl as string) || (args.chainName as string)
      );
      const ethereumAccountClient = new EthereumAccountClient(rpcUrl);
      const balanceEth = await ethereumAccountClient.getBalanceInEther(
        args.address as string
      );
      return {
        content: [
          {
            type: "text",
            text: `Balance: ${balanceEth} ETH`,
          },
        ],
      };
    }
  • src/index.ts:962-980 (registration)
    Tool registration definition in getAvailableTools(): specifies name 'get_balance_ether', description, and input schema requiring 'address' (rpcUrl and chainName optional). Used for list tools response.
    {
      name: "get_balance_ether",
      description: "Get balance of an address in ETH",
      inputSchema: {
        type: "object" as const,
        properties: {
          rpcUrl: {
            type: "string",
            description:
              "The RPC URL of the chain (optional if default is set)",
          },
          address: {
            type: "string",
            description: "Ethereum address to check balance for",
          },
        },
        required: ["address"],
      },
    },
  • Input schema definition for 'get_balance_ether' tool: object with optional rpcUrl/chainName and required address string.
    inputSchema: {
      type: "object" as const,
      properties: {
        rpcUrl: {
          type: "string",
          description:
            "The RPC URL of the chain (optional if default is set)",
        },
        address: {
          type: "string",
          description: "Ethereum address to check balance for",
        },
      },
      required: ["address"],
    },
  • Primary helper implementation: getBalanceInEther(address) converts wei balance to human-readable ETH string, handling integer and decimal cases precisely.
    async getBalanceInEther(address: string): Promise<string> {
      const weiBalance = await this.getBalance(address);
      const wei = BigInt(weiBalance);
      const ether = wei / BigInt('1000000000000000000');
      const remainder = wei % BigInt('1000000000000000000');
      
      if (remainder === BigInt(0)) {
        return ether.toString();
      } else {
        const etherDecimal = Number(wei) / 1e18;
        return etherDecimal.toFixed(6).replace(/\.?0+$/, '');
      }
    }
  • Supporting helper: getBalance(address) performs raw 'eth_getBalance' RPC call at latest block, returns wei hex string.
    async getBalance(address: string): Promise<string> {
      const balance = await this.makeRpcCall('eth_getBalance', [address, 'latest']);
      return balance;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states a read operation ('Get balance'), implying it's non-destructive, but lacks details on permissions, rate limits, error handling, or return format. This is insufficient for a tool with potential network dependencies.

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?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core purpose and efficiently communicates the essential action without unnecessary elaboration.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the balance return value looks like (e.g., in wei or ETH), error conditions, or dependencies on the RPC URL. This leaves significant gaps for an AI agent to use the tool effectively.

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%, so the input schema fully documents both parameters. The description adds no additional semantic context about parameters beyond what's in the schema, such as address format validation or RPC URL implications. Baseline 3 is appropriate when the schema does the heavy lifting.

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 description clearly states the action ('Get balance') and resource ('of an address in ETH'), making the purpose immediately understandable. However, it doesn't differentiate from the sibling tool 'get_balance' (without 'ether'), leaving ambiguity about when to use one versus the other.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as the sibling 'get_balance' tool. There's no mention of prerequisites, constraints, or typical use cases, leaving the agent to infer usage context independently.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dewanshparashar/arbitrum-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server