Skip to main content
Glama

x402 Toolbox

Decode unknown transaction calldata: find the function signature and decode the arguments

calldata_decode
Read-onlyIdempotent

Decode unknown transaction calldata: find the function signature and decode the arguments. Looks up the selector (built-in list, then openchain / 4byte), tries each candidate signature and keeps the first one that decodes and re-encodes to exactly the same bytes, so collisions are filtered out. Returns the function, arguments and the other candidates. Price: $0.005 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare read-only/idempotent/open-world; the description adds substantial behavior the annotations cannot: the selector lookup order, the round-trip re-encode collision filter, the fact that non-matching candidates are still returned, and a per-call price ($0.005 USDC via x402 on eip155:8453). The payment requirement in particular is critical operational context.

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 dense sentences, front-loaded with purpose, then mechanism, then return shape and price. No filler; every clause carries decision-relevant information.

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 defines the return payload (function, arguments, other candidates), which is exactly what an agent needs. Minor gap: it doesn't say what happens when no candidate decodes (empty result vs error), which matters for a 1-param open-world lookup tool.

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 0% for the single `data` parameter, so the description carries the burden; it hints the input must contain a function selector ('looks up the selector'), implying 0x-prefixed calldata rather than bare arguments, but never states the required hex format or length constraints. Partial compensation only.

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?

The description states a specific verb and resource ('Decode unknown transaction calldata') plus the mechanism ('find the function signature and decode the arguments'). The word 'unknown' implicitly scopes it away from abi_decode, which needs a known ABI, so an agent can distinguish the two without opening schemas.

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

Usage Guidelines3/5

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

Usage is only implied by the word 'unknown' in the title/description; there is no explicit statement of when to prefer this over abi_decode, evm_selector_lookup, or evm_selector. The lookup-fallback chain (built-in list, then openchain/4byte) gives contextual hints about when it works, but no when-not or alternative routing.

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.