Skip to main content
Glama

aeX402 — Cross-Chain DeFi MCP: LINQ, AMM, Bridge, AI

reconstruct_abi

Reconstruct a PARTIAL function/event interface for an EVM contract on a supported EVM chain from its BYTECODE — no source or verification needed. Extracts PUSH4 function selectors + recent event topic0 hashes and resolves the ones public signature DBs (openchain/4byte) know to human signatures. Works on UNVERIFIED contracts because bytecode is ground truth, but it is NOT a full ABI: novel/proprietary selectors DBs have never seen stay unresolved (decompile for those). Use it to understand what an unknown contract does before trusting behavior-based guesses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesrobinhood | hyperevm | ethereum | base | stable | plasma | tempo | codex
addressYesEVM contract address (0x…). For a proxy, pass the implementation for the real logic.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNowhat the reconstruction could and could not resolve
chainYes
eventsNoresolved event signatures
addressYes
codeSizeNo
functionsNoresolved function signatures
isContractYes
functionCountNototal PUSH4 selectors found
unresolvedSelectorsNonovel/proprietary selectors no DB knows

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "what the reconstruction could and could not resolve",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / chain / description
      Previous value: -"robinhood | hyperevm"New value: +"robinhood | hyperevm | ethereum | base | stable | plasma | tempo | codex"
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description fully discloses behavior: it is partial, depends on public signature DBs, leaves unknown selectors unresolved, and treats bytecode as ground truth. It also clarifies proxy handling in the schema. The description is honest about limitations.

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 concise, front-loaded with the core purpose, and each sentence adds value—scope, method, limitations, and usage context are all covered without redundancy.

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?

Given the tool's specialized nature and presence of an output schema, the description sufficiently covers purpose, limitations, and alternatives. It doesn't need to describe return values because the output schema handles that, and it gives actionable guidance for edge cases.

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% with meaningful descriptions for both chain and address, including proxy guidance. The description adds no parameter-specific details but isn't required to since the schema already provides thorough semantics.

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?

Clearly states the tool reconstructs a partial function/event interface from bytecode for EVM contracts, with specific outputs (PUSH4 selectors and topic0 hashes) and no source/verification requirement. Distinguishes itself from a full ABI and mentions decompilation as an alternative for unresolved selectors.

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?

Explicitly states when to use ('to understand what an unknown contract does before trusting behavior-based guesses') and when not to rely on it (not a full ABI; use decompile for novel/proprietary selectors). This provides clear context and exclusions.

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