Skip to main content
Glama

Fetch a contract's verified ABI + proxy resolution (paid $0.002)

abi_fetch

Fetch verified ABI and metadata for a contract on EVM chains. Resolves proxy patterns to return the implementation's ABI and function/event signatures.

Instructions

PAID $0.002 (x402, USDC on Base). Fetch the verified ABI + metadata for a contract. Give {address, chain}; get the ABI JSON, verification status/source (Sourcify or Blockscout), the callable function/event signatures, and full proxy-implementation resolution (EIP-1967/1822/OZ-legacy/beacon) — returning the implementation's ABI when it's a proxy. Without payment returns the x402 challenge; pass x_payment to settle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesEVM chain: ethereum | base | arbitrum | optimism | polygon | bsc.
addressYesContract address (0x + 40 hex).
x_paymentNox402 payment payload (base64) for this PAID decode. If supplied it is forwarded as the X-PAYMENT header to settle the call and return the real result instead of a 402 challenge. Omit to get the price challenge first.
Behavior5/5

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

With no annotations, the description fully discloses the paid nature ($0.002 USDC on Base), the x402 challenge when payment is omitted, the need to pass x_payment to settle, and the proxy-resolution behavior returning implementation ABI. It also lists verification sources (Sourcify/Blockscout). This is comprehensive.

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 front-loaded with the critical payment notice, then delivers the purpose and output summary in a compact, well-organized manner. Every sentence contributes meaningful information; no filler.

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?

Even with no output schema, the description enumerates what will be returned (ABI JSON, verification status/source, signatures, proxy implementation) and explains the 402 challenge flow. This gives the agent a full picture of expected behavior and 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?

The input schema already has 100% coverage with detailed descriptions for chain, address, and x_payment. The description adds context about proxy resolution and verification metadata but does not introduce new parameter meaning. Baseline 3 applies.

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 clearly states 'Fetch the verified ABI + metadata for a contract' with a specific verb and resource. It also explicitly lists expected outputs (ABI JSON, verification status, function/event signatures, proxy resolution), distinguishing it from sibling decode/selector tools.

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?

The description provides clear context: provide {address, chain} to get the ABI. It explains the payment flow and challenge behavior. However, it does not explicitly mention when not to use this tool versus the decode or selector siblings, though the purpose is distinct enough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zvmzaretsky/onchain-decode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server