cast_block
Retrieves blockchain block details or the latest block number from an RPC network, optionally extracting a specific field as JSON.
Instructions
Get block information (cast block). If no blockTag is given, returns the latest block number (cast block-number).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rpcUrl": "<rpcUrl>"
},
"name": "cast_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Output as JSON | |
| field | No | Specific block field to extract (e.g. timestamp, baseFeePerGas) | |
| rpcUrl | Yes | RPC URL of the network | |
| blockTag | No | Block identifier (number, hash, "latest", "pending"). Omit to get the latest block number. |