Skip to content

fix: keep setup/meta commands out of the MCP tool surface#44

Merged
jjuanrivvera99 merged 1 commit into
developfrom
fix/mcp-tool-surface
Jun 11, 2026
Merged

fix: keep setup/meta commands out of the MCP tool surface#44
jjuanrivvera99 merged 1 commit into
developfrom
fix/mcp-tool-surface

Conversation

@jjuanrivvera99

Copy link
Copy Markdown
Member

Good catch by Juan: alegra mcp generates its tools from the whole command tree, so alegra agent guard (the command that generates the agent's own safety config) — plus skills, auth, config, alias, and init — 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 ExcludeCmdsContaining selector (mcp/completion/help were already excluded by ophis). Verified via tools/list: 318 → 302 tools, no operator commands leaked, all accounting operations (incl. destructive ones like invoices_void) still present.

  • Exclusion list lives in one mcpExcludedCommands var, locked by TestMCPExcludesSetupCommands.
  • Corrected the vs-official-MCP coverage claim (EN + ES): "every accounting operation you can run" rather than "anything you can run in the terminal" (setup/credential commands now stay out).

make check clean; mkdocs build --strict passes. Patch release 0.9.1.

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'.
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fab111c8-c89a-4021-bf41-1daa36286b8e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mcp-tool-surface

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jjuanrivvera99 jjuanrivvera99 merged commit c099776 into develop Jun 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants