Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
blockNumberNoThe block number or tag (latest, earliest, pending) to get the uncle count for.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?

No annotations are provided, so the description carries the full burden. It transparently describes the return format (hex integer), provides examples, and lists possible errors. It does not mention any side effects or authentication needs, but for a read-only query tool, it is adequately transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for Args, Returns, Examples, and Errors. It is moderately concise; each section earns its place. A slight reduction in examples could improve conciseness, but overall it is well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity, the description covers purpose, parameters, return values, and errors. No output schema exists, but the description sufficiently explains the return format. It is complete for an agent to use correctly.

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

Parameters3/5

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

Schema coverage is 100%, providing a baseline of 3. The description adds meaning for 'blockNumber' (hex or tag) and 'network' (examples), but it omits the 'response_format' parameter entirely, which is included in the schema. Thus, it adds some value but not complete coverage.

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 number or tag.' It provides a specific verb and resource, and the sibling tools show a distinct variant for block hash, ensuring no confusion.

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 includes args, defaults, examples, and errors, clearly indicating when to use this tool (e.g., for uncle count by block number/tag). However, it does not explicitly state when not to use it or mention alternative tools like eth_getUncleCountByBlockHash, though the context is sufficient.

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