Skip to main content
Glama

send_keys

Send raw keystrokes to Neovim to modify buffers, change mode, or trigger editor actions. Use for normal-mode motions, visual selections, and operator sequences.

Instructions

Send raw keystrokes to Neovim as if typed by the user. This is a mutation tool — keystrokes can modify buffers, change mode, and trigger editor actions.

keys: a string of Vim keystrokes. Esc is prepended automatically, so input always begins in normal mode. Multi-mode sequences must be sent in a single call (e.g. "17GVG", not "17GV" then "G"). Use Vim notation for special keys (e.g. "", "v", "").

Use this for normal-mode motions, visual selections, or operator sequences. Use send_command for ex commands, and find_and_replace_buf or write_full_buf for text edits — they are safer and provide structured results.

Returns {sent} confirming the keys that were dispatched. Keystrokes are fire-and-forget; errors from the resulting Vim actions are not captured in the return value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keysYes
Behavior5/5

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

Declares the tool is a mutation tool that can modify buffers, change mode, trigger actions. Notes that errors from Vim actions are not captured (fire-and-forget). Describes the automatic Esc prepending behavior. With no annotations provided, the description fully covers behavioral traits.

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 well-structured with a clear purpose line, a dedicated 'keys:' section, and use-case guidance. Every sentence adds value, no redundancy. It's appropriately concise for the complexity.

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?

Given the tool's mutation nature, single parameter, and no output schema, the description covers all essential aspects: purpose, parameter semantics, usage and alternatives, return value behavior, and error handling. It is complete for correct invocation.

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

Parameters5/5

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

The sole parameter 'keys' is thoroughly explained: it's a string of Vim keystrokes, Esc is prepended automatically, multi-mode sequences must be sent in a single call, and use Vim notation for special keys (examples given). Since schema coverage is 0%, the description fully compensates.

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 'Send raw keystrokes to Neovim as if typed by the user', specifying the verb and resource. It distinguishes itself from siblings like send_command, find_and_replace_buf, and write_full_buf by describing their respective use cases.

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

Usage Guidelines5/5

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

Explicitly states when to use: 'Use this for normal-mode motions, visual selections, or operator sequences.' Also gives alternatives: 'Use send_command for ex commands, and find_and_replace_buf or write_full_buf for text edits' with reasoning about safety and structured results. Includes usage tips like Esc prepending and multi-mode sequences.

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