forge_build
Compiles a Foundry project and returns compiler output, including warnings and errors, so you can validate smart contract code and diagnose build failures.
Instructions
Compile a Foundry project (forge build). Returns compiler output including warnings and errors.
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>"
},
"name": "forge_build"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Foundry profile to use (maps to FOUNDRY_PROFILE env var) | |
| extraArgs | No | Additional CLI flags passed to forge build | |
| projectPath | Yes | Absolute path to the foundry project directory |