Skip to main content
Glama
Ethereum MCP
by ETHCF

get_contract_abi

Retrieve the ABI for a verified contract by address to decode functions and events and build accurate smart contract interactions.

Instructions

Get the ABI for a verified contract

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

Input Schema

NameRequiredDescriptionDefault
addressYesContract address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden and it discloses very little. 'Verified contract' is the only behavioral hint (unverified contracts presumably fail or return nothing), with nothing about the return shape, whether the ABI is a JSON string or parsed array, error behavior, or any auth/rate limits.

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?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity means there is no structure beyond the one clause.

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

Completeness3/5

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

This is a simple read tool with one required parameter and no output schema, so the description's brevity is defensible. However, with no output schema present, the agent still learns nothing about what the ABI response looks like, which is the main open gap.

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?

Only one parameter exists and schema coverage is 100%, with the schema already documenting it as 'Contract address (0x...)'. The description adds no meaning beyond that except the verification precondition, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (get the ABI) plus a meaningful qualifier (for a verified contract), which separates it from siblings like get_contract_source or get_contract_creator. It does not explicitly name an alternative, so it stops short of a 5.

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?

Usage is only implied: the phrase 'verified contract' hints that unverified addresses won't yield an ABI, and the single-address parameter implies one contract per call. There is no explicit when-to-use versus when-not, and no named alternative for the source-code or creator cases.

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

Deploy Server

Other Tools