Skip to main content
Glama

Decode EVM calldata

singularityagent__decode
Read-only

Decode a hex calldata blob into a function signature and arguments. Recognizes common ERC-20/721/1155, WETH, Multicall3 and Safe calls out of the box, and unwraps batches — a multicall, an aggregate, an execTransaction or a multiSend reports the calls it carries under inner. Pass abi for anything else, or set lookup to ask a public 4-byte directory for candidate signatures when the selector is unknown (those are third-party guesses, marked untrusted, and never promoted to signature).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiNoHuman-readable ABI entries to decode against, e.g. ["function foo(uint256 bar)"].
dataYesHex calldata, with or without the 0x prefix.
lookupNoWhen the selector is not recognized, ask a public 4-byte directory for candidate signatures. Off by default: it discloses the selector to a third party, and anyone may submit an entry there, so results come back as untrusted candidates rather than as an identification.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • addedInput schema / properties
      Added value: +{
      +  "abi": {
      +    "description": "Human-readable ABI entries to decode against, e.g. [\"function foo(uint256 bar)\"].",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "data": {
      +    "description": "Hex calldata, with or without the 0x prefix.",
      +    "type": "string"
      +  },
      +  "lookup": {
      +    "description": "When the selector is not recognized, ask a public 4-byte directory for candidate signatures. Off by default: it discloses the selector to a third party, and anyone may submit an entry there, so results come back as untrusted candidates rather than as an identification.",
      +    "type": "boolean"
      +  }
      +}
    • addedInput schema / required
      Added value: +[
      +  "data"
      +]
  2. Added

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, but the description adds crucial behavioral detail: the `lookup` option discloses the selector to a third party, results are untrusted candidates, and they are never promoted to `signature`. It also describes how batch calls are reported under `inner`. This goes well beyond the annotations, giving the agent a clear picture of side effects and trust boundaries.

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?

The description is two well-structured sentences. The first states the core purpose and built-in capabilities, front-loading the most important information. The second explains the two fallback options and their trade-offs. Every clause earns its place; there is no redundant or filler text.

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 read-only decode tool with three parameters and no output schema, the description covers the essential behavior: what it does, what it recognizes, how to handle unknown selectors, and the trust implications of the lookup option. It mentions the `inner` field for batches, giving a glimpse of the output structure. An agent has everything needed to invoke it correctly.

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

Parameters5/5

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

Although schema coverage is 100%, the description enriches each parameter's meaning. For `abi`, it says 'Pass `abi` for anything else', clarifying when to use it. For `lookup`, it explains the exact behavior and trust implications. The description adds significant value beyond the schema's brief field 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 opens with a precise statement of what the tool does — 'Decode a hex calldata blob into a function signature and arguments' — and then enumerates its built-in recognitions and batch-unwrapping behavior. This clearly distinguishes it from sibling tools like singularityagent__transaction or singularityagent__read_contract, which serve different purposes. The verb-resource-output structure is explicit and unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit conditional usage: for unknown selectors it recommends passing `abi`, or setting `lookup` to consult a public directory. It even explains the trade-off of `lookup` (third-party disclosure, untrusted results), which helps an agent decide when to use which parameter. No alternative is left to inference.

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.