close_document
Close a file in the LSP server
How to use it
close_document is exposed by the Lsp MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the close_document tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Lsp MCP
npx tritlo/lsp-mcp <language> /path/to/lsp [lsp-args...]Other tools in Lsp MCP (8)
Get code actions for a specific range in a file
Get completion suggestions at a specific location in a file
Get diagnostic messages (errors, warnings) for open files
Get hover information at a specific location in a file
Open a file in the LSP server for analysis
Restart the LSP server without restarting the MCP server
Change the server's logging verbosity level at runtime
Start the LSP server with a specified root directory