Route get_merge_request_conflicts through alias

What does this MR do and why?

Routes the standalone get_merge_request_conflicts tool through get_merge_request as an alias, following the same pattern as get_job_log → get_job. When invoked as get_merge_request_conflicts, the service implicitly injects include: ['conflicts'], so callers get the same data without a separate tool.

This removes ~120 lines of duplicated CustomService code and consolidates conflict fetching into the GraphQL-backed facet added in !249457 (merged).

References

Screenshots or screen recordings

image

How to set up and validate locally

Verified end to end on a local GDK running this branch, over the MCP JSON-RPC endpoint and again through Duo Chat.

  1. Start GDK with the MCP server enabled, and create an OAuth token with the mcp scope
  2. Call tools/list — get_merge_request is listed and get_merge_request_conflicts is not, because aliases stay hidden
  3. Call tools/call with get_merge_request_conflicts against a merge request that cannot be merged — returns conflictFiles with raw Git conflict markers, plus conflictStatus: HAS_CONFLICTS
  4. Make the same call with get_merge_request and include: ['conflicts'] — the payload is identical
  5. Repeat step 3 as a user with only Reporter access to the source project — conflictFiles is null and conflictStatus is NO_PUSH_ACCESS, with isError: false
  6. Repeat step 3 against a mergeable merge request — conflictStatus is NO_CONFLICTS, with isError: false
  7. In Duo Chat, ask for get_merge_request_conflicts on a conflicted merge request — Duo resolves the alias and reports the conflicting files
Results from the local run
Check Result
tools/list hides the alias 42 tools advertised, get_merge_request_conflicts absent
Old name still returns conflict content 2 files, HAS_CONFLICTS, all three marker types present
Alias vs include: ['conflicts'] payloads identical
Caller without push access conflictFiles: null, conflictStatus: NO_PUSH_ACCESS, isError: false
Mergeable merge request conflictStatus: NO_CONFLICTS, isError: false
Caller-supplied include unioned with the alias facet rather than overwritten
Duo Chat called gitlab_get_merge_request with include: ["conflicts"], one action, HAS_CONFLICTS

Duo Chat was exercised against gitlab-org/gitlab-test!9, which conflicts on files/ruby/feature.rb.

MR 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.

Edited by Terri Chu

Merge request reports

Loading
Loading