Skip to main content
Glama

eth_getUncleByBlockNumberAndIndex

Retrieve an uncle (ommer) block by block number and uncle index position to access valid blocks not included in the main chain.

Instructions

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

Args:

  • blockNumber (string): Block number as hex (e.g., '0x10d4f') or tag ('latest', 'earliest', 'pending')

  • 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 specific block": { "blockNumber": "0x29c", "index": "0x0" }

  • "Get uncle from latest block": { "blockNumber": "latest", "index": "0x0" }

Errors:

  • InvalidParams: When blockNumber or index format is invalid

  • InternalError: When Infura API is unavailable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockNumberYesThe block number in hexadecimal format.
indexYesThe index of the uncle in hexadecimal format.
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, but description explains return value (null if not found), errors (InvalidParams, InternalError). Lacks readOnly disclosure but is inherently read-only.

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?

Well-organized with sections (Args, Returns, Examples, Errors), succinct sentences, no wasted words.

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?

Fully covers parameters, return object fields, and error cases. No gaps given the tool's simplicity and lack of output schema.

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?

Adds significant value beyond schema: explains hex format, tag shortcuts, index zero-based meaning, and provides concrete 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 clearly states it retrieves an uncle block by block number and index, distinguishing it from sibling tools like eth_getUncleByBlockHashAndIndex.

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?

Provides examples and implies usage context, but doesn't explicitly state when not to use or compare to alternatives. Still clear enough for an agent.

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