find_callers

[callgraph]

Finds methods that call a given method. Requires a symbolKey.

Why this tool exists

Bugs and regressions follow execution paths, not file names.

How it helps the agent

The model can trace callers, outgoing calls, and impact before choosing where to patch or how far a change may spread.

Parameters

NameTypeRequiredDescription
symbolKeystringYesOpaque symbolKey from search_symbols, resolve_symbol, get_symbol_at_position, or any tool that returns symbolKey. Not a name.
scopejsonNoOptional scope for call site search.
skipnumberNoPagination offset. Default is 0.
takenumberNoPagination size. Default is 200.
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root).

Examples

Find callers for a method

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_callers",
    "arguments": {
      "symbolKey": "..."
    }
  }
}
Response
{
  "success": true,
  "data": {
    "symbolKey": "...",
    "callerCount": 1,
    "paging": {
      "skip": 0,
      "take": 200,
      "returned": 1,
      "total": 1
    },
    "callers": [
      {
        "caller": {
          "name": "Login",
          "fullName": "MyApp.Controllers.AuthController.Login()",
          "symbolKey": "..."
        },
        "callSites": [
          {
            "filePath": "/path/to/AuthController.cs",
            "lineNumber": 58,
            "column": 12,
            "lineText": "await _service.LoginAsync(...);"
          }
        ]
      }
    ]
  },
  "error": null
}

Response Notes

Returns call sites grouped by caller (with paging)

↑/↓ NavigateEnter OpenSpace Expand