Browse documentation

find_references

[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 it locally in the Glider playground

Parameters

NameTypeRequiredDescription
symbolKeystringYesOpaque symbolKey from search_symbols, resolve_symbol, get_symbol_at_position, or any tool that returns symbolKey. Not a name.
scopejsonNoOptional scope. Omit scope to search the solution. When supplied, set mode to solution, project, document, or pathPrefix. project requires projectName. document requires filePath. pathPrefix requires pathPrefix. Paths can be absolute or relative to solutionRoot. Set includeExternal to true when the tool supports external symbols.
referenceKindsstringNoComma-separated filter: Read, Write, Invocation, TypeArgument, NameOf, Attribute. Write includes assignments inside callbacks. Invocation identifies the call target.
includeLineTextbooleanNoInclude lineText for each reference. Default is true. Default: true
maxLineTextCharsnumberNoMax characters for lineText. Use 0 for unlimited. Default is 200. Default: 200
groupBystringNoGrouping: 'file', 'project', 'containingSymbol', or 'none' (default). Default: "none"
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root). Default: "absolute"
skipnumberNoPagination offset. Default is 0. Default: 0
takenumberNoPagination size. Default is 200. Default: 200
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.

Find references for a symbolKey

Arguments
{
  "symbolKey": "..."
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_references",
    "arguments": {
      "symbolKey": "..."
    }
  }
}
Illustrative response
{
  "success": true,
  "symbolKey": "...",
  "referenceCount": 15,
  "paging": {
    "total": 15
  },
  "references": [
    {
      "filePath": "/path/to/Program.cs",
      "lineNumber": 9,
      "column": 35,
      "lineText": "builder.Services.AddSingleton<ISolutionManager, SolutionManager>();",
      "projectName": "MyProject",
      "referenceKind": "TypeArgument"
    }
  ]
}

Find field writes, including assignments inside event callbacks

Arguments
{
  "symbolKey": "...",
  "referenceKinds": "Write",
  "scope": {
    "mode": "solution"
  }
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_references",
    "arguments": {
      "symbolKey": "...",
      "referenceKinds": "Write",
      "scope": {
        "mode": "solution"
      }
    }
  }
}

Response Notes

Returns reference locations (with paging) Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.