forge_coverage
Generate a Foundry test coverage report to measure which contracts and lines your tests execute. Filter by test or contract name and output as summary, lcov, or text.
Instructions
Generate a test coverage report (forge coverage).
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_coverage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Test function name filter (--match-test) | |
| profile | No | Foundry profile to use (maps to FOUNDRY_PROFILE env var) | |
| reportType | No | Coverage report format (default: summary) | |
| projectPath | Yes | Absolute path to the foundry project directory | |
| contractFilter | No | Contract name filter (--match-contract) |