Skip to main content
Glama

Calldata decode

calldata_decode
Read-onlyIdempotent

Decode raw EVM calldata (0x hex): 4-byte function selector, signature candidates, and typed arguments. $0.002 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for the terms, sign them with your own wallet, call again with payment.

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": {
      "data": "<data>"
    },
    "name": "calldata_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYeshex calldata starting with 0x
paymentNoa signed x402 payment (the base64 payload you would put in PAYMENT-SIGNATURE). Pass it and the purchase completes inside this tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive, open-world), the description discloses the cost ($0.002 per call), the accepted payment rails (USDC on Arc/Base/Solana, XNT on X1), and the two-call x402 handshake. Auth/payment mechanics are exactly the kind of context annotations cannot convey.

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 with no filler: purpose and outputs first, pricing second, invocation protocol last. Nothing is repeated and the most decision-relevant information is front-loaded.

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 stateless, two-parameter decode tool with no output schema, the description covers inputs, the shape of returned data, cost, and the payment handshake. There is no return-value ambiguity an agent would need resolved before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so `data` and `payment` are already documented, giving a baseline of 3. The description adds real meaning on top: it frames `payment` as an x402 signed payload obtained from a prior unpaid call, clarifying the sequencing the schema only hints at.

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?

The description names a specific verb and resource ("Decode raw EVM calldata (0x hex)") and enumerates the outputs: 4-byte function selector, signature candidates, and typed arguments. That makes it distinguishable from evm_log_decode by input domain, though it never explicitly contrasts itself with that sibling.

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?

It gives an explicit procedural path: call once without `payment` to get terms, sign with your own wallet, then call again with `payment`. That is strong invocation guidance, but there is no statement of when to prefer this over alternatives like evm_log_decode or evm_call, and no 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