Repository navigation
fix(cli): apply plan mode to the MCP server-level registry - #297
Merged
Merged
Conversation
build_server_registry_for_mcp ignored its plan_mode argument, so the server-level registry of 'tole serve --transport mcp' kept Write tools under --plan-mode. Apply retain_read_only like the other faces. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
build_server_registry_for_mcpnow honorsplan_mode: the server-level registry oftole serve --transport mcpkeeps only ReadOnly tools under--plan-mode.Why
The argument was ignored (
_plan_mode), so Write tools stayed registered at the server level, contradicting the 'absent on the wire' guarantee and the per-session /tole mcpbehavior.Changes
crates/tole-cli/src/main.rs: callretain_read_only()whenplan_modeis set (same semantics asmcp_server_command).mcp_server_registry_is_read_only_under_plan_mode.mcp_http.rs) already passes the flag; nothing else drops it.Testing
fmt, clippy -D warnings, workspace tests,
--no-default-features --features shell-tools --testscheck,cora review --stagedclean. New test verified failing with the fix reverted.🤖 Generated with Claude Code