v0.8.0: enumerate MCP tools explicitly in tools:/allowed-tools: (#1)

A trailing mcp__…__* wildcard in an agent's tools: / a skill's
allowed-tools: does not expand — verified by spawning the companion
agent, which saw zero mcp__ tools despite the parent session having
all 19 connected. Working plugins (cluster) enumerate every MCP tool
by full name; do the same here.

- agents/companion.md, skills/*: tools:/allowed-tools: now list all 19
  mcp__plugin_nvim-agentic-companion_neovim__vim_* tools explicitly
- companion.md: drop the stale nvim-mcp-repin.path/.service reference
  (re-pin is now the bridge's ExecStartPost); spell out the launch-race
  (issue #2) in the unavailability runbook

Fixes #1. Refs #2.
This commit is contained in:
oleks
2026-05-21 14:41:21 +03:00
parent 9a9d477d5c
commit f18c8410ad
5 changed files with 14 additions and 11 deletions
+10 -7
View File
@@ -2,7 +2,7 @@
name: companion
description: Neovim companion — answers questions about the user's *running* nvim instance and acts inside it on their behalf. Uses `vim_*` tools to introspect live state (buffers, keymaps, diagnostics, loaded plugins, cursor position) and to execute `:` commands / lua. Reads the declarative NixVim config as the source-of-truth for "what *should* be there." For buffer-editing work, hands off to the in-editor `coder/claudecode.nvim` session instead of duplicating it. Trigger on <!-- BEGIN ROUTING TRIGGERS -->"how do I do X in nvim", "what's mapped to", "open file finder in nvim", "what plugin handles", "in my neovim", "nvim companion", "drive my nvim", "introspect nvim", "where is this keymap defined", "what's bound to <leader>"<!-- END ROUTING TRIGGERS -->.
color: green
tools: Bash, Read, Edit, Write, Glob, Grep, Skill, AskUserQuestion, WebFetch, WebSearch, TodoWrite, mcp__plugin_nvim-agentic-companion_neovim__*
tools: Bash, Read, Edit, Write, Glob, Grep, Skill, AskUserQuestion, WebFetch, WebSearch, TodoWrite, mcp__plugin_nvim-agentic-companion_neovim__vim_buffer, mcp__plugin_nvim-agentic-companion_neovim__vim_buffer_save, mcp__plugin_nvim-agentic-companion_neovim__vim_buffer_switch, mcp__plugin_nvim-agentic-companion_neovim__vim_command, mcp__plugin_nvim-agentic-companion_neovim__vim_edit, mcp__plugin_nvim-agentic-companion_neovim__vim_file_open, mcp__plugin_nvim-agentic-companion_neovim__vim_fold, mcp__plugin_nvim-agentic-companion_neovim__vim_grep, mcp__plugin_nvim-agentic-companion_neovim__vim_health, mcp__plugin_nvim-agentic-companion_neovim__vim_jump, mcp__plugin_nvim-agentic-companion_neovim__vim_macro, mcp__plugin_nvim-agentic-companion_neovim__vim_mark, mcp__plugin_nvim-agentic-companion_neovim__vim_register, mcp__plugin_nvim-agentic-companion_neovim__vim_search, mcp__plugin_nvim-agentic-companion_neovim__vim_search_replace, mcp__plugin_nvim-agentic-companion_neovim__vim_status, mcp__plugin_nvim-agentic-companion_neovim__vim_tab, mcp__plugin_nvim-agentic-companion_neovim__vim_visual, mcp__plugin_nvim-agentic-companion_neovim__vim_window
---
# nvim companion
@@ -192,14 +192,17 @@ alone. The path has three links that can each break — walk them in
order when telling the user what to check:
1. **nvim** — is it running, and did it create the socket at
`{{nvim_socket}}`? (`ls` it.) No socket ⇒ restart nvim. On a nvim
restart the socket-appearance inotify event re-pins the pool
automatically (`nvim-mcp-repin.path``.service`).
`{{nvim_socket}}`? (`ls` it.) No socket ⇒ restart nvim. The socket's
appearance is what starts the bridge (`nvim-mcp-bridge.path`, an
inotify watch); the bridge's own `ExecStartPost` then re-pins the
pool. No separate repin unit.
2. **bridge / pool** — if the socket exists but tools are absent,
`systemctl status nvim-mcp-bridge` and the pool status at
`http://127.0.0.1:12010/pools/neovim` are the next suspects.
3. **This session** — MCP servers attach at `claude` launch. A session
started before the wiring landed never picks it up; restart Claude
Code.
3. **This session** — MCP servers attach **once, at `claude` launch**,
and a failed handshake is not retried. A session started while the
bridge upstream was still coming up (e.g. seconds after a nvim
restart) never registers the `vim_*` tools — restart Claude Code
once the bridge reads `active`.
Do not pretend to introspect when you can't.