Skip to main content
Glama

Attach to Neovim

nvim_attach

Attach to a running Neovim instance as an additional UI, allowing you to observe and interact with the editor without terminating the user's session.

Instructions

Attach as an additional UI to an already-running Neovim instance. The instance belongs to the user: nvim_close will refuse to terminate it. Note that Neovim sizes the screen to the smallest attached UI, so the requested size can shrink what the user sees.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colsNoRequested screen width.
rowsNoRequested screen height.
addressYesRPC endpoint of a running Neovim, as printed by `nvim --listen`: a Unix socket path (/tmp/nvim.sock) or a Windows named pipe (\\.\pipe\nvim.1234.0).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
colsYes
modeYes
rowsYes
addressYes
sessionIdYes
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals a non-obvious side effect: 'Neovim sizes the screen to the smallest attached UI, so the requested size can shrink what the user sees.' It also explains ownership implications. However, it does not mention potential errors (e.g., invalid address) or what happens if already attached, so not a 5.

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?

Three sentences, each earning its place: the primary action, the ownership/termination caveat, and the screen-sizing consequence. No filler or redundancy, and the most important information is front-loaded.

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 complexity, the presence of an output schema, and the absence of annotations, the description covers the essential context: what it attaches to, the user ownership, and a critical side effect. It does not address error handling or prerequisites, but those are less critical given the schema and output schema.

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 description coverage is 100%, so baseline is 3. The description adds behavioral meaning to the cols/rows parameters by explaining their impact on the user's screen, which goes beyond the schema's simple 'Requested screen width/height.' It does not fully compensate for all parameters but adds value.

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 'Attach as an additional UI to an already-running Neovim instance' with a specific verb and resource, distinguishing it from siblings like nvim_launch (launch new) and nvim_observe (observe). It precisely explains the tool's core function.

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 indicates when to use the tool: for an already-running instance, and notes that nvim_close will refuse to terminate it because it belongs to the user. This implies it is for user-owned instances, but it does not explicitly name alternatives or state when not to use it, so it falls short of a 5.

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

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