Skip to main content
Glama

Search the event logs of an EVM contract

evm_logs
Read-only

Event logs of a contract over recent blocks (default 1,000, max 5,000), newest first, max 100: block, transaction hash, topics and data. topic0 takes an event signature such as Transfer(address,address,uint256) or a 32-byte hash. Public nodes refuse very large results: narrow the range or add topic0. Related tools on this server, for a different need: evm_balance when you need ERC-20 balance of an address for one token contract; evm_call when you need to read the result of a read-only EVM contract function. Price: $0.003 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

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": {
      "contract": "<contract>"
    },
    "name": "evm_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNobase (default), ethereum, arbitrum, optimism or polygon
blocksNoBlocks to search back from the latest (max 5000)
topic0NoEvent signature, e.g. Transfer(address,address,uint256), or a 32-byte hash
contractYesContract address, 0x…

Output Schema

NameRequiredDescriptionDefault
logsNo
chainNo
countNo
sourceNo
topic0No
windowNo
contractNo
checkedAtNo
truncatedNo
disclaimerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say readOnlyHint and openWorldHint; the description goes well beyond them with default and maximum block windows, result ordering, a hard 100-record cap, server-side refusal on large results, and the billing model ($0.003 per successful call via x402, failures uncharged). The cost and failure semantics are the kind of information an agent cannot infer from structured fields and are critical for a paid call.

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

Conciseness4/5

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

Content is front-loaded: scope and return shape first, then topic0 syntax, then the practical rate/cap workaround, then sibling routing and price. It is dense but each sentence carries distinct information. The sibling-routing and pricing sentences could be tightened slightly, but nothing is redundant.

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

Completeness5/5

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

For a 4-parameter read tool with an output schema and annotations, the description covers everything an agent needs before calling: scope defaults and limits, expected inputs, failure behavior, cost, and alternatives. Return-value structure is left to the output schema, which is the correct division of labor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a 3 is the baseline, but the description adds genuinely new meaning: the default block window is 1,000 (the schema only states the 5,000 max) and topic0 accepts either a human-readable event signature or a 32-byte hash. The chain default of 'base' and the contract 0x address format are already covered by the schema, so no extra credit there.

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 names the exact resource (event logs of a contract), the scope (recent blocks, newest first, capped at 100 entries) and the fields returned (block, transaction hash, topics, data). It also explicitly distinguishes itself from evm_balance and evm_call, so an agent can route without opening a schema. It is a noun-phrase fragment rather than an explicit verb+resource statement, which keeps it just short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It names two concrete alternatives with the condition that selects each: evm_balance for ERC-20 balance of one token contract, evm_call for reading a read-only contract function. It also gives in-tool guidance for the failure mode ('Public nodes refuse very large results: narrow the range or add topic0'), which is exactly the corrective action an agent needs mid-call.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources