v0.4.0: fix MCP tool names (vim_* not nvim_*)

mcp-neovim-server exposes tools named vim_command, vim_buffer,
vim_status, vim_edit, vim_window, vim_file_open, vim_search, etc. —
all with a vim_ prefix and with no eval tool. The agent and skills
previously referenced mcp__neovim__nvim_command and
mcp__neovim__nvim_eval, which do not exist, so every drive/introspect
call would have failed to resolve.

- agents/companion.md: add the full vim_* tool reference table; note
  that lua is evaluated via vim_command with :lua print(...)
- skills/editor-introspect: add a 'tools you have' section; correct
  the runnable-via line
- skills/editor-act: correct the description's tool references
This commit is contained in:
oleks
2026-05-21 11:08:54 +03:00
parent 31eb79bd56
commit 222035d4fe
5 changed files with 65 additions and 21 deletions
+3 -3
View File
@@ -60,7 +60,7 @@ These are defined under `<leader>a*` in
## The full `:ClaudeCode*` command surface
When driving the editor via `mcp__neovim__nvim_command` you have more
When driving the editor via `mcp__neovim__vim_command` you have more
than the keymaps above. The complete set:
- `:ClaudeCode` — toggle the terminal split.
@@ -88,7 +88,7 @@ quoting them.
1. **Confirm the split is open.** Either ask `editor-introspect` to
check for a Claude Code buffer/window, or just run
`:ClaudeCode` via `mcp__neovim__nvim_command` — the command is
`:ClaudeCode` via `mcp__neovim__vim_command` — the command is
idempotent (toggles, but if already visible the user sees no
surprise).
@@ -104,7 +104,7 @@ quoting them.
neovim.nix add a keymap for ...", say "add a `<leader>tw` keymap
that toggles wrap, next to the existing wrap-toggle block."
Send via `:ClaudeCodeSend` (after selection) or by typing the
prompt into the Claude Code buffer (`mcp__neovim__nvim_command`
prompt into the Claude Code buffer (`mcp__neovim__vim_command`
plus an explicit feedkeys is overkill — usually the user can type
it themselves once focus is in the split).
+6 -5
View File
@@ -3,11 +3,12 @@ name: editor-act
description: |
Drive the user's running Neovim instance — open files, run user
commands, trigger keymaps, jump to LSP locations, toggle UI,
evaluate small lua snippets. Uses `mcp__neovim__nvim_command` /
`nvim_eval` against the live instance. Prefers the user's own
commands and keymaps over teaching new vim syntax. Will *not* edit
buffer contents — that work is handed off via the
`claude-code-handoff` skill. Trigger on "open <file> in nvim",
evaluate small lua snippets. Uses the `mcp__neovim__*` tools
(`vim_command`, `vim_file_open`, `vim_window`, …) against the live
instance. Prefers the user's own commands and keymaps over teaching
new vim syntax. Will *not* edit buffer contents — that work is
handed off via the `claude-code-handoff` skill. Trigger on
"open <file> in nvim",
"jump to definition of", "show file finder", "split this", "toggle
neo-tree", "run this command in my nvim", "go to next diagnostic",
"save my buffer".
+19 -3
View File
@@ -33,11 +33,27 @@ present in this session, **stop and tell the user**:
Do not try to fake introspection from the config alone.
## The tools you have
`mcp-neovim-server` exposes these (note the `vim_` prefix, *not*
`nvim_`):
- `mcp__neovim__vim_command` — run any `:` command, including `:lua`.
Returns the rendered command output. This is the workhorse for
introspection: pass `:verbose nmap ...`, `:lua print(...)`, etc.
- `mcp__neovim__vim_status` — cursor, mode, marks, registers in one
call. Use instead of three separate `:lua` calls.
- `mcp__neovim__vim_buffer` — buffer contents with line numbers.
- `mcp__neovim__vim_health` — check the nvim↔server connection; run
this first if anything seems disconnected.
There is **no eval tool**. To get a lua value, call `vim_command`
with `:lua print(vim.inspect(<expr>))` and parse the printed output.
## The introspection vocabulary
These are the queries you should reach for first. All are runnable
via `mcp__neovim__nvim_command` (returns the rendered command output)
or `mcp__neovim__nvim_eval` (returns a value).
Queries to reach for first. Unless noted, run each as the `command`
argument to `mcp__neovim__vim_command`.
### Keymaps