Skip to main content
Glama

eth_getUncleByBlockHashAndIndex

Retrieve an uncle (ommer) block using its parent block hash and uncle index.

Instructions

Retrieves an uncle (ommer) block by block hash and uncle index position. Uncles are valid blocks that were not included in the main chain but are referenced by main chain blocks.

Args:

  • blockHash (string): 32-byte hash of the block containing the uncle (e.g., '0xabc123...')

  • index (string): Zero-based uncle index position as hex (e.g., '0x0' for first uncle)

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

Returns:

  • Uncle block object with hash, parentHash, sha3Uncles, miner, stateRoot, number, gasLimit, gasUsed, timestamp, difficulty, nonce; null if not found

Examples:

  • "Get first uncle in block": { "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "index": "0x0" }

Errors:

  • InvalidParams: When blockHash or index format is invalid

  • InternalError: When Infura API is unavailable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockHashYesThe 32-byte block hash of the block.
indexYesThe index of the uncle.
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?

No annotations are provided, so the description carries full burden. It discloses returns null if not found, lists error types (InvalidParams, InternalError), and explains uncles are ommers. It could mention the read-only nature explicitly, but overall good coverage.

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-structured with clear sections (Args, Returns, Examples, Errors). It is concise with no redundant sentences, and every sentence adds value.

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?

Given 4 parameters, no output schema, the description fully explains the return object fields, null case, optional network parameter, and error conditions. It is complete for the tool's complexity.

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 description coverage is 100%, but the description adds value by clarifying the hex format for the index parameter with an example and providing a usage example. It enhances understanding beyond the schema.

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 the tool retrieves an uncle block by block hash and uncle index, specifying the resource (uncle block) and action (retrieves). It distinguishes from siblings like eth_getUncleByBlockNumberAndIndex by using different indexing.

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

Usage Guidelines3/5

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

The description explains when to use the tool (to get uncles) and provides parameter details, but does not explicitly state when not to use it or compare with alternatives. Sibling tools provide context, but the description lacks explicit exclusions.

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