clear_highlights
Remove MCP-added highlights from a Neovim buffer to clean up after annotation workflows. Leaves syntax highlighting and other plugin highlights untouched.
Instructions
Remove all MCP highlights from a Neovim buffer. Only removes
highlights added by highlight_range or highlight_ranges — does
not affect syntax highlighting, LSP highlights, or other plugins.
Does not modify buffer content. Safe to call even if no highlights
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 highlights after an annotation workflow.
Use highlight_range or highlight_ranges to add highlights.
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": "<file>"
},
"name": "clear_highlights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes |