Skip to main content
Glama

forge_clone

Clones a verified contract from a block explorer into a local Foundry project, letting you inspect and build on on-chain code locally.

Instructions

Clone a verified contract from a block explorer into a local Foundry project (forge clone).

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

Input Schema

NameRequiredDescriptionDefault
chainNoChain name or ID (e.g. mainnet, 1, optimism, 10)
addressYesAddress of the verified contract to clone
destinationNoDirectory to clone into
etherscanApiKeyNoEtherscan API key

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one meaningful trait beyond the schema: the target must be a verified contract sourced from a block explorer. It omits other relevant behavior for a write-to-disk operation – whether it requires network access or an API key for certain chains, what happens if the destination directory already exists or contains files, and whether anything is overwritten. That leaves significant behavioral gaps for a tool with no annotation coverage.

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?

A single front-loaded sentence that states the action, source, and destination with no filler. The parenthetical '(forge clone)' merely restates the tool name and is the only wasted element.

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 four-parameter tool with only one required field, no output schema, and no annotations, the description should cover defaults (chain, destination) and the API-key/network requirement. It conveys the core operation but leaves the agent to discover defaults and file-system side effects from the schema alone, so it is adequate rather than complete.

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 four parameters (address, chain, destination, etherscanApiKey) are already documented in the schema with examples. The description adds no parameter-level detail such as default chain or default destination directory, so the baseline 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 names a specific verb (clone) and resource (a verified contract) and states both the source (block explorer) and the destination (local Foundry project), so the agent knows exactly what the tool produces. It does not explicitly differentiate itself from siblings such as forge_verify or forge_init, which keeps it at 4 rather than 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?

Usage is implied by the phrase 'verified contract from a block explorer' – an agent can infer this is for pulling an on-chain verified source into a local project. However, there is no statement of when to prefer it over forge_init or forge_verify, and no preconditions such as the contract needing to be verified on a supported explorer, so guidance beyond the implied case is absent.

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