forge_inspect
Retrieve a contract's compiled artifacts, including ABI, bytecode, storage layout, method identifiers, and gas estimates, to inspect and verify build output.
Instructions
Inspect a contract's compiled artifacts (forge inspect). Retrieve ABI, bytecode, storage layout, method identifiers, gas estimates, and more.
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>",
"contractPath": "<contractPath>",
"field": "<field>"
},
"name": "forge_inspect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | Which artifact field to inspect | |
| profile | No | Foundry profile to use (maps to FOUNDRY_PROFILE env var) | |
| projectPath | Yes | Absolute path to the foundry project directory | |
| contractPath | Yes | Contract identifier, e.g. src/MyContract.sol:MyContract |