vim_health
Assess the health of Neovim connections to ensure stable and reliable integration with the mcp-neovim-server for efficient code editing workflows.
Instructions
Check Neovim connection health
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:465-478 (registration)Registration of the 'vim_health' tool using server.tool(), including description, empty input schema, and inline handler that delegates to neovimManager.healthCheck() and formats the response.server.tool( "vim_health", "Check Neovim connection health", {}, async () => { const isHealthy = await neovimManager.healthCheck(); return { content: [{ type: "text", text: isHealthy ? "Neovim connection is healthy" : "Neovim connection failed" }] }; } );
- src/index.ts:469-477 (handler)Inline handler function for the vim_health tool that performs the core logic: calls healthCheck on neovimManager and returns a formatted text response.async () => { const isHealthy = await neovimManager.healthCheck(); return { content: [{ type: "text", text: isHealthy ? "Neovim connection is healthy" : "Neovim connection failed" }] }; }
- src/neovim.ts:78-86 (helper)The actual health check implementation in NeovimManager: attempts to connect to Neovim via socket and evaluate a simple expression '1' to verify connection health.public async healthCheck(): Promise<boolean> { try { const nvim = await this.connect(); await nvim.eval('1'); // Simple test return true; } catch { return false; } }