find_usages

[search]

Finds all usages (references) of a symbol in the loaded solution. Returns file paths, line numbers, and code snippets for each reference.

Parameters

NameTypeRequiredDescription
symbolNamestringYesThe name of the symbol to find. Can be a simple name (e.g., 'ISolutionManager') or fully qualified (e.g., 'Glider.Interfaces.ISolutionManager').
projectNamestringNoOptional project name to limit the search scope.

Examples

Find all usages of an interface

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_usages",
    "arguments": {
      "symbolName": "IUserService"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "symbolName": "ISolutionManager",
    "symbolKind": "Interface",
    "usageCount": 15,
    "usages": [
      {
        "filePath": "/path/to/Program.cs",
        "lineNumber": 9,
        "column": 35,
        "lineText": "builder.Services.AddSingleton<ISolutionManager, SolutionManager>();",
        "projectName": "Glider.StdioServer"
      }
    ]
  },
  "error": null
}

Find usages of a method

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_usages",
    "arguments": {
      "symbolName": "GetUserById"
    }
  }
}
Response
{
  "success": true,
  "data": {
    "symbolName": "ISolutionManager",
    "symbolKind": "Interface",
    "usageCount": 15,
    "usages": [
      {
        "filePath": "/path/to/Program.cs",
        "lineNumber": 9,
        "column": 35,
        "lineText": "builder.Services.AddSingleton<ISolutionManager, SolutionManager>();",
        "projectName": "Glider.StdioServer"
      }
    ]
  },
  "error": null
}

Response

Returns list of usage locations with file paths, line numbers, and snippets

Go to Playground to test this tool interactively.