Skip to main content
Glama

cast_logs

Filter and retrieve smart contract event logs by address, topics, signature, and block range via an RPC URL.

Instructions

Filter and retrieve event logs (cast logs).

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": {
      "rpcUrl": "<rpcUrl>"
    },
    "name": "cast_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonNoOutput as JSON
rpcUrlYesRPC URL of the network
topicsNoTopic filters (topic0, topic1, ...)
addressNoContract address to filter logs by
toBlockNoEnd block (number or tag)
fromBlockNoStart block (number or tag)
signatureNoEvent signature, e.g. "Transfer(address,address,uint256)"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and does not meet it. It does not say the call is read-only, that it requires a reachable RPC endpoint, whether there is a default block range or result cap, or how large log sets are handled. "Filter and retrieve" is the only behavioral signal, and it is minimal for a network-backed query with seven parameters.

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?

A single short sentence with zero padding, front-loaded with the action verb. It is appropriately sized, though its brevity reflects under-specification rather than disciplined editing.

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

Completeness2/5

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

For a seven-parameter, network-facing query tool with no annotations and no output schema, the definition is too sparse. An agent gets no sense of the return shape, ordering, pagination or range limits, or failure modes such as an unreachable RPC, all of which it must know to call this correctly.

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 100%, so every parameter already has an inline description, and the baseline is 3. The description adds nothing beyond the schema: it does not clarify topic ordering versus signature, how fromBlock/toBlock defaults behave, or that rpcUrl selects the network. No compensation is needed given the complete schema.

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

Purpose3/5

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

The description names a specific verb pair (filter and retrieve) and resource (event logs / cast logs), which matches the tool name. However, it never distinguishes this from other chain-read siblings like cast_block or cast_receipt, so an agent must infer that this is the log-querying tool. It is adequate but thin.

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?

There is no explicit when-to-use guidance, no exclusions, and no named alternatives (e.g., cast_receipt for a single transaction's logs). The word "filter" implies narrowing by address/topics but the description never states the conditions that should select this tool over a receipt or block lookup.

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