eth_getUncleCountByBlockNumber
Retrieve the count of uncle blocks for a given Ethereum block number or tag, with optional network selection.
Instructions
Returns the number of uncle (ommer) blocks in a specific block identified by its number or tag.
Args:
blockNumber (string, optional): Block number as hex (e.g., '0x10d4f') or tag ('latest', 'earliest', 'pending'), defaults to 'latest'
network (string, optional): Ethereum network to query, defaults to 'mainnet'
Returns:
Hex-encoded integer representing the number of uncles in the block (e.g., '0x0' for no uncles, '0x2' for two uncles)
Examples:
"Get uncle count for latest block": {}
"Get uncle count for specific block": { "blockNumber": "0x29c" }
"Query on Sepolia": { "blockNumber": "latest", "network": "sepolia" }
Errors:
InvalidParams: When blockNumber format is invalid
InternalError: When Infura API is unavailable
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blockNumber | No | The block number or tag (latest, earliest, pending) to get the uncle count for. | latest |
| network | No | The Ethereum network to query, e.g., 'mainnet' or 'sepolia'. | mainnet |
| response_format | No | Output format: 'json' for structured data, 'markdown' for human-readable. | json |