Skip to main content
Glama

x402 Toolbox

ABI-decode calldata, return data or log data with known types or a signature

abi_decode
Read-onlyIdempotent

ABI-decode calldata, return data or log data with known types or a signature. Decodes hex data with a list of ABI types or a function signature (the 4-byte selector is stripped and checked when present). Strict: every offset and length is bounds-checked and dirty padding is rejected. Price: $0.003 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
dataYes
typesNo
signatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, and the description adds genuinely new behavior: strict bounds-checking of every offset and length, rejection of dirty padding, and a per-call price of $0.003 USDC via x402 on eip155:8453. The only gap is that failure behavior (what error shape a rejected decode returns) is not described.

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?

Three sentences, front-loaded with purpose, then validation semantics, then cost — nothing padded. The first sentence duplicates the title almost verbatim, which is minor redundancy rather than wasted space.

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

Completeness3/5

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

The decode semantics, strictness, and pricing are covered, and annotations handle the safety profile. With no output schema, though, the description never says what a successful decode returns (the decoded value array? named fields when a signature is used?), which an agent needs to interpret the result.

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 0%, so the description carries the full burden; it does explain that data is the hex payload, types is a list of ABI types, and signature is a function signature with the selector stripped. However it omits the relationship between types and signature (mutually exclusive? which wins?) and the size limits the schema enforces.

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

Purpose4/5

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

States a specific verb+resource (ABI-decode calldata, return data, or log data) and names the two input modes (types list or signature). It implicitly separates itself from the sibling abi_encode (inverse) and calldata_decode (generic decoding), but never names an alternative explicitly.

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?

The description implies the calling context (you have hex data plus known types or a signature) and notes the 4-byte selector is stripped and checked when present. It gives no explicit guidance on when to prefer this over abi_encode or calldata_decode, and does not say what to do when neither types nor signature is supplied.

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.