fix(mcp): declare readOnlyHint on find_files/grep/multi_grep (#771) - #774
Merged
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe MCP server updates descriptions for ChangesMCP tool metadata
Estimated code review effort: 1 (Trivial) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This localized change only declares accurate read-only metadata for three filesystem-search tools; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
find_files, grep, and multi_grep only read the filesystem but declared no MCP tool annotations, so plan-mode / read-only clients blocked them. Add annotations(read_only_hint = true, destructive_hint = false, open_world_hint = false) to each #[tool]. Closes #771
dmtrKovalenko
force-pushed
the
triage-bot/issue-771
branch
from
August 13, 2026 15:19
69651d8 to
fbf2398
Compare
dmtrKovalenko
approved these changes
Aug 13, 2026
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.
Closes #771
Root cause
The three
#[tool]macros incrates/fff-mcp/src/server.rs:422,:537, and:574declared noannotations, sotools/listreturnedannotations: null. Clients that gate read-only access byreadOnlyHint(plan mode, read-only sub-agents) treat missing annotations as potentially-mutating and block every fff tool, even though fff only reads the filesystem.Fix
Add
annotations(read_only_hint = true, destructive_hint = false, open_world_hint = false)to each of the three#[tool]attributes (find_files,grep,multi_grep). rmcp's macro emits these into thetools/listresponse.Steps to reproduce
Pre-fix, on
origin/main:Expected:
find_files,grep,multi_grepeach carry"annotations": {"readOnlyHint": true, "destructiveHint": false}.Actual (pre-fix): each tool has
"annotations": null.How verified
Rebuilt and re-ran the repro above:
cargo build -p fff-mcpclean. Diff is 6 insertions / 3 deletions in one file.Automated triage via Gustav. Honk-Honk 🪿
Summary by CodeRabbit