Skip to main content
Glama

Decode & Audit Raw EVM Transaction Calldata

decode_and_audit_evm_calldata
Read-onlyIdempotent

Decode raw EVM calldata to detect unlimited token approvals, setApprovalForAll(true), zero-minOut MEV exposure, expired deadlines, and DELEGATECALL takeovers before signing.

Instructions

Deterministically decodes raw hex EVM transaction payloads (to, value, data, chainId) across ERC-20 (transfer, approve, transferFrom, increaseAllowance), ERC-721/1155 (setApprovalForAll, safeTransferFrom), Permit2, Uniswap V2/V3/UniversalRouter, 1inch, Multicall (recursive inner-call decoding), and Gnosis Safe execTransaction. Flags CRITICAL unlimited approvals (>= 2^255 / MAX_UINT160), setApprovalForAll(true), zero-minOut MEV sandwich exposure, non-zero ETH sent with approvals, expired deadlines, and DELEGATECALL takeovers.

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": "decode_and_audit_evm_calldata"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoTarget 0x contract or recipient address (empty for contract deployment).
dataYes0x-prefixed hex calldata string (default: "0x").0x
valueNoNative ETH/gas token value in wei (decimal integer string or 0x hex, default: "0").0
senderNoOptional sender 0x address to detect swap proceeds diverted to a third-party address.
chainIdNoEVM Chain ID (e.g. 1 = Ethereum, 8453 = Base, 42161 = Arbitrum, 137 = Polygon).
referenceTimestampNoOptional Unix timestamp in seconds for deterministic deadline checks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description goes well beyond them: it explains recursive inner-call decoding, the deterministic deadline behavior, and enumerates the exact critical conditions flagged (unlimited approvals >= 2^255/MAX_UINT160, setApprovalForAll(true), zero-minOut sandwich exposure, ETH sent with approvals, DELEGATECALL takeovers). It does not state the shape of the returned findings, so an agent learns what is detected but not how results are presented.

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?

Two sentences, front-loaded with the core action and then the protocol coverage before the flag list, so a scanning agent reaches the essential capability immediately. The long parenthetical protocol enumerations are dense but each one constrains whether the tool applies, so they earn their place rather than padding.

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?

For a multi-protocol decoder/auditor with no output schema, the description conveys enough about inputs and detected conditions to call it correctly and interpret the audit intent. The one meaningful gap is the return shape — whether findings come back as a typed list, severity fields, or free text — which an agent must discover by calling it.

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 100%, so the schema already documents all six parameters, which sets the baseline at 3. The description adds only indirect signal — 'deterministic' ties loosely to referenceTimestamp and 'expired deadlines' implies its role, and 'non-zero ETH sent with approvals' implies value semantics — but it never mentions sender or explains how value/to interact with decoding, so it adds little beyond the schema.

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?

Names a specific verb and resource ('deterministically decodes raw hex EVM transaction payloads') and then bounds the scope with an explicit protocol list (ERC-20/721/1155, Permit2, Uniswap V2/V3/UniversalRouter, 1inch, Multicall, Gnosis Safe) plus the audit checks it performs. This is plainly distinct from the sibling tools, which handle EIP-712 signature payloads and address validation rather than raw calldata.

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: an agent can infer it should call this when it has raw calldata to decode or pre-sign risk to audit, and the audit-flag framing hints at a safety-review workflow. But there is no explicit when-to-use statement, no when-not guidance, and no routing to the sibling tools (e.g. use audit_eip712_signature_payload for typed-data signatures rather than calldata).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.