Skip to main content
Glama

Contract ABI, verified contract: ABI and source

contract_abi
Read-only

The verified ABI of a smart contract on Ethereum, Base, Arbitrum, Optimism or Polygon from Sourcify's open verification repository: contract name, compiler, match quality, every function and event signature, the full ABI, and for proxies the implementation contract with its ABI. Optional source=true adds the main source file (up to 20,000 characters). Unverified contracts are an uncharged 404. Use before calling or decoding a contract. Example: address=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
chainNoethereum (default), base, arbitrum, optimism or polygon
sourceNotrue to include the main source file
addressYesContract 0x address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say read-only, non-destructive, open-world and non-idempotent; the description adds the substantive traits behind that: unverified contracts yield an uncharged 404, source is truncated at 20,000 characters, cost is $0.01 per call via x402 USDC or a card key, first 25 free, and repeats are charged again (consistent with idempotentHint=false). This is exactly the 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 supported chains are front-loaded, followed by return payload, then cost and semantics. The single dense paragraph is efficient with no filler, though the pricing/auth clause is packed tightly enough that skimming risks missing the charging caveat.

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 the return payload (name, compiler, match quality, signatures, ABI, proxy implementation), covers the failure mode (404 on unverified), and discloses auth and pricing. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description goes beyond it by stating the source parameter's 20,000-character truncation limit and by listing the supported chains in prose that the chain enum-less schema only partially conveys. A concrete example address is also supplied.

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 names a specific resource (verified contract ABI), its source (Sourcify), and its full scope (Ethereum, Base, Arbitrum, Optimism, Polygon), then enumerates the returned fields. An agent can distinguish it from eth_call or eth_proxy without opening the schema, since the return payload is spelled out field by field.

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?

"Use before calling or decoding a contract" gives an explicit trigger condition and implicitly routes work away from eth_call/evm_decode_calldata. It does not name a sibling alternative or state any when-not condition, so it stops short of full routing guidance.

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.