get_block_by_timestamp
Convert a Unix timestamp to the nearest block number on Ethereum or another supported chain, selecting the closest block before or after that time.
Instructions
Find the block number closest to a given timestamp.
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": {
"timestamp": "<timestamp>"
},
"name": "get_block_by_timestamp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain name or ID (default: ethereum) | |
| closest | No | Find block before or after timestamp | before |
| timestamp | Yes | Unix timestamp (seconds) |