Skip to main content
Glama
KaiSign MCP Server

KaiSign MCP Server

Official
by Kai-Sign

verify_contract_metadata

Verify a contract's ERC-7730 metadata attestation against the on-chain KaiSign Registry to confirm the entry is finalized and not revoked.

Instructions

Diagnostic: verify one contract's metadata attestation against the on-chain KaiSign Registry. For decoding + safety verdicts on a transaction, prefer clear_sign_payload (it verifies every contract in the call tree automatically).

This tool checks whether a contract has finalized ERC-7730 metadata in the KaiSign Registry SMT on Sepolia. Entries are keyed by (chainId, target), where target is the transaction destination address.

Verification flow:

  1. getLatestSpecForTarget(chainId, target) for the latest finalized, non-revoked UID

  2. getAttestation(uid) and check chainId, target, finalized and not revoked

  3. Compute the SMT leaf locally: keccak256(abi.encode(LEAF_TYPEHASH, chainId, target, metadataHash))

  4. Compare against the registry approvedLeaf(chainId, target, metadataHash)

Returns:

  • verified: true if leaf hashes match

  • source: 'leaf-verified' (success), 'local-metadata' (local file, no on-chain attestation), 'mismatch', or 'error'

  • attestation details including target, metadataHash, finalizedAt, revoked status

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": {
      "contractAddress": "<contractAddress>"
    },
    "name": "verify_contract_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainIdNoChain ID where the contract is deployed
contractAddressYesContract address to verify (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does so well: it names the backing network (Sepolia), the registry SMT, the four-step verification procedure, and what the source field can be on local-file vs on-chain paths. Gaps remain around auth/permission requirements and failure modes beyond a generic 'error' value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and the alternative before detail, which is good structure. However, the numbered four-step verification flow (typehash leaf computation, approvedLeaf comparison) is implementation detail an agent does not need in order to select or invoke the tool, placing it at the edge of appropriate length.

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?

There is no output schema, so the description compensates by enumerating the return fields (verified, source with all four enum-like values, attestation details). Combined with the stated network, the verification flow, and the sibling routing, an agent has everything needed to call it 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 description coverage is 100%, so both parameters are already documented, establishing a baseline of 3. The description adds modest meaning by explaining that entries are keyed by (chainId, target) and that target is the transaction destination address, mapping conceptually onto contractAddress, but it gives no format or default guidance beyond the schema.

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?

States a specific verb and resource: verify one contract's metadata attestation against the on-chain KaiSign Registry, and labels itself a diagnostic. It explicitly distinguishes itself from clear_sign_payload, which handles transaction decoding and safety verdicts, so an agent can separate the two without opening schemas.

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?

Gives explicit routing guidance: for decoding plus safety verdicts on a transaction, prefer clear_sign_payload because it verifies every contract in the call tree automatically. The 'Diagnostic' framing implies when this tool is appropriate, though it does not mention other adjacent tools such as get_cached_metadata or state prerequisites for the registry lookup.

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