diagnose_and_fix
Diagnose a Java file and compute quick-fix edits for each fixable problem. Returns the top fix edits as editsByFile without applying them.
Instructions
Diagnose a file and compute the quick-fix edits in one call: runs diagnostics, resolves the available fixes per fixable problem, and returns the top fix's edits for each, combined as editsByFile.
USAGE: diagnose_and_fix(filePath="path/to/File.java") OUTPUT: problems (each with its chosen fix when one exists) and editsByFile with the computed edits. NOTHING is written - apply the returned edits yourself.
A file with no fixable diagnostics returns empty problems/edits.
Requires load_project to be called first.
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": {
"filePath": "<filePath>"
},
"name": "diagnose_and_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to source file |