get_symbol_at_position

[symbols]

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

Why this tool exists

C# names are overloaded, scoped, generic, nested, and sometimes duplicated across projects.

How it helps the agent

Symbol discovery converts fuzzy names or cursor positions into stable identities the model can reuse for later references, callers, and refactors.

Parameters

NameTypeRequiredDescription
filePathstringYesAbsolute file path.
linenumberYes1-based line number.
columnnumberYes1-based column number.
pathStylestringNoPath style: 'absolute' (default) or 'relative' (to solution root).

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

↑/↓ NavigateEnter OpenSpace Expand