get_diagnostics
Identify Java compilation errors and warnings in files or projects to resolve syntax issues, type mismatches, and 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 |
|---|---|---|---|
| filePath | No | Optional path to source file. If omitted, checks all files. | |
| maxResults | No | Max diagnostics to return (default 100) | |
| severity | No | Filter by severity: 'error', 'warning', or 'all' (default: 'all') |