Skip to main content
Glama

Hearth: x402 Pay-Safety & Discovery

contract_abi

Read-only

Contract verification and ABI. Whether a contract on Base, Ethereum, Arbitrum or Optimism is source-verified (Sourcify), its name, compiler, full ABI, function and event signatures, and its EIP-1967 proxy implementation (also looked up). Deterministic, no LLM. Example output: {"chain":"base","address":"0x…","isContract":true,"verified":true,"match":"exact_match","name":"FiatTokenProxy","compiler":"0.6.12","proxyImplementation":"0x…","functions":["admin()"],"events":["Upgraded(address)"],"abi":[]}. Price: $0.004 USDC on Base via x402 (pass the payment in _meta["x402/payment"]).

Input Schema

NameRequiredDescriptionDefault
chainNoChain: base (default), ethereum, arbitrum, optimism
addressYesContract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Without annotations this would be thin, but beyond readOnlyHint/openWorldHint the description discloses the critical non-obvious traits: it costs $0.004 USDC on Base via x402 paid through _meta["x402/payment"], it is deterministic, it follows EIP-1967 proxies, and it returns unverified contracts with isContract/verified flags rather than erroring. Nothing contradicts the annotations.

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?

The core capability is front-loaded, followed by output shape and price, and every element serves a purpose. The second sentence is a dense run-on that could be split, keeping it from a 5.

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 inline example output is exactly what an agent needs to parse results (chain, verified, match type, proxyImplementation, functions/events, abi). Combined with chain coverage, the payment mechanism, and determinism, an agent can call and interpret this tool correctly.

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% and the schema already documents the chain enum values and its base default, so the description adds little parameter-level meaning beyond restating the chain list. Baseline 3 is appropriate.

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?

The description names the specific resource (contract verification status and ABI) and enumerates exactly what is returned: name, compiler, full ABI, function/event signatures, and EIP-1967 proxy implementation. It is clearly distinct from siblings like base_token_info or token_safety, though it never explicitly contrasts itself with them.

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?

The supported chains and the 'Deterministic, no LLM' note imply when this tool fits (structured on-chain lookups rather than inference-based siblings like ai_extract), but there is no explicit when-to-use or when-not-to-use guidance and no named alternative.

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.

Resources