Skip to main content
Glama
Ethereum MCP
by ETHCF

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

NameRequiredDescriptionDefault
chainNoChain name or ID (default: ethereum)
closestNoFind block before or after timestampbefore
timestampYesUnix timestamp (seconds)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does convey one genuine behavioral trait — the result is the *closest* block, i.e. approximate rather than exact matching — but it says nothing about which chains are supported, behavior for out-of-range or future timestamps, or whether only indexed/archive data is available.

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?

A single front-loaded sentence with the resource and the matching rule up front and no filler. Nothing is redundant, and it is appropriately sized for a three-parameter lookup tool.

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

Completeness3/5

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

For a simple read lookup with full schema coverage and no output schema, the essentials are present — the resource, the approximation semantics, and the required input. What is missing is the disambiguation from dl_get_block_by_timestamp and any note on chain coverage or timestamp range limits, which is where an agent is most likely to go wrong.

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 description coverage is 100%: timestamp units (Unix seconds), the 'closest' before/after enum, and the default chain all come from the schema, not the description. The description adds no format or default detail beyond it, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Find the block number') plus the scoping input ('closest to a given timestamp'), so the operation is unambiguous on its own. It does not, however, distinguish itself from the near-identically named sibling dl_get_block_by_timestamp, leaving the agent to guess which of the two to call.

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?

There is no when-to-use or when-not-to-use guidance and no mention of any alternative. Given a sibling literally named dl_get_block_by_timestamp, the absence of any routing hint is a real gap rather than a minor one, and the agent must infer the choice from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools