get_symbol_at_position
[symbols]
Resolve the exact token at a Java source position.
Unreleased read-only preview. Technical reference for agents and client integrators.
Before this call
Whitespace and a position after a token return no symbol. An ambiguous_context lists available selections.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| path | string | Yes | Contained workspace file path. Use a nonblank string of at most 4096 characters. |
| line | number | Yes | One-based source line. |
| column | number | Yes | One-based UTF-16 column. |
| module | string | No | Exact imported module identifier. |
| scope | string | No | Compiler scope. |
Examples
Technical examples for agents and client integrators. Replace paths and opaque keys with returned workspace values.
Illustrative arguments
Arguments
{
"path": "src/main/java/example/OrderService.java",
"line": 12,
"column": 18,
"scope": "main"
}Full MCP request
Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_symbol_at_position",
"arguments": {
"path": "src/main/java/example/OrderService.java",
"line": 12,
"column": 18,
"scope": "main"
}
}
}Response notes
Returns an exact symbol only for a token that contains one. Select module and scope when several compiler contexts cover the file.