Skip to main content
Glama

send_command

Run Vim ex commands to modify buffers, files, windows, and editor state. Use for operations like saving, splitting windows, or 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
Behavior5/5

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

Despite no annotations, the description fully discloses that it is a mutation tool that can modify buffers, files, windows, and editor state. It also explains error handling and list execution 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?

The description is well-organized into paragraphs, front-loading the purpose, then parameter details, usage guidance, and return format. Every sentence adds value without redundancy.

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 single parameter and existence of an output schema, the description covers all necessary aspects: command syntax, mutation behavior, usage context, and return format (output or error, list support).

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?

Although schema coverage is 0%, the description thoroughly explains the 'command' parameter: it can be a string or list of strings, without leading ':', with concrete examples like 'w', 'e src/main.py', 'wincmd v'.

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 opens with 'Run one or more Vim ex commands in Neovim,' which clearly specifies the action and resource. It further distinguishes itself from sibling tools by naming dedicated alternatives for buffer edits and normal-mode motions.

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?

It explicitly states when to use this tool ('for editor operations that don't have a dedicated tool') and when to use alternatives like send_keys or find_and_replace_buf, noting that the latter are safer and provide undo.

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