Skip to main content
Glama

Event logs

getLogs
Read-only

Retrieve EVM event logs by chain, address, topics, and block range; for Sui, fetch Move events over a checkpoint range.

Instructions

Event logs on one chain, filtered by address and/or topics over a block range. Tier 2 emits each log as { contract, event, args }, dropping logsBloom and per-log block duplication; an undecodable one stays raw as { address, topics, data, _event_unknown }. Check tier_degraded before reading event or args. With both bounds concrete block NUMBERS (toBlock may be omitted/"latest") the range is walked in ascending chunks, stopping once the display cap fills: the reply says range_fully_scanned: false, carries a cursor, and note says why. more_available means more logs were seen than shown; full_count appears only when the whole range was scanned. Any other bound is ONE unbounded eth_getLogs: no chunking, no cursor, liable to tier 0. Sui: Move events over a CHECKPOINT range. fromBlock is required; address is the emitting package[::module]; eventType and sender narrow it; topics is refused, not ignored. Same body; rows add checkpoint/digest/index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesChain slug as in rpc.ankr.com/<chain> — any chain Ankr serves (see listChains)
senderNoSui: the emitting transaction's sender, 0x + 64 hex
topicsNoTopic filters (0x + 64 hex, or null to wildcard); topics[0] is the event signature hash. Max 4 slots.
addressNoEmitting contract; Sui: package[::module]
maxLogsNoMax logs to DISPLAY (default 50, max 1000). The scan stops once this is filled, so it also bounds how much is fetched upstream.
toBlockNoTo block: decimal, 0x-hex, or tag (default latest)
eventTypeNoSui: Move event type 0xpkg::module::Name
fromBlockNoFrom block: decimal, 0x-hex, or tag (default latest)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the readOnlyHint/openWorldHint annotations, disclosing tier degradation, chunked-scan semantics, cursor emission, and the exact flags that signal partial coverage (range_fully_scanned, more_available, full_count, note). It also warns about the undecodable-log fallback shape. This is exactly the behavioral context annotations cannot carry.

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?

Dense but front-loaded and organized: general semantics first, then the chunking/cursor contract, then Sui-specific rules. Every sentence carries load, though the prose is thick enough that some trimming is possible without information loss.

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 an 8-parameter, no-output-schema tool with subtle partial-result semantics, the description supplies the missing return-field contract and the conditions under which scanning is incomplete. Nothing an agent needs to invoke it correctly and interpret results is absent.

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 the baseline is 3, but the description adds real meaning beyond the schema: toBlock may be omitted and defaults to latest, fromBlock is mandatory for Sui, address is interpreted as package[::module] on Sui, and topics is rejected there rather than silently ignored.

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

Purpose5/5

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

States a specific verb+resource: event logs on one chain, filtered by address/topics over a block range, and additionally covers the Sui variant (Move events over a checkpoint range). An agent can distinguish this from query siblings like getBlock or getTransaction immediately.

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 clear conditional guidance: concrete numeric bounds trigger ascending chunked scanning, any other bound collapses to a single unbounded eth_getLogs; on Sui fromBlock is required and topics is refused rather than ignored. It does not name alternative tools (e.g. suiWatchEvents for subscriptions), so it stops short of explicit alternatives.

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