Skip to main content
Glama

get_contract_source

Retrieve verified smart contract source code from KaiaScan using a contract address; returns 'Unverified' when no source is available.

Instructions

Get verified contract source code from KaiaScan. Path: GET /api/v1/contracts?contractAddresses=:address (contract info); if source is not available returns 'Unverified'.

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.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It usefully discloses the unverified-contract fallback (returns 'Unverified') and the underlying endpoint, but says nothing about auth, rate limits, error behavior, or how the source is returned.

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?

Very short and front-loaded: the purpose leads, followed by the endpoint and the important edge-case fallback. Every clause carries information, no padding.

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?

There is no output schema or annotations, so the description should ideally describe the return shape (contract info vs source code fields, format). It covers the unverified case but leaves the successful response under-specified for a tool with no structured output documentation.

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 both parameters are already documented in the schema, and the description adds little beyond echoing the address path segment. Baseline 3 applies since the schema does the heavy lifting.

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 (Get) and resource (verified contract source code) plus the data provider (KaiaScan). It is reasonably distinct from siblings like get_contract_abi or read_contract, though it never names them to sharpen the boundary.

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 when-to-use guidance and no mention of the obvious alternatives (get_contract_abi, read_contract, encode_function_data). The agent must infer that this returns human-readable Solidity source rather than ABI or execution results.

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