gitlab_create_merge_request
Create a merge request in a GitLab project by specifying source and target branches, title, description, and optional details like labels, reviewers, and related issues.
Instructions
Create merge request by GitLab REST API /projects/:id/merge_requests.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | GitLab project ID. Omit this field unless the user explicitly provided a value. When omitted, the current runtime config value is used (WORKFLOW_CODE_PROJECT_ID overrides the built-in default when configured). If the runtime config is still unset, the tool returns a missing-parameter error. Do not infer or auto-generate this value. | |
| source_branch | No | Source branch. | |
| target_branch | No | Target branch. | |
| title | No | Merge request title. | |
| description | No | Merge request description. | |
| issue_project_id | No | Optional issue project ID used to render related issue reference in MR description. Omit this field unless the user explicitly provided a value. When omitted, the current runtime config value is used (WORKFLOW_ISSUE_PROJECT_ID overrides the built-in default when configured). If the runtime config is still unset, the tool returns a missing-parameter error. Do not infer or auto-generate this value. | |
| issue_project_path | No | Optional issue project path used to render related issue reference. Omit this field unless the user explicitly provided a value. When omitted, the current runtime config value is used (WORKFLOW_ISSUE_PROJECT_PATH overrides the built-in default when configured). If the runtime config is still unset, the tool returns a missing-parameter error. Do not infer or auto-generate this value. | |
| issue_iid | No | Optional related issue IID. If provided, MR description will include related issue section. | |
| labels | No | Labels array. | |
| assignee_ids | No | Assignee user IDs. | |
| reviewer_ids | No | Reviewer user IDs. | |
| remove_source_branch | No | Remove source branch after merge. | |
| squash | No | Enable squash on merge. | |
| draft | No | Create MR as draft. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded. | |
| tool | Yes | Tool name. | |
| data | No | Created GitLab merge request payload. | |
| error_type | No | Error type when ok=false. | |
| message | No | Error message when ok=false. |