Loading
Update get_merge_request tool to be graphQL backed + add new capabilities
What does this MR do and why?
Consolidates the merge request read tools on the GitLab MCP server. get_merge_request becomes the single facet reader: its associated data (commits, notes, pipelines, discussions, diff (stats only)) is requested through the include parameter, one facet per call (a single-value string, so each call stays a single bounded query).
NOTEs:
- No standalone MCP tools are removed, that will be handled separately (see #605878 (comment 3647801471))
- The deprecated
idalias is dropped in favor ofproject_id diffis stats only andconflictsis deferred due to some graphQL work required to support them both
References
- contributes to #605878 (closed)
- Epic gitlab-org/gitlab&22781
Screenshots or screen recordings
No UI changes.
How to set up and validate locally
- Restart the Rails web process so the tool registry picks up the changes:
gdk restart rails-web - Connect using MCP inspector and list the MCP tools and confirm no tools are missing.
npx -y @modelcontextprotocol/inspector -- env NODE_TLS_REJECT_UNAUTHORIZED=0 mise x -- npx -y mcp-remote https://gdk.test:3443/api/v4/mcp --debug - Call
get_merge_requestwith a facet (one per call) and confirm the data comes back inline:
- Call
get_merge_requestwith no facet data comes back:
- Call it with multiple facets, you get a validation error:
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Edited by Terri Chu




