get_symbol_at_position

[search]

Resolves the symbol at a file position and returns a stable symbol key.

Try this tool in Playground.

Parameters

NameTypeRequiredDescription
filePathstringYesAbsolute file path.
linenumberYes1-based line number.
columnnumberYes1-based column number.
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root).
timeout_msnumberNoTimeout in milliseconds. Use 0 to disable. Default is 30000.

Examples

Get symbol key under cursor

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_symbol_at_position",
    "arguments": {
      "filePath": "/Users/dev/MyProject/Program.cs",
      "line": 10,
      "column": 15
    }
  }
}
Response
{
  "success": true,
  "data": {
    "symbolKey": "...",
    "displayName": "MyApp.Services.UserService",
    "kind": "Type",
    "containingType": null,
    "filePath": "/path/to/UserService.cs",
    "lineNumber": 12
  },
  "error": null
}

Response Notes

Returns a symbol key and basic symbol details