Skip to main content
Glama

Audit Off-Chain EIP-712 Typed-Data Signature Payload

audit_eip712_signature_payload
Read-onlyIdempotent

Audits EIP-712 typed-data payloads before signing to detect risky allowances, spoofed domains, dangerous expirations, and zero-consideration drains.

Instructions

Audits off-chain eth_signTypedData_v4 JSON objects or strings (Permit, DAI Permit, PermitSingle, PermitBatch, PermitTransferFrom, Seaport OrderComponents, Circle USDC EIP-3009 TransferWithAuthorization / x402, ForwardRequest, SafeTx) before signing. Computes EIP-712 domainSeparator and flags unlimited allowances, Seaport zero-consideration NFT/token drains, DELEGATECALL meta-txs, multi-month/infinite signature expirations, and domain chainId/contract spoofing.

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": {
      "typedData": "<typedData>"
    },
    "name": "audit_eip712_signature_payload"
  }
}

Input Schema

NameRequiredDescriptionDefault
typedDataYeseth_signTypedData_v4 JSON object (or serialized JSON string) containing domain, types, primaryType, and message.
expectedChainIdNoOptional expected EVM chainId to catch cross-chain domain spoofing.
expectedMaxAmountNoOptional maximum expected raw token amount (decimal or 0x hex) to guard against over-billing.
expectedRecipientNoOptional expected 0x recipient for EIP-3009 / x402 TransferWithAuthorization checks.
referenceTimestampNoOptional Unix timestamp in seconds for deterministic deadline checks.
expectedVerifyingContractNoOptional expected 0x verifyingContract address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish the safe-read profile (readOnlyHint, idempotentHint, destructiveHint=false, closed-world), so the bar is lower, and the description still adds real substance: it discloses that it computes the EIP-712 domainSeparator and enumerates the specific risk classes it flags (unlimited allowances, Seaport zero-consideration drains, DELEGATECALL meta-txs, long/infinite expirations, chainId/contract spoofing). It stops short of saying what the returned verdict looks like or whether findings are ranked/blocking.

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: the first front-loads purpose plus accepted input types, the second front-loads the computation then the risk flags. The parenthetical type list is dense but each item earns its place by telling the agent what will be recognized rather than rejected. No filler or restated title.

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 no output schema, the description carries the burden of describing results, and it does so by enumerating detectable issues, which is the most decision-relevant part. The remaining gap is the shape of the response — whether it returns a boolean verdict, a severity score, or a findings array — which an agent needs to plan follow-up steps.

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 six parameters are already fully documented in the schema and the baseline of 3 applies. The description adds only indirect linkage — 'domain chainId/contract spoofing' hints at expectedChainId/expectedVerifyingContract and 'multi-month/infinite signature expirations' hints at referenceTimestamp — but never explains expectedMaxAmount or expectedRecipient, so it does not meaningfully exceed 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?

The description opens with a specific verb ('Audits') and a precisely scoped resource ('off-chain eth_signTypedData_v4 JSON objects or strings'), then enumerates the concrete payload families it understands (Permit, PermitSingle/Batch, Seaport OrderComponents, EIP-3009 TransferWithAuthorization, SafeTx). The 'off-chain' framing plus the explicit type list makes it distinguishable from a calldata decoder without opening either schema.

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 a clear usage moment — 'before signing' — which tells the agent this is a pre-signature safety gate rather than a post-hoc investigation. It does not explicitly name the sibling decode_and_audit_evm_calldata as the alternative for on-chain calldata, so the routing is implied by 'off-chain' rather than stated.

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