Skip to main content
Glama

Optimism event logs

op_logs
Read-only

Recent contract event logs on Optimism (eth_getLogs): the events a contract emitted over the last N blocks (1-1,000, default 50), optionally filtered by topic0 (the 0x 32-byte event signature hash). Returns up to 100 logs with block, transaction hash and topics. Use to watch transfers or contract events; for one transaction's outcome use op_receipt. Example: address=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not 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": "op_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
blocksNoHow many recent blocks to scan (1-1000, default 50)
topic0NoOptional 0x event signature hash to filter by
addressYes0x contract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / blocks / maximum
      Previous value: -9007199254740991New value: +1000
    • changedInput schema / properties / blocks / minimum
      Previous value: --9007199254740991New value: +1
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=true and idempotentHint=false, and the description adds real context beyond them: pricing at $0.01/call via x402 USDC or a card key, the first 10 calls free, failed calls free, and the fact that repeats are charged so calls are not effectively idempotent. It also states the return cap (up to 100 logs with block, transaction hash and topics). The only minor gap is that it does not explain what happens when the scan matches more than 100 logs, such as whether the excess is truncated.

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?

The first sentence is front-loaded with purpose, scope and return shape, and the alternative tool is named immediately after. That alternative tool is named immediately after the purpose, and the pricing, safety and example details follow logically. It runs slightly long, and 'Reads or computes only and changes nothing' partly duplicates readOnlyHint, but nothing is wasted.

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?

Covers everything an agent needs for a three-parameter read tool with no output schema: purpose, block range semantics, topic filter format, return contents and cap, cost/auth model, and safety profile. Compatibility with the sibling op_receipt is spelled out, so no guidance-relevant piece is missing.

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 coverage is 100%, so the schema already documents all three parameters, including the 1-1,000 range and default 50 for blocks. The description adds marginal meaning: it clarifies that topic0 is a 0x-prefixed 32-byte event signature hash and provides a concrete address example. This is baseline 3 territory, since the schema already does most of the work.

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?

Names a specific verb+resource combination: recent contract event logs on Optimism, equivalent to eth_getLogs, and defines the scope as the last N blocks with an optional topic0 filter. It also explicitly differentiates itself from the sibling op_receipt by explaining that op_receipt handles a single transaction's outcome.

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?

Gives a positive use case (watch transfers or contract events) and an explicit exclusion with the correct alternative: for one transaction's outcome use op_receipt. The bounds and default for the blocks parameter are also restated in prose, so an agent can choose the right tool and scope without guessing.

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