[diagnostics]
Groups diagnostics into hotspots by file, project, category, or ID so you can plan cleanup before drilling into raw diagnostics.
Diagnostics are the fastest objective signal that a change broke something or that an existing hotspot needs attention.
The model can ask for filtered, paged, or grouped diagnostics before and after edits instead of waiting for a full build transcript.
Try it locally in the Glider playground
| Name | Type | Required | Description |
|---|---|---|---|
| filePath | string | No | Optional file path filter. |
| projectName | string | No | Optional project name filter. |
| diagnosticSource | string | No | Diagnostic source: 'compiler' (default), 'all', or 'analyzer'. |
| severity | string | No | Minimum severity: 'error', 'warning', 'info', or 'hidden'. Default is 'warning'. |
| category | string | No | Optional category filter (e.g., 'Compiler', 'Style'). |
| idPrefix | string | No | Optional diagnostic ID prefix filter (e.g., 'CS', 'CA', 'IDE'). |
| groupBy | string | No | Primary grouping: 'file' (default), 'project', 'category', or 'id'. |
| includeExamples | boolean | No | Include example diagnostics inside each hotspot group. Default is false. |
| maxExamplesPerGroup | number | No | Maximum example diagnostics to include per group when includeExamples=true. Default is 3. Use 0 for none. |
| pathStyle | string | No | Path style: 'absolute' (default) or 'relative' (to solution root). |
| sortBy | string | No | Optional sort: 'count' (default), 'errorCount', 'warningCount', 'infoCount', or 'key'. |
| sortOrder | string | No | Sort order: 'desc' (default) or 'asc'. |
| skip | number | No | Pagination offset. Default is 0. |
| take | number | No | Pagination size. Default is 50. |
Group compiler diagnostics by file
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "diagnostic_hotspots",
"arguments": {
"groupBy": "file"
}
}
}{
"success": true,
"data": {
"restoreHints": [],
"restoreHintsOmittedProjectCount": 0,
"restoreHintsNextStep": null,
"groupBy": "file",
"groupCount": 1,
"paging": {
"skip": 0,
"take": 50,
"returned": 1,
"total": 1
},
"comReferenceHints": [],
"groups": [
{
"key": "/path/to/UserService.cs",
"totalCount": 4,
"errorCount": 1,
"warningCount": 3,
"infoCount": 0,
"examples": [
{
"id": "CS8602",
"severity": "Warning",
"lineNumber": 42,
"message": "Dereference of a possibly null reference."
}
]
}
]
},
"error": null
}Show analyzer hotspots with examples
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "diagnostic_hotspots",
"arguments": {
"diagnosticSource": "analyzer",
"groupBy": "category",
"includeExamples": true
}
}
}{
"success": true,
"data": {
"restoreHints": [],
"restoreHintsOmittedProjectCount": 0,
"restoreHintsNextStep": null,
"groupBy": "file",
"groupCount": 1,
"paging": {
"skip": 0,
"take": 50,
"returned": 1,
"total": 1
},
"comReferenceHints": [],
"groups": [
{
"key": "/path/to/UserService.cs",
"totalCount": 4,
"errorCount": 1,
"warningCount": 3,
"infoCount": 0,
"examples": [
{
"id": "CS8602",
"severity": "Warning",
"lineNumber": 42,
"message": "Dereference of a possibly null reference."
}
]
}
]
},
"error": null
}Returns grouped diagnostics with severity totals and optional examples. comReferenceHints identifies missing COM wrappers and the build or reload remedy. Analyzer-only responses have no restore hints. restoreHints lists up to 20 projects with relevant compiler errors, diagnosticIds, unverified restoreState, and restore/build plus reload advice. restoreHintsOmittedProjectCount and restoreHintsNextStep explain how to request omitted projects with projectName. Glider preserves compiler errors and does not run restore or infer restore state from asset paths or timestamps.