Skip to main content
Glama

evm_filter_logs

Query and decode historical smart contract event logs across EVM chains by contract, topics, and block range, with automatic decoding of Transfer, Approval, and Swap events.

Instructions

Filter and decode blockchain event logs

Query historical events from smart contracts with advanced filtering. Automatically decodes common events like Transfer, Approval, Swap.

FEATURES:

  • Filter by contract, topics, block range

  • Automatic event decoding

  • Support for event signatures

  • Statistics and aggregation

PARAMETERS:

  • chain: Target blockchain

  • contractAddress: Contract to filter logs from

  • topics: Event topics array (optional)

  • fromBlock: Starting block

  • toBlock: Ending block

  • eventSignature: Event signature (optional)

  • decodeData: Decode log data (default true)

  • limit: Max logs to return (default 100)

Returns decoded events with timestamps and statistics.

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>",
      "contractAddress": "<contractAddress>"
    },
    "name": "evm_filter_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYes
limitNo
topicsNo
toBlockNolatest
fromBlockNolatest
decodeDataNo
eventSignatureNo
contractAddressYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description must carry the full burden; it does disclose that decoding happens automatically and that decodeData defaults to true, which is genuine behavioral context. It omits whether the call is read-only, any rate limits or permission requirements, pagination behavior beyond the limit default, and how filtering by both topics and eventSignature interacts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence is front-loaded and the FEATURES/PARAMETERS sections are scannable. The PARAMETERS block largely restates schema property names and defaults already encoded in the input schema, which is redundant rather than additive.

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?

For an 8-parameter read tool with no annotations and no output schema, the definition covers the essentials: what is queried, what is decoded, and what comes back ('decoded events with timestamps and statistics'). Remaining gaps are the topics format and the 'latest' block sentinel, which are nontrivial but not blocking.

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 0%, so the PARAMETERS list is the only documentation and it does gloss all 8 fields, marking optional ones and defaults. However it is shallow: the topics array format (string-or-null wildcards, positional ordering) is unexplained, and the fact that fromBlock/toBlock accept the string 'latest' is never mentioned even though the schema allows it.

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 opening line gives a specific verb and resource — filter and decode blockchain event logs — and the FEATURES block clarifies decode plus aggregation. It never distinguishes itself from the near-identical sibling evm_get_logs, so the agent cannot tell from the text alone which log-querying tool to pick.

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?

'Query historical events from smart contracts with advanced filtering' implies a context, but there is no when-to-use, when-not-to-use, or prerequisite (e.g., RPC access, chain support) guidance. No alternative is named or excluded despite clear overlap with other log/decoding tools.

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