lsp_open_document
Opens a document in the language server to enable code intelligence features like hover, definitions, and diagnostics. Tracks document lifecycle automatically.
Instructions
Open a document in the LSP server (textDocument/didOpen). Tracks the document for lifecycle management.
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>",
"language": "<language>"
},
"name": "lsp_open_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | File content. Reads from disk if omitted. | |
| filePath | Yes | Absolute or workspace-relative path to the file. | |
| language | Yes | Language server to use (e.g., typescript, python). |