clear_virtual_texts
Remove MCP virtual text annotations from a Neovim buffer. Clears only annotations added by add_virtual_text or add_virtual_texts without affecting other content.
Instructions
Remove all MCP virtual text annotations from a Neovim buffer.
Only removes annotations added by add_virtual_text or
add_virtual_texts — does not affect highlights, LSP virtual
text, inlay hints, or other plugins. Does not modify buffer
content. Safe to call even if no annotations are present
(returns {cleared: true} either way).
file: path relative to Neovim's cwd (as shown in get_state buffers).
The buffer must already be open in Neovim; returns an error otherwise.
Use this to clean up after an annotation workflow. Use
add_virtual_text or add_virtual_texts to add annotations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes |