find_package_usages
[external]
Maps a NuGet package to compile assemblies and metadata reference identities, then summarizes semantic source usages of that package.
Try it locally in the Glider playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| packageId | string | Yes | NuGet package ID to analyze. |
| packageVersion | string | No | Optional package version. Useful when multiple versions are restored. |
| projectName | string | No | Optional project name filter. |
| pathStyle | string | No | Path style: 'absolute' (default) or 'relative' (to solution root). Default: "absolute" |
| symbolsSkip | number | No | Symbol-summary pagination offset. Default is 0. Default: 0 |
| symbolsTake | number | No | Symbol-summary pagination size. Default is 200. Default: 200 |
| filesSkip | number | No | File-summary pagination offset. Default is 0. Default: 0 |
| filesTake | number | No | File-summary pagination size. Default is 200. Default: 200 |
| maxExampleLocations | number | No | Maximum sample locations or symbols to include per summary item. Default is 5. Use 0 to omit examples. Default: 5 |
| responseDetail | string | No | compact 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 usages for one package
Arguments
{
"packageId": "System.Text.Json"
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "find_package_usages",
"arguments": {
"packageId": "System.Text.Json"
}
}
}Illustrative response
{
"success": true,
"packageId": "System.Text.Json",
"packageVersion": "9.0.0",
"mappedAssemblies": [
{
"assemblyName": "System.Text.Json",
"referenceIdentity": "System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"
}
],
"projectSummaryCount": 1,
"fileSummaryCount": 2,
"symbolSummaryCount": 3,
"files": [
{
"filePath": "/path/to/JsonService.cs",
"usageCount": 4
}
],
"symbols": [
{
"symbolName": "JsonSerializer.Serialize",
"usageCount": 3
}
]
}Disambiguate between restored versions
Arguments
{
"packageId": "Newtonsoft.Json",
"packageVersion": "13.0.3"
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "find_package_usages",
"arguments": {
"packageId": "Newtonsoft.Json",
"packageVersion": "13.0.3"
}
}
}Response Notes
Returns package-to-assembly mapping plus project, file, and symbol usage summaries Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.