Skip to main content
Glama

eth_getBalance

Retrieve the ETH balance of any Ethereum address at a specified block (latest, earliest, or pending) across multiple networks.

Instructions

Get the ETH balance of an address at a specific block.

Args:

  • address (string): Ethereum address to check (20-byte hex, e.g., '0x...').

  • tag (string): Block reference - 'latest', 'earliest', or 'pending'.

  • network (string, optional): Ethereum network to query. Defaults to 'mainnet'.

Returns:

  • Hexadecimal string representing balance in wei (e.g., '0xde0b6b3a7640000' for 1 ETH).

Examples:

  • "Get current balance": { "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "tag": "latest" }

  • "Check Sepolia balance": { "address": "0x...", "tag": "latest", "network": "sepolia" }

Errors:

  • InvalidParams: When address format is invalid or tag is not recognized.

  • InternalError: When Infura API is unavailable or returns an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Ethereum address to check the balance for.
tagNoThe block parameter to use.latest
networkNoThe Ethereum network to query, e.g., 'mainnet' or 'sepolia'.mainnet
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable.json
Behavior4/5

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

With no annotations provided, the description fully carries the burden. It discloses the return format (hexadecimal string in wei), lists possible errors, and provides examples. It does not overpromise or hide side effects (none expected).

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 well-organized with clear sections (Args, Returns, Examples, Errors). It is concise yet comprehensive—every sentence adds useful information without redundancy.

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?

The tool is simple, and the description covers all necessary aspects: purpose, parameters, return format, usage examples, and error cases. There is no output schema, so the description adequately explains the return value. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds significant value: it explains the address format, enumerates tag options with meanings, clarifies the network parameter with a default, and includes concrete examples. This goes well beyond the schema descriptions.

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 clearly states it retrieves the ETH balance of an address at a specific block. The verb 'Get' and resource 'ETH balance' are specific, and it distinguishes itself from sibling tools like eth_call or eth_getTransactionByHash, which have different purposes.

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 description implicitly clarifies usage by specifying exactly what the tool does (get balance). It does not explicitly mention when not to use it or list alternatives, but the context of sibling tools makes it clear this is the correct tool for balance queries.

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/Qbandev/infura-mcp-server'

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