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 id alias is dropped in favor of project_id
  • diff is stats only and conflicts is deferred due to some graphQL work required to support them both

References

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. Restart the Rails web process so the tool registry picks up the changes:
    gdk restart rails-web
  2. 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
  3. Call get_merge_request with a facet (one per call) and confirm the data comes back inline:

image

image

  1. Call get_merge_request with no facet data comes back:

image

image

  1. Call it with multiple facets, you get a validation error:

image

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Terri Chu

Merge request reports

Loading
Loading