Skip to main content
Glama

clear_highlights

Remove MCP-added highlights from a Neovim buffer without affecting syntax or LSP highlights. Specify an open file path to clear highlights added by highlight_range or highlight_ranges. Safe to call even with no highlights.

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
Behavior4/5

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

Discloses that it only removes MCP highlights, does not modify buffer content, is safe to call even with no highlights (returns {cleared: true}), and requires the buffer to be open. For a simple clear tool with no annotations, this covers key behaviors.

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

Conciseness5/5

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

Five short sentences, each adding distinct value: main action, scope, safety, parameter detail, usage. No filler or redundancy. Front-loaded with primary purpose.

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 the tool's simplicity (one required param, no output schema), the description covers enough: purpose, constraints, parameter format, and usage. Could mention error behavior for invalid paths, but overall complete.

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?

Schema has 0% description coverage, but the description adds meaning for the `file` parameter: 'path relative to Neovim's cwd' and constraint that buffer must be open. This adds significant value beyond the schema's bare title.

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 clearly states 'Remove all MCP highlights from a Neovim buffer' with specific verb and resource. It distinguishes from siblings by specifying it only removes highlights added by highlight_range/highlight_ranges, not affecting syntax highlighting or LSP. No ambiguity.

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?

Explicitly says 'Use this to clean up highlights after an annotation workflow' and names alternatives (highlight_range, highlight_ranges). Provides clear usage context. Could add explicit 'when not to use' but current is sufficient.

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