Skip to main content
Glama

Diogenes Web3, DeFi & 402 Security MCP

Pre-Sign EVM Hex Calldata Selector Decoder & Drain Simulator

simulate_evm_transaction_calldata
Read-onlyIdempotent

Decodes raw EVM hexadecimal transaction calldata (0x...) by 4-byte function selector to expose hidden ERC-20 approve/transferFrom calls, setApprovalForAll drains, and multicall bundles. Use when auditing raw hex transaction data (to, value, data) before broadcasting an on-chain EVM transaction; for inspecting off-chain EIP-712 JSON typed-data signatures, use decode_eip712_permit_signature instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'calldata_hex' ('network' defaults to 'base_mainnet'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
networkNoTarget EVM network for simulation context; defaults to 'base_mainnet' when omitted.
calldata_hexYesHexadecimal EVM transaction data string starting with '0x' (e.g. '0x095ea7b3000000000000000000000000...').

Output Schema

NameRequiredDescriptionDefault
selector_hexYesExtracted 4-byte function selector (e.g. '0x095ea7b3').
decoded_methodYesHuman-readable ABI function signature matched to the selector.
simulation_verdictYesPre-sign safety recommendation ('SAFE_CALLDATA' or 'HIGH_RISK_APPROVAL_DETECTED').
approval_or_drain_riskYesTrue if the call grants token/NFT allowances or transfers assets to an untrusted target.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/destructive/idempotent/openWorld, so the safety profile is covered; the description adds genuinely non-obvious context: statelessness, a 32 KB input cap, 60 RPM rate limit, query-param demo mode or L402 payment (20 sats), and HTTP 400 on invalid input. It does not describe what the decoded output contains, but that is largely covered by the output schema.

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?

A single dense passage that front-loads the decoding purpose and risk surface before the usage routing, then the operational constraints. No sentence is filler; even the rate limit and payment note are operationally relevant to calling it correctly.

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?

With an output schema present, the description need not explain return values, and annotations cover safety. It still supplies limits, error behavior, auth/payment options and network default — everything an agent needs to invoke it successfully.

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 coverage is 100%, so both parameters are already documented, and the description mostly restates them ('calldata_hex', network default 'base_mainnet'). The only added meaning is the undocumented '?demo=true' query-parameter/payment path, which is marginal. Baseline 3 is correct when the schema does the heavy lifting.

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?

States a specific verb and resource — decoding raw EVM hex calldata by 4-byte selector — and names the attack patterns it surfaces (approve/transferFrom, setApprovalForAll, multicall). It also explicitly distinguishes itself from the sibling decode_eip712_permit_signature, so an agent can route between the two 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 Guidelines5/5

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

Gives an explicit situation for use ('auditing raw hex transaction data (to, value, data) before broadcasting') and an explicit alternative with the condition that selects it ('for inspecting off-chain EIP-712 JSON typed-data signatures, use decode_eip712_permit_signature instead'). Nothing 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.