Skip to main content
Glama

eth_getUncleCountByBlockHash

Count uncle (ommer) blocks for a given block hash on Ethereum networks. Returns a hex-encoded integer.

Instructions

Returns the number of uncle (ommer) blocks in a specific block identified by its hash.

Args:

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

  • 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 block": { "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35" }

  • "Query on Sepolia": { "blockHash": "0xabc...", "network": "sepolia" }

Errors:

  • InvalidParams: When blockHash is not a valid 32-byte hex string

  • InternalError: When Infura API is unavailable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockHashYesThe 32-byte block hash to query.
networkNoThe Ethereum network to query, e.g., 'mainnet' or 'sepolia'.mainnet
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable.json
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It explains the return format (hex-encoded integer), lists example outputs, and describes possible errors (InvalidParams, InternalError). However, it does not disclose rate limits, authentication requirements, or potential side effects.

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 front-loaded with the core purpose and uses minimal but sufficient text. Every sentence provides essential information.

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 the moderate complexity of the tool and no output schema, the description fully explains inputs, outputs (including format and examples), and error cases. An agent can correctly invoke the tool based on this description alone.

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 coverage is 100%. The description adds context to blockHash (example format '0xabc...') and network (defaults to 'mainnet', examples like 'sepolia'). For response_format, it clarifies the difference between 'json' and 'markdown' beyond the enum. This adds meaningful value.

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 'Returns the number of uncle (ommer) blocks in a specific block identified by its hash.' It specifies the verb 'returns', the resource 'uncle count', and the required input 'block hash'. It is distinct from siblings like eth_getUncleByBlockHashAndIndex and eth_getUncleCountByBlockNumber.

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 eth_getUncleCountByBlockNumber or eth_getUncleByBlockHashAndIndex. It does not mention when not to use it or any prerequisites.

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