open_document
Opens a file in the LSP server for analysis, enabling diagnostics, hover information, and completions. Use before querying these features for a specific document.
Instructions
Open a file in the LSP server for analysis. Use this tool before performing operations like getting diagnostics, hover information, or completions for a file. The file remains open for continued analysis until explicitly closed
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": {
"file_path": "<file_path>",
"language_id": "<language_id>"
},
"name": "open_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the file to open | |
| language_id | Yes | The programming language the file is written in |