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
- Deprecate and remove MCP tools superseded by th... (#622712 - closed)
- Parent issue: #605878 (closed)
- Stacked on: !249457 (merged) (conflicts facet)
- Prior MR: !249456 (merged) (GraphQL
conflictFilesfield) - Follow-up: #629462 (diff exclusion misses files renamed out of an excluded path)
Screenshots or screen recordings
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.
- Start GDK with the MCP server enabled, and create an OAuth token with the
mcpscope - Call
tools/list—get_merge_requestis listed andget_merge_request_conflictsis not, because aliases stay hidden - Call
tools/callwithget_merge_request_conflictsagainst a merge request that cannot be merged — returnsconflictFileswith raw Git conflict markers, plusconflictStatus: HAS_CONFLICTS - Make the same call with
get_merge_requestandinclude: ['conflicts']— the payload is identical - Repeat step 3 as a user with only Reporter access to the source project —
conflictFilesis null andconflictStatusisNO_PUSH_ACCESS, withisError: false - Repeat step 3 against a mergeable merge request —
conflictStatusisNO_CONFLICTS, withisError: false - In Duo Chat, ask for
get_merge_request_conflictson 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.
