lsp_declaration
Find declarations of a symbol to navigate between implementation and interface, such as header/source files in C/C++ or abstract methods in Java.
Instructions
Find declarations for a symbol. Maps to textDocument/declaration. Useful for C/C++ header/source split, TypeScript interfaces, Java abstract methods.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>",
"position": "<position>"
},
"name": "lsp_declaration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute or workspace-relative path to the file. | |
| position | Yes | Line/character position (zero-based) of the symbol. | |
| maxResults | No | Maximum number of results. |