get_diagnostics
Identify and diagnose compilation errors and warnings in Java files. Filter by severity and limit results for targeted debugging.
Instructions
Get compilation diagnostics (errors and warnings) for a file or project.
USAGE: get_diagnostics() for all files, or get_diagnostics(filePath="...") for one file OUTPUT: List of compilation errors and warnings with locations
Useful for finding syntax errors, type mismatches, missing imports, etc.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | No | Optional path to source file. If omitted, checks all files. | |
| severity | No | Filter by severity: 'error', 'warning', or 'all' (default: 'all') | |
| maxResults | No | Max diagnostics to return (default 100) |