get_diagnostics
Retrieve compilation errors and warnings for Java files. Filter by file, severity, and limit results to identify syntax errors, type mismatches, or missing imports.
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 |
|---|---|---|---|
| maxResults | No | Max diagnostics to return (default 100) | |
| filePath | No | Optional path to source file. If omitted, checks all files. | |
| severity | No | Filter by severity: 'error', 'warning', or 'all' (default: 'all') |