fix(mcp): explain gated tool calls - #630
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_f2fc85c4-7cac-4d2b-b3e5-e5d23e13b441) |
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ 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 |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
expand_palette/BRAINLAYER_MCP_PROFILE=fullremedies from the Python MCP serverUnknown toolbehavior for names that do not existRuntime rollout
The live BrainBar LaunchAgent profile change is intentionally outside this code PR. It has already been applied and verified with a real
brain_digestcall.Important inventory note: BrainBar's native full profile contains 17 tools and does not implement the Python-only
brain_resume; this PR does not claim otherwise.Test plan
Roadmap follow-ups
Do not merge as part of the urgent runtime rollout.
Note
Low Risk
Error-message and routing-order changes only; no auth, data, or tool behavior changes beyond clearer JSON-RPC errors.
Overview
BrainBar and the Python MCP server now return different errors when a tool name is real but hidden by the core profile versus when the name does not exist at all.
On
tools/call, routing checks the canonical tool registry first. Unknown names still getUnknown tool: <name>. Known tools that are not exposed under core get a message that the tool is gated, with remedies to callexpand_paletteor setBRAINLAYER_MCP_PROFILE=full.The Python server uses the same gated-tool wording. Swift and Python tests lock in both error paths.
Reviewed by Cursor Bugbot for commit 637fe4b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Improve error messages for gated MCP tool calls to include remediation steps
tools/callnow returns-32601with the message:"Tool '<name>' is gated by the core MCP profile. Call expand_palette, or set BRAINLAYER_MCP_PROFILE=full on the MCP server."instead of the previous vague "not exposed" message.-32601with"Unknown tool: <name>", now via a separate existence check split from the exposure check in both the Swift router (MCPRouter.swift) and the Python server (mcp/init.py).Macroscope summarized 637fe4b.