Skip to main content
Glama

clear_highlights

Removes all MCP highlights from a Neovim buffer without affecting syntax or LSP highlights. Use to clean up after annotation workflows.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite no annotations, the description discloses all relevant behaviors: only removes MCP highlights, no buffer content modification, safe when no highlights are present, returns a success object, and errors if the buffer is not open. This fully compensates for missing annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short paragraphs with no wasted words. The first paragraph covers the core purpose and safety, the second covers the parameter. It is front-loaded with the key action. Minor redundancy could be trimmed, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a single parameter and no output schema, the description covers the return value, error condition, and relationship to sibling tools. It is nearly complete; a minor gap is not detailing the error format for non-open buffers.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, the description adds essential meaning: 'file' must be a path relative to Neovim's cwd, must correspond to an open buffer (as shown in `get_state`), and returns an error otherwise. This goes beyond the raw schema but could be slightly more detailed (e.g., mentioning it is a string).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states: 'Remove all MCP highlights from a Neovim buffer.' It uses a specific verb and resource, and distinguishes from syntax/LSP highlights, leaving no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says 'Use this to clean up highlights after an annotation workflow' and specifies it only removes highlights added by `highlight_range` or `highlight_ranges`, providing clear usage context. It does not explicitly list alternatives but sibling tools imply them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulburgess1357/nvim-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server