Skip to main content
Glama
Ethereum MCP
by ETHCF

dl_get_block_by_timestamp

Find the block number closest to a given Unix timestamp on a specified blockchain, enabling historical on-chain analysis via DefiLlama.

Instructions

Get block number closest to a timestamp (via DefiLlama)

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": {
      "chain": "<chain>",
      "timestamp": "<timestamp>"
    },
    "name": "dl_get_block_by_timestamp"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesChain name (e.g., 'ethereum', 'bsc', 'polygon')
timestampYesUnix timestamp (seconds)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.4/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 disclosure burden. It does add two meaningful facts — the upstream data source (DefiLlama) and that the result is an approximation rather than an exact match — but says nothing about rate limits, chain coverage, or failure behavior when no block exists near the timestamp.

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 short sentence with the action, resolution semantics, and data source packed up front, and zero redundant wording. Nothing could be removed without losing information.

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?

This is a simple two-parameter lookup with full schema coverage and no output schema, and the description implies a numeric block height as the return. The only gap an agent must guess at is whether 'closest' prefers the earlier or later block, and how it behaves for timestamps outside available chain history.

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%, so both parameters are already documented with types and examples; baseline 3 applies. The description contributes only the framing that the timestamp is a target to approximate, not the exact parameter interpretation, and does not clarify tie-breaking between the block before vs. after the timestamp.

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?

States a specific verb and resource ('Get block number') plus the resolution rule ('closest to a timestamp'), which is more than a restatement of the name. However, it never distinguishes itself from the sibling 'get_block_by_timestamp', leaving only the parenthetical '(via DefiLlama)' as a weak differentiator.

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?

No when-to-use or when-not-to-use guidance is given. With a near-identical sibling ('get_block_by_timestamp') in the catalog, the description should explicitly route the agent between the two, but it provides no such condition.

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