Skip to main content
Glama

forge_verify

Verify a deployed smart contract on Etherscan, Sourcify, or Blockscout to confirm its source code matches the on-chain bytecode.

Instructions

Verify a deployed contract on a block explorer (forge verify-contract). Supports Etherscan, Sourcify, and Blockscout.

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": {
      "projectPath": "<projectPath>",
      "contractAddress": "<contractAddress>",
      "contractPath": "<contractPath>"
    },
    "name": "forge_verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
profileNoFoundry profile to use (maps to FOUNDRY_PROFILE env var)
retriesNoNumber of retry attempts for verification
verifierNoVerification service to use
extraArgsNoAdditional CLI flags
projectPathYesAbsolute path to the foundry project directory
verifierUrlNoBlock explorer verification API URL
contractPathYesContract identifier, e.g. src/MyContract.sol:MyContract
constructorArgsNoABI-encoded constructor arguments (hex string)
contractAddressYesDeployed contract address to verify
etherscanApiKeyNoEtherscan API key (required for etherscan verifier)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses little beyond the names of supported services. It does not say that source code is submitted to a third-party service, that Etherscan requires credentials, how retries/timeouts behave, or what happens when a contract is already verified.

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?

Two sentences, front-loaded with the core action, with no filler or repetition. It is efficient but very sparse for a tool this configuration-heavy, bordering on under-specification rather than excess.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a ten-parameter tool that makes authenticated network calls to external explorers and has no output schema, the description leaves important operational context unstated: credential requirements, failure/already-verified behavior, and what a successful verification yields. The schema covers parameter names but not the tool's runtime behavior.

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 all ten parameters are already documented in the schema, including the verifier enum the description echoes. The description adds no meaning beyond that baseline, so the default 3 applies.

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 gives a specific verb and object ('Verify a deployed contract on a block explorer') and maps it to the underlying CLI command (forge verify-contract), so the scope is unambiguous and distinguishable from deployment-oriented siblings like forge_create. It does not explicitly contrast itself with any sibling, which keeps it from a 5.

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?

Use is only implied by the word 'deployed' — the agent can infer this runs after a contract is on-chain — and the listed verifiers hint at a choice to make. There is no explicit statement of prerequisites (an existing deployment, a built project, an API key for Etherscan) or when to prefer a different tool.

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