Skip to main content
Glama

EVM contract ABI, proxy info and signatures (6 chains)

contract_abi
Read-only

ABI and metadata for an EVM contract on Base, Ethereum, Arbitrum, OP Mainnet, Polygon or Avalanche: Sourcify verification match, contract name, compiler, proxy type and implementations (implementation ABI merged), function, event and error signatures with selectors and topics, and read vs write function lists. Unverified contracts get a best-effort function list from bytecode selectors named via the Sourcify 4byte database. Sources: Sourcify, chain JSON-RPC via PublicNode. Price: $0.002 per successful call, paid in USDC with x402 v2; failed calls and calls that match nothing are not charged.

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": {
      "chain": "<chain>",
      "address": "<address>"
    },
    "name": "contract_abi"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesChain by name, alias or chain id: base (8453), ethereum (1), arbitrum (42161), optimism (10), polygon (137), avalanche (43114).
formatNojson (default) adds the JSON ABI (up to 500 KB); human returns only the signature lists and metadata.
addressYesContract address (0x + 40 hex characters, any letter case).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond readOnlyHint/openWorldHint it discloses cost mechanics ($0.002 per successful call, USDC via x402 v2, failures and empty matches free), upstream sources (Sourcify, PublicNode JSON-RPC), and a behavioral fallback — best-effort bytecode selectors named via the 4byte database for unverified contracts, with implementation ABI merged for proxies. That is exactly the kind of operational context annotations cannot carry.

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?

Purpose and chain scope are front-loaded, and the source/pricing tail is genuinely useful rather than filler. It is a dense run-on listing many attributes in one sentence, which costs a little readability but wastes no sentences.

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 no output schema, the description fully enumerates what comes back (verification status, metadata, merged proxy ABIs, signatures with selectors/topics, read/write split) plus pricing and source caveats. For a three-parameter read tool this leaves nothing an agent needs missing.

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% and the schema already documents chain aliases/IDs, address format, and the json-vs-human format split including the 500 KB ABI payload. The description adds only the note that implementation ABIs are merged, so the baseline 3 is appropriate.

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+resource (ABI and metadata for an EVM contract) and enumerates the payload: verification match, contract name, compiler, proxy type/implementations, function/event/error signatures with selectors and topics, and read vs write lists. The proxy-ABI-merging and bytecode-selector fallback distinguish it from sibling decoders like chain_calldata_decode and token_scan.

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?

Implied usage is clear from the content scope (you fetch this when you need an ABI or signature list across the six named chains), and it discloses the unverified-contract path. However, there is no explicit when-to-use/when-not framing and no routing to a named alternative for related tasks such as decoding calldata.

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