feat(mcp): ToolAnnotations hints on tools/list and GET /tools#170
Conversation
MCP clients can distinguish read-only query tools from destructive apply tools via readOnlyHint/destructiveHint; HTTP catalog exposes the same fields.
🦋 Changeset detectedLatest commit: 030d9a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reached
More reviews will be available in 46 minutes and 52 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThis PR introduces tool annotation metadata—read-only, destructive, and idempotent hints—that inform MCP and HTTP clients about tool safety semantics. A new ChangesTool Annotations Across MCP and HTTP
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
- M.6: probe ToolAnnotationsSchema before attaching MCP hints - Full-catalog annotation tests on tools/list and GET /tools - Lift to architecture.md; delete plan; remove roadmap item - Document index-mutator readOnlyHint: false in consumer surfaces
Summary
mcp-tool-annotations.tsmap withreadOnlyHint/destructiveHint/idempotentHintfor all 20 MCP toolsregisterToolcall viawithToolAnnotations()GET /toolscatalog with the same hint fields (dedupe tool list ontoMCP_TOOL_NAMES)docs/agents.mdTest plan
bun test src/application/mcp-tool-annotations.test.ts src/application/mcp-server.test.ts src/application/http-server.test.tsbun run typecheckSummary by CodeRabbit
New Features
/toolsendpoint, helping consumers understand tool capabilities.Documentation