Skip to main content
Glama

LSP hover

nvim_lsp_hover

Get hover documentation for symbols at a position, returning LSP-provided signatures, types, and doc comments.

Instructions

Get hover documentation (signatures, types, docs) for the symbol at a position, as the editor's language server would show it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colNo1-based column number. Default 1.
lineNo1-based line number. Default 1.
pathNoTarget buffer by file path (must already be open). Ignored if bufnr is set.
bufnrNoTarget buffer number. Omit to use the path or the current buffer.
Behavior3/5

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

No annotations are provided, so the description carries the transparency burden. It states 'Get' implying a read-only operation and 'as the editor's language server would show it' hinting at LSP dependency, but it doesn't disclose prerequisites like an active LSP or buffer requirements (though schema covers the buffer). It doesn't describe failure modes or return format.

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?

The description is a single concise sentence that front-loads the action ('Get hover documentation') and efficiently conveys the tool's purpose without any filler. Every word contributes.

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?

For a read-only tool with all parameters fully described in the schema and a clear purpose, the description is mostly complete. It doesn't fully explain return format or requirements for LSP attachment, but given the low complexity and sibling context, it is adequate.

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

Parameters3/5

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

The schema documents all four parameters with descriptions, achieving 100% coverage. The description doesn't add meaning beyond the schema, except for the phrase 'at a position' which aligns with the col/line parameters but adds no new detail. Hence baseline 3.

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 uses a specific verb and resource ('Get hover documentation') and details the content ('signatures, types, docs'). It clearly distinguishes from sibling LSP tools by focusing on hover, not definition, references, or rename.

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?

The description clearly implies when to use this tool: when you need hover info for a symbol at a position. It doesn't explicitly list alternatives or exclusions, but the purpose is unambiguous compared to sibling tools, so it earns a 4 for clear context without exclusions.

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/Shooooooooo/nvim-mcp'

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