Skip to main content
Glama

Send input to Neovim

nvim_input

Queue Neovim key sequences as if typed by a human to trigger commands and edits, then use nvim_wait to ensure the screen updates before verifying.

Instructions

Send a key sequence to Neovim. Returns as soon as the keys are queued, not when the screen has updated: follow with nvim_wait before observing, otherwise the observation races the redraw.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYesKey sequence in Neovim notation, e.g. "ihello<Esc>", "<C-n>", "gg", "<leader>ff". Sent through nvim_input, so mappings and pending state behave exactly as for a human.
sessionIdYesSession id returned by nvim_launch or nvim_attach.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes
sessionIdYes
bytesWrittenYes
Behavior4/5

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

With no annotations, the description carries the behavioral burden and discloses the asynchronous nature: 'Returns as soon as the keys are queued, not when the screen has updated.' It also warns about racing the redraw, which is valuable non-obvious behavior.

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?

Two sentences, front-loaded with the primary action, and every word earns its place. The race-condition warning is essential and succinctly stated.

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

Completeness5/5

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

The description fully explains the tool's behavior and provides the necessary follow-up action (nvim_wait) for correct use. The presence of an output schema means return values need no explanation, and the description is complete for practical invocation.

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?

Schema coverage is 100%, so the description need not repeat parameter details. The description does not add new semantic context beyond the schema's existing explanation of Neovim notation and session id.

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?

'Send a key sequence to Neovim' is a specific verb+resource pairing that clearly states what the tool does. It distinguishes from siblings like nvim_command by emphasizing key sequence input rather than Ex commands.

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 gives explicit timing guidance: 'follow with nvim_wait before observing, otherwise the observation races the redraw.' It does not explicitly name alternatives, but the instruction to wait before observing is clear contextual usage.

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