Skip to main content
Glama

get_contract_abi

Get the ABI of a verified smart contract to decode transaction input data or call contract methods, with a summary of all functions and events.

Instructions

Fetch the ABI for a verified smart contract. Returns a summary: function count, event count, and a list of all functions with their signatures and state mutability. Includes a truncated raw ABI (2000 chars). The ABI is required for calling contract methods or decoding transactions. Use get_transaction to see raw input data first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesVerified contract address (0x...) to fetch the ABI for
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the ABI is truncated to 2000 chars, and details what the summary includes, giving good behavioral insight into the fetch operation.

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 four sentences, each adding value: purpose, return summary, necessity, and usage hint. No redundant or superfluous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple tool (one parameter, no output schema), the description is comprehensive: explains what is returned, why needed, and a tip to use get_transaction. Does not cover error cases but adequate for most agents.

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% for the single 'address' parameter. The description does not add any additional meaning beyond 'Verified contract address (0x...) to fetch the ABI for', so the description adds no extra semantic value.

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 the verb 'Fetch' and resource 'ABI for a verified smart contract', and lists the return summary (function count, event count, signatures, mutability) which distinguishes it from siblings like get_transaction.

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 explains that the ABI is required for calling contract methods or decoding transactions, and suggests using get_transaction to see raw input data first, providing clear context for when to use this tool.

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/friendlygeorge/etherscan-mcp-server'

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