Skip to main content
Glama

Agent Data Hub

Contract event logs (eth_getLogs, optional decode)

chain_logs
Read-onlyIdempotent

Recent event logs emitted by a contract over the last N blocks (1–2000, default 100), newest first. Pass an event signature such as 'Swap(address indexed sender, uint256 amount0In, …)' to filter AND decode args by name, or a raw topic0 to filter only. Returns block, tx hash, log index, topics, data and decoded args. Price: $0.002 per call (USDC on Base via x402); the first 10 calls per day are free.

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": {
      "address": "<address>"
    },
    "name": "chain_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain (default base)
eventNoOptional Solidity event signature to filter + decode
limitNoMax logs returned, 1–200 (default 50)
blocksNoRecent blocks to scan, 1–2000 (default 100)
topic0NoOptional raw topic0 (0x + 64 hex) instead of event
addressYesContract address 0x…

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely useful context beyond that: newest-first ordering, the block-scan default, and a concrete cost model ($0.002/call USDC on Base via x402, first 10 calls/day free). It does not discuss rate limits, pagination, or failure modes for oversized windows.

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?

Three tight sentences: what it returns first, then how to invoke it, then cost. Every clause carries information an agent needs and nothing is repeated from structured fields verbatim.

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?

With no output schema, the description correctly enumerates the return fields, and it covers ordering, decoding behavior, and pricing. The only gap is that the limit parameter's range and default are absent from the prose, so the description is slightly asymmetric versus blocks.

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 description coverage is 100%, so baseline is 3. The description still adds value by showing the concrete event-signature syntax ('Swap(address indexed sender, uint256 amount0In, …)') and explaining the event-vs-topic0 interplay as a filter+decode versus filter-only distinction. It omits the limit parameter's 1–200 range and default of 50, which only the schema carries.

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 ('Recent event logs emitted by a contract'), plus the eth_getLogs lineage in the title and the scan window. It is clear what the tool returns (block, tx hash, log index, topics, data, decoded args), but it never names which sibling to prefer for related data, so an agent comparing against chain_erc20_transfers or chain_tx is left to infer.

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

Usage Guidelines4/5

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

Gives explicit mode-selection guidance: pass an event signature to filter AND decode, or a raw topic0 to filter only. That resolves the main invocation ambiguity. It stops short of saying when to use this tool versus sibling log/transfer tools or of any exclusions.

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