Browse documentation

diagnostic_hotspots

[diagnostics]

Groups diagnostics into hotspots by file, project, category, or ID so you can plan cleanup before drilling into raw diagnostics.

Try it locally in the Glider playground

Parameters

NameTypeRequiredDescription
filePathstringNoOptional loaded document path. Accepts absolute, loaded-root-relative, and repository-relative paths. Linked files can be outside the root. Use an absolute path if relative forms match two loaded documents.
projectNamestringNoOptional loaded project name. Matches are case-insensitive. Use server_status with includeProjects=true to select a project. Unreleased validation change: development builds after Glider 12.4.5 reject unknown project names.
diagnosticSourcestringNoDiagnostic source: 'compiler' (default), 'all', or 'analyzer'. Default: "compiler"
severitystringNoMinimum severity: 'error', 'warning', 'info', or 'hidden'. Default is 'warning'. Default: "warning"
categorystringNoOptional category filter (e.g., 'Compiler', 'Style').
idPrefixstringNoOptional diagnostic ID prefix filter (e.g., 'CS', 'CA', 'IDE').
groupBystringNoPrimary grouping: 'file' (default), 'project', 'category', or 'id'. Default: "file"
includeExamplesbooleanNoInclude example diagnostics inside each hotspot group. Default is false. Default: false
maxExamplesPerGroupnumberNoMaximum example diagnostics to include per group when includeExamples=true. Default is 3. Use 0 for none. Default: 3
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root). Default: "absolute"
sortBystringNoOptional sort: 'count' (default), 'errorCount', 'warningCount', 'infoCount', or 'key'.
sortOrderstringNoSort order: 'desc' (default) or 'asc'. Default: "desc"
skipnumberNoPagination offset. Default is 0. Default: 0
takenumberNoPagination size. Default is 50. Default: 50
responseDetailstringNocompact returns results and actionable state. full adds diagnostic metadata under responseDiagnostics. Default: "compact"

Examples

Replace sample paths and symbol keys with values from your workspace.

Group compiler diagnostics by file

Arguments
{
  "groupBy": "file"
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "diagnostic_hotspots",
    "arguments": {
      "groupBy": "file"
    }
  }
}
Illustrative response
{
  "success": true,
  "restoreHints": [],
  "restoreHintsOmittedProjectCount": 0,
  "restoreHintsNextStep": null,
  "groupBy": "file",
  "groupCount": 1,
  "paging": {
    "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."
        }
      ]
    }
  ]
}

Show analyzer hotspots with examples

Arguments
{
  "diagnosticSource": "analyzer",
  "groupBy": "category",
  "includeExamples": true
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "diagnostic_hotspots",
    "arguments": {
      "diagnosticSource": "analyzer",
      "groupBy": "category",
      "includeExamples": true
    }
  }
}

Response Notes

Development builds after Glider 12.4.5 reject unknown project names with success=false. Use server_status with includeProjects=true to select a loaded project, or load the correct project. A filePath filter must name a document in the loaded project scope. An unknown file returns success=false. Use reload after a file or project change, or load the project that contains the file. 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. Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.