Skip to main content
Glama

Verify a contract on the Zenith explorer

zenith_verify_contract
Idempotent

Verify a deployed contract through an Etherscan-compatible explorer by compiling source locally, checking bytecode match, submitting standard-JSON input, and waiting for the verification result.

Instructions

Verifies a deployed contract through the explorer's Etherscan-compatible API. From a .sol file it compiles locally with the given settings, checks the bytecode matches the deployed code, then submits the exact standard-JSON input and waits for the result. Also accepts a standard-JSON input file (for example from forge verify-contract --show-standard-json-input).

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": "zenith_verify_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
runsNo
addressYes
optimizeNo
evmVersionNoEVM version; Zenith runs "prague"prague
sourcePathNoPath to the .sol file
contractNameNoContract to use when the file has several
qualifiedNameNo"File.sol:Contract", with standardJsonPath
compilerVersionNosolc version, e.g. "0.8.30" (default: bundled, if the pragma allows)
constructorArgsNoABI-encoded constructor arguments (hex), if any
standardJsonPathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true and idempotentHint=true, so the safety profile is covered. The description adds real value by disclosing the sequence: local compile, bytecode comparison, then submission of the standard-JSON input and waiting for the result. It omits auth/API-key needs, rate limits, and what a failed match looks like.

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 sentences, front-loaded with the core action, then the two input modes. The second sentence is dense but every clause carries information; nothing is redundant.

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?

For a 10-parameter, no-output-schema tool that performs a network submission, the description covers the workflow and input modes but not the outcome (verification ID, success/failure reporting) or prerequisites such as explorer API credentials. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 10 parameters at 60% schema coverage, the description compensates by explaining the two mutually exclusive paths (sourcePath-based compilation vs standardJsonPath) and by tying qualifiedName to standardJsonPath. It still leaves runs, optimize, evmVersion and constructorArgs to the schema, which mostly documents them.

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 ('Verifies a deployed contract') plus the mechanism ('explorer's Etherscan-compatible API'), which separates it from zenith_deploy and zenith_read_contract. It never names a sibling explicitly, so differentiation is inferred from the workflow rather than stated.

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 clear context for when to use it and describes two distinct input modes: a .sol source file compiled locally, or a standard-JSON input file (with a concrete example, forge verify-contract --show-standard-json-input). It does not state when not to use it or what to do if verification fails.

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