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
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |