Skip to main content
Glama

send_command

Execute one or more Vim ex commands in Neovim to modify buffers, files, windows, and editor state. Use for operations like saving, opening files, splitting windows, and setting options.

Instructions

Run one or more Vim ex commands in Neovim. This is a mutation tool — commands can modify buffers, files on disk, windows, and editor state.

command: a single command string or a list of strings, without the leading ':'. E.g. "w", "e src/main.py", "42", "wincmd v", "lua vim.print(...)", or ["wincmd p", "e file.py", "wincmd p"].

Use this for editor operations that don't have a dedicated tool (e.g. saving, opening files, splitting windows, setting options). Use send_keys instead when you need normal-mode motions or operator sequences. Use find_and_replace_buf or write_full_buf for buffer text edits — they are safer and provide undo.

Returns {output} with the command's captured output, or {error} if the command failed. When given a list, returns a list of results in the same order; execution stops on the first error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description bears the full transparency burden. It clearly states this is a mutation tool that can modify buffers, files, windows, and editor state. It also explains the execution behavior for lists (stops on first error) and the output format. While it doesn't cover every possible edge case (e.g., crashing Neovim), it provides sufficient transparency for safe use.

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: it starts with the core purpose, then details the parameter, provides usage guidelines, and ends with output behavior. Every sentence adds value, and there is no redundancy or filler. It is appropriately sized for the complexity of the tool.

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 that there are no annotations and the tool has only one parameter, the description covers the essential aspects: parameter format, usage context, output, and mutation behavior. It could be slightly more complete by mentioning that commands can affect other parts of the editor state (e.g., undo history), but it is still thorough for a well-defined tool.

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 input schema has 0% coverage (no descriptions), so the description must fully compensate. It does so excellently: it explains the parameter format (single or list of strings, no leading colon), provides multiple examples (including lua commands), and clarifies that the leading colon should be omitted. This adds substantial meaning beyond the schema.

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 that the tool runs Vim ex commands in Neovim, and it explicitly distinguishes this from sibling tools like send_keys, find_and_replace_buf, and write_full_buf. The verb 'run' is specific and combined with the resource 'Vim ex commands' makes the purpose unmistakable.

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?

The description provides explicit when-to-use guidance: 'Use this for editor operations that don't have a dedicated tool', and gives clear alternatives for different scenarios (send_keys for normal-mode motions, find_and_replace_buf/write_full_buf for buffer text edits). This fully satisfies the usage guideline dimension.

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