fix: keep setup/meta commands out of the MCP tool surface#44
Conversation
alegra mcp generates its tools from the command tree, so agent, skills, auth, config, alias, and init were exposed as MCP tools — including alegra agent guard, which generates the agent's own safety config. None are accounting operations an agent should call. Scope the tool surface to account operations with an ExcludeCmdsContaining selector (mcp/ completion/help were already excluded by ophis): 318 -> 302 tools. Locked with a test, and corrected the vs-official-MCP coverage claim (EN + ES) to 'every accounting operation' rather than 'anything you can run in the terminal'.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Good catch by Juan:
alegra mcpgenerates its tools from the whole command tree, soalegra agent guard(the command that generates the agent's own safety config) — plusskills,auth,config,alias, andinit— showed up as MCP tools. None are accounting operations an agent should call; it's confusing and wrong.Fix
Scope the MCP tool surface to account operations with an
ExcludeCmdsContainingselector (mcp/completion/helpwere already excluded by ophis). Verified viatools/list: 318 → 302 tools, no operator commands leaked, all accounting operations (incl. destructive ones likeinvoices_void) still present.mcpExcludedCommandsvar, locked byTestMCPExcludesSetupCommands.make checkclean;mkdocs build --strictpasses. Patch release 0.9.1.