Skip to main content
Glama

abi decode

abi_decode
Read-only

Decode EVM calldata or an event log: the function (or event) name and typed arguments. Uses your ABI or human-readable signature, or looks the selector up in the public signature databases (openchain, 4byte). Costs $0.002 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiNoOptional JSON ABI or signatures like transfer(address,uint256)
dataYes0x calldata, or event data
topicsNoEvent topics (JSON array or | separated) to decode a log

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety and network reach are covered. The description adds genuinely useful behavioral context beyond that: the external selector databases it may consult and the per-call cost ($0.002 USDC via x402), which materially affects invocation decisions.

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?

Two front-loaded sentences: the first defines what is decoded and returned, the second covers input resolution and cost. No filler, and the highest-value information leads.

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 three-parameter read-only tool with no output schema, the description already states the return shape (name and typed arguments) and the cost/lookup mechanisms. Nothing an agent needs to invoke it correctly 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 description coverage is 100%, so all three parameters are already documented in the schema, including the JSON-ABI-or-signature forms and the topics format. The description adds no format or syntax detail beyond that, which is the expected baseline when the schema does the heavy lifting.

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 (decode) with two concrete resources (EVM calldata, event log) and names the output shape (function/event name plus typed arguments). This clearly separates it from the sibling abi_encode without needing to open either schema.

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?

Explains the input pathways — supply your own ABI, a human-readable signature, or let it look the selector up in openchain/4byte — which tells the agent when this tool will succeed. It stops short of explicitly naming abi_encode as the inverse operation or stating when not to use it, so it is clear context without 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