Skip to main content
Glama

send_command

Execute Vim ex commands in Neovim to modify buffers, files, and editor state. Use for operations like saving files or splitting windows. Returns command output or error.

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?

Despite no annotations, the description discloses it is a mutation tool that can modify buffers, files, disks, and editor state. It explains that execution stops on first error for list commands. Could mention undo behavior but still good.

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?

Description is well-structured with clear sections, front-loaded purpose, and every sentence provides necessary information without redundancy. Length is appropriate 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?

Covers purpose, usage context, parameter details, return behavior (output/error), and list handling. With an output schema present, the description is complete and leaves no ambiguity for an AI agent.

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 only parameter 'command' is thoroughly explained: it can be a string or list of strings, must not have leading ':', and includes multiple examples covering different use cases. This adds significant meaning beyond the schema which only specifies types.

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?

Description clearly states it runs Vim ex commands in Neovim, specifies that it is a mutation tool, and explicitly distinguishes from sibling tools by naming them (send_keys, find_and_replace_buf, write_full_buf).

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 tells when to use this tool (editor operations without dedicated tool) and when to use alternatives (send_keys for motions, find_and_replace_buf/write_full_buf for safer buffer edits). Also clarifies behavior for list execution and error handling.

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