Unlist get_merge_request_notes
What does this MR do and why?
This MR marks the get_merge_request_notes MCP tool as unlisted.
An unlisted tool no longer shows up in the MCP tools/list response or in the AI Catalog tool picker. It still works when called directly through tools/call. So any existing caller keeps working.
Use get_merge_request with include: ["notes"] instead. This follows the same pattern as !254299 (merged), which unlisted get_workitem_notes.
We could not do this before, because the notes facet was missing some data. !258219 (merged) (merged) closed that gap. It added backward paging (notes_last, notes_before), each note's position and discussion, and the resolvedDiscussionsCount / resolvableDiscussionsCount counts. The facet now returns everything the old tool returned.
Changes in this MR:
- Add an
unlisted?override on the service. - Update docs: add a history entry, add a "superseded" note on the tool, and point the
list_merge_requestsnotes paragraph toinclude: ["notes"]. - Update CE and EE
list_toolsrequest specs: drop the tool from the listed tools, and check it still can be called. One alias spec now uses thelist_merge_requestsalias, because the notes tool is no longer listed. - Add the tool to the expected unlisted set in the AI Catalog
mcp_tool_spec. - Add a service spec check for
unlisted?.
References
- Work item: #622712 (closed)
- Same pattern as: !254299 (merged)
- Blocker fixed by: !258219 (merged)
Screenshots or screen recordings
Not applicable. This change is backend and docs only. There is no UI.
How to set up and validate locally
Run these specs:
bundle exec rspec spec/requests/api/mcp/handlers/list_tools_spec.rb ee/spec/requests/api/mcp/handlers/list_tools_spec.rb ee/spec/models/ai/catalog/mcp_tool_spec.rb spec/services/mcp/tools/merge_requests/get_merge_request_notes_service_spec.rbMR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.