[references]
Finds all references to a symbol. Requires a symbolKey (use resolve_symbol or search_symbols to get one). Supports scope/filtering/grouping/paging.
Try this tool in Playground.
| Name | Type | Required | Description |
|---|---|---|---|
| symbolKey | string | Yes | Opaque symbolKey from search_symbols, resolve_symbol, get_symbol_at_position, or any tool that returns symbolKey. Not a name. |
| scope | json | No | Optional scope. Example: { "kind": "solution" } or { "kind": "project", "projectName": "MyProject" }. Set includeExternal=true where supported. |
| referenceKinds | string | No | Optional filter (comma-separated): 'Read,Write,Invocation,TypeArgument,NameOf,Attribute'. |
| includeLineText | boolean | No | Include lineText for each reference. Default is true. |
| maxLineTextChars | number | No | Max characters for lineText. Use 0 for unlimited. Default is 200. |
| groupBy | string | No | Grouping: 'file', 'project', 'containingSymbol', or 'none' (default). |
| pathStyle | string | No | Path style: 'absolute' (default) or 'relative' (to solution root). |
| skip | number | No | Pagination offset. Default is 0. |
| take | number | No | Pagination size. Default is 200. |
| timeout_ms | number | No | Timeout in milliseconds (5 minutes). Use 0 to disable. Default is 300000. |
Find references for a symbolKey
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "find_references",
"arguments": {
"symbolKey": "..."
}
}
}{
"success": true,
"data": {
"symbolKey": "...",
"referenceCount": 15,
"paging": {
"skip": 0,
"take": 200,
"returned": 15,
"total": 15
},
"references": [
{
"filePath": "/path/to/Program.cs",
"lineNumber": 9,
"column": 35,
"lineText": "builder.Services.AddSingleton<ISolutionManager, SolutionManager>();",
"projectName": "MyProject",
"referenceKind": "TypeArgument"
}
]
},
"error": null
}Returns reference locations (with paging)