Skip to main content
Glama

crypto.calldata-decode

Read-onlyIdempotent

Resolve 29 common ERC-20, ERC-165, ERC-721, ERC-1155, ERC-2612, and ERC-3009 selectors without a network lookup, or strictly decode arbitrary Ethereum or EVM calldata using a supplied Solidity signature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calldataYesABI argument bytes, optionally prefixed by the four-byte function selector
input_modeNoWhether calldata includes a selector. Auto consumes a matching supplied-signature selector, or resolves a built-in standard selector when function_signature is omitted.auto
function_signatureNoOptional Solidity function signature, including argument types but no parameter names. When omitted, calldata must include a selector from the bounded built-in ERC-20, ERC-165, ERC-721, ERC-1155, ERC-2612, or ERC-3009 set.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesStructured Calldata decoder result
metaYes
serviceYes
versionYes
request_idYesUnique request identifier

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / checkout_path
      Added value: +{
      +  "pattern": "^/try/",
      +  "type": "string"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / executes_automatically
      Added value: +{
      +  "const": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / handoff_path
      Added value: +{
      +  "description": "Free full contract and spend-capped command handoff; reading it does not execute or purchase the follow-up.",
      +  "pattern": "^/catalog/",
      +  "type": "string"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / handoff_payment_required
      Added value: +{
      +  "const": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / maximum_atomic_usdc
      Added value: +{
      +  "pattern": "^[1-9][0-9]*$",
      +  "type": "string"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / sample_path
      Added value: +{
      +  "pattern": "^/samples/",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / meta / properties / next_actions / items / required
      Previous value: -[
      -  "service",
      -  "title",
      -  "reason",
      -  "method",
      -  "path",
      -  "price",
      -  "input_template",
      -  "use_output",
      -  "authorization_required"
      -]New value: +[
      +  "service",
      +  "title",
      +  "reason",
      +  "method",
      +  "path",
      +  "price",
      +  "input_template",
      +  "use_output",
      +  "handoff_path",
      +  "checkout_path",
      +  "sample_path",
      +  "maximum_atomic_usdc",
      +  "handoff_payment_required",
      +  "executes_automatically",
      +  "authorization_required"
      +]
  2. Changed11 schema fields changed
    • addedInput schema / properties / function_signature / anyOf
      Added value: +[
      +  {
      +    "maxLength": 500,
      +    "minLength": 3,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / function_signature / default
      Added value: +null
    • changedInput schema / properties / function_signature / description
      Previous value: -"Solidity function signature, including argument types but no parameter names"New value: +"Optional Solidity function signature, including argument types but no parameter names. When omitted, calldata must include a selector from the bounded built-in ERC-20, ERC-165, ERC-721, ERC-1155, ERC-2612, or ERC-3009 set."
    • removedInput schema / properties / function_signature / maxLength
      Removed value: -500
    • removedInput schema / properties / function_signature / minLength
      Removed value: -3
    • removedInput schema / properties / function_signature / type
      Removed value: -"string"
    • changedInput schema / properties / input_mode / description
      Previous value: -"Whether calldata includes a selector. Auto consumes it only when it matches the canonical supplied signature."New value: +"Whether calldata includes a selector. Auto consumes a matching supplied-signature selector, or resolves a built-in standard selector when function_signature is omitted."
    • changedInput schema / required
      Previous value: -[
      -  "function_signature",
      -  "calldata"
      -]New value: +[
      +  "calldata"
      +]
    • addedOutput schema / properties / data / properties / resolution
      Added value: +{
      +  "properties": {
      +    "builtInSignatureCount": {
      +      "const": 29,
      +      "type": "integer"
      +    },
      +    "candidateCount": {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "candidates": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "matchedStandards": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "method": {
      +      "enum": [
      +        "caller_supplied",
      +        "built_in_standard"
      +      ],
      +      "type": "string"
      +    },
      +    "networkRequestsMade": {
      +      "const": false,
      +      "type": "boolean"
      +    },
      +    "registryComplete": {
      +      "const": false,
      +      "type": "boolean"
      +    },
      +    "signatureProvided": {
      +      "type": "boolean"
      +    },
      +    "standardReferences": {
      +      "items": {
      +        "properties": {
      +          "standard": {
      +            "type": "string"
      +          },
      +          "url": {
      +            "format": "uri",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "standard",
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "version": {
      +      "const": "apiacre-standard-selectors/1",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "method",
      +    "signatureProvided",
      +    "candidateCount",
      +    "candidates",
      +    "matchedStandards",
      +    "standardReferences",
      +    "builtInSignatureCount",
      +    "registryComplete",
      +    "networkRequestsMade",
      +    "version"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / data / properties / signatureSource
      Added value: +{
      +  "enum": [
      +    "caller_supplied",
      +    "built_in_standard"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed13 schema fields changed
    • addedInput schema / properties / calldata / description
      Added value: +"ABI argument bytes, optionally prefixed by the four-byte function selector"
    • addedInput schema / properties / calldata / minLength
      Added value: +2
    • addedInput schema / properties / function_signature / description
      Added value: +"Solidity function signature, including argument types but no parameter names"
    • addedInput schema / properties / function_signature / minLength
      Added value: +3
    • addedInput schema / properties / input_mode
      Added value: +{
      +  "default": "auto",
      +  "description": "Whether calldata includes a selector. Auto consumes it only when it matches the canonical supplied signature.",
      +  "enum": [
      +    "auto",
      +    "selector_and_arguments",
      +    "arguments_only"
      +  ],
      +  "title": "Input Mode",
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / arguments
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "index": {
      +        "maximum": 63,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "type": {
      +        "type": "string"
      +      },
      +      "value": {}
      +    },
      +    "required": [
      +      "index",
      +      "type",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 64,
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / properties / canonicalSignature
      Added value: +{
      +  "pattern": "^[A-Za-z_][A-Za-z0-9_]*\\(.*\\)$",
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / encoding
      Added value: +{
      +  "properties": {
      +    "argumentBytes": {
      +      "maximum": 100000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "argumentsSha256": {
      +      "pattern": "^[0-9a-f]{64}$",
      +      "type": "string"
      +    },
      +    "calldataBytes": {
      +      "maximum": 100000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "calldataSha256": {
      +      "pattern": "^[0-9a-f]{64}$",
      +      "type": "string"
      +    },
      +    "canonical": {
      +      "const": true,
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "calldataBytes",
      +    "argumentBytes",
      +    "calldataSha256",
      +    "argumentsSha256",
      +    "canonical"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / data / properties / inputMode
      Added value: +{
      +  "enum": [
      +    "selector_and_arguments",
      +    "arguments_only"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / selector / pattern
      Added value: +"^0x[0-9a-f]{8}$"
    • addedOutput schema / properties / data / properties / types / items / type
      Added value: +"string"
    • addedOutput schema / properties / data / properties / types / maxItems
      Added value: +64
    • addedOutput schema / properties / data / properties / values / maxItems
      Added value: +64
  4. Changed2 schema fields changed
    • addedOutput schema / properties / meta / properties / next_actions
      Added value: +{
      +  "description": "Optional separately priced follow-up calls. Each action requires a new payment challenge and explicit buyer authorization.",
      +  "items": {
      +    "properties": {
      +      "authorization_required": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "input_template": {
      +        "description": "Client-side template only: $request refers to the original input, $result to this response, and $json(...) serializes its argument. The server does not execute the follow-up.",
      +        "type": "object"
      +      },
      +      "method": {
      +        "const": "POST",
      +        "type": "string"
      +      },
      +      "path": {
      +        "pattern": "^/v1/",
      +        "type": "string"
      +      },
      +      "price": {
      +        "pattern": "^\\$[0-9]+",
      +        "type": "string"
      +      },
      +      "reason": {
      +        "type": "string"
      +      },
      +      "service": {
      +        "type": "string"
      +      },
      +      "title": {
      +        "type": "string"
      +      },
      +      "use_output": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "service",
      +      "title",
      +      "reason",
      +      "method",
      +      "path",
      +      "price",
      +      "input_template",
      +      "use_output",
      +      "authorization_required"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / meta / required
      Previous value: -[
      -  "duration_ms",
      -  "cached",
      -  "sources",
      -  "warnings"
      -]New value: +[
      +  "duration_ms",
      +  "cached",
      +  "sources",
      +  "warnings",
      +  "next_actions"
      +]
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false. The description adds valuable behavioral context beyond annotations, such as 'without a network lookup' (offline operation) and 'strictly decode' (strictness), plus the bounded selector set. This enriches the agent's understanding of the tool's behavior.

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?

The description is a single, compact sentence that front-loads the main actions and avoids redundancy. It is slightly dense due to the compound structure, but every clause earns its place.

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 a rich output schema and fully described parameters, the description covers the essential operational modes and the offline property. Nothing critical appears missing; the combination of description and schema gives a complete picture for an agent to invoke the tool correctly.

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 description coverage is 100%, so baseline is 3. The description adds conceptual framing by relating the two modes—resolving built-in selectors vs. using a supplied signature—to the parameters. This helps an agent understand how calldata, input_mode, and function_signature interact, going beyond individual schema descriptions.

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 clearly states a specific verb+resource: it resolves 29 common ERC selectors or decodes arbitrary EVM calldata. This distinguishes it from siblings like crypto.typed-data-hash, and the two modes are explicitly named.

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?

The description does not explicitly mention alternatives or exclusions, but the tool's scope is self-evident: it is for decoding calldata or resolving standard selectors. The schema's input_mode and function_signature descriptions provide additional usage context, making the intended use clear.

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