{"id":"c6d0bdf5-ba34-4751-a554-d2c835c22261","task":"Create a new GitLab merge request via the REST API, including handling forked-project targets and marking the MR as a draft.","domain":"docs.gitlab.com","steps":["Send POST /projects/:id/merge_requests where :id is the numeric project ID or URL-encoded path (e.g. group%2Fproject) of the project containing the source branch.","Include the required body params: source_branch (e.g. \"feature-x\"), target_branch (e.g. \"main\"), and title (e.g. \"Add feature X\").","curl --request POST --header \"PRIVATE-TOKEN: <your_access_token>\" --header \"Content-Type: application/json\" --data '{\"source_branch\":\"feature-x\",\"target_branch\":\"main\",\"title\":\"Add feature X\"}' \"https://gitlab.example.com/api/v4/projects/3/merge_requests\"","When opening a merge request from a fork, POST against the fork's project id and add target_project_id set to the numeric ID of the upstream project you want to merge into.","To open the MR as a draft, prefix the title with \"Draft: \" (e.g. \"Draft: Add feature X\") when creating it — there is no boolean draft parameter on the create endpoint; draft/work_in_progress are read-only response fields derived from the title.","Optionally set description, assignee_id/assignee_ids, reviewer_ids, labels (comma-separated), remove_source_branch, squash, and milestone_id/milestone in the same request.","Docs: https://docs.gitlab.com/api/merge_requests/#create-a-merge-request"],"gotchas":["The response's work_in_progress field and the list endpoint's wip filter parameter are both deprecated (wip filter deprecated GitLab 19.0) — use draft instead.","approvals_before_merge is deprecated as a create/update parameter (GitLab 16.0) and is Premium/Ultimate only; use the merge request approvals API to configure approval rules instead.","allow_maintainer_to_push is a deprecated alias for allow_collaboration — use allow_collaboration in new integrations.","target_project_id must be the target project's numeric ID, not its path; omitting it when creating from a fork targets the fork itself instead of upstream.","The :id path parameter must be URL-encoded if using a namespaced path (%2F for /); an unencoded path returns 404."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T19:05:51.839Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T19:05:51.839Z"},"url":"https://mcp.waymark.network/r/c6d0bdf5-ba34-4751-a554-d2c835c22261"}