Skip to main content
Glama

get_contract_abi

Retrieve the ABI JSON for a verified Kaia contract by address from KaiaScan, selecting mainnet or Kairos, to decode or interact with its functions.

Instructions

Get the ABI of a verified contract from KaiaScan. Path: GET /api/v1/contracts/:contractAddress/abi. Returns ABI JSON as text.

Input Schema

NameRequiredDescriptionDefault
networkNomainnet or kairos (default: mainnet)
contractAddressYesContract address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations, so the description carries the burden; it does disclose the upstream source (KaiaScan), the raw endpoint, and the return format ('ABI JSON as text' — a string, not a parsed object, which is genuinely useful). It omits failure behavior for unverified/nonexistent contracts, authentication needs, and 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?

Three short sentences, front-loaded with the purpose, then the endpoint, then the return format. The endpoint path borders on redundant with the tool name but is cheap and unambiguous.

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?

For a simple two-parameter read tool with no output schema, the definition covers source, return format, and precondition. The main remaining gap is error behavior for unverified contracts, which matters given the 'verified' qualifier.

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%, so the schema already documents both parameters including the mainnet/kairos enum values and default. The path template repeats contractAddress in URL form but adds no new semantics, and the network parameter is not addressed in the description.

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?

Specific verb+resource: gets the ABI of a contract, with the important qualifier that the contract must be verified, and names the source (KaiaScan). It doesn't explicitly distinguish itself from siblings like get_contract_source or read_contract, which an agent would have to infer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No statement of when to use this versus get_contract_source, read_contract, or encode_function_data. The only implicit guidance is the phrase 'verified contract', which hints at a precondition but never says what happens for an unverified address or which sibling provides source code instead.

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