Browse documentation

find_unused_project_references

[architecture]

Tests each direct ProjectReference by removing it in memory and checking whether new compiler errors appear in the referencing project. Use it for compile-backed project cleanup planning.

Try it locally in the Glider playground

Parameters

NameTypeRequiredDescription
projectNamestringNoOptional project name to limit analysis to one referencing project.
maxEvidenceDiagnosticsnumberNoMaximum compiler diagnostics to include as evidence for a used reference. Default is 5. Use 0 to omit samples. Default: 5
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.

Analyze all direct project references

Arguments
{}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_unused_project_references",
    "arguments": {}
  }
}
Illustrative response
{
  "success": true,
  "projectCountAnalyzed": 1,
  "totalReferencesAnalyzed": 3,
  "unusedReferenceCount": 1,
  "items": [
    {
      "projectName": "MyProject.Web",
      "referenceProjectName": "MyProject.Legacy",
      "referencePath": "../MyProject.Legacy/MyProject.Legacy.csproj",
      "canRemove": true,
      "evidenceDiagnostics": []
    }
  ]
}

Analyze one project with no evidence samples

Arguments
{
  "projectName": "MyProject.Web",
  "maxEvidenceDiagnostics": 0
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_unused_project_references",
    "arguments": {
      "projectName": "MyProject.Web",
      "maxEvidenceDiagnostics": 0
    }
  }
}

Response Notes

Returns direct project references that appear removable, plus evidence when a reference is still required Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.