eth_getBlockNumber
Fetch the current block number of an Ethereum network via Infura. Defaults to mainnet, supports networks like Sepolia.
Instructions
Fetch the latest block number from an Ethereum network.
Args:
network (string, optional): Ethereum network to query. Defaults to 'mainnet'.
Returns:
Hexadecimal string representing the current block number (e.g., '0x10d4f').
Examples:
"Get mainnet block number": {}
"Get Sepolia block number": { "network": "sepolia" }
Errors:
InternalError: When Infura API is unavailable or returns an error.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "eth_getBlockNumber"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 |