gitlab_create_merge_request
Create a new merge request to integrate code changes from a source branch into a target branch in GitLab projects.
Instructions
Create a merge request from source_branch into target_branch.
Not idempotent: creates a new MR each call. Check existing MRs first
via gitlab_list_merge_requests if you want to avoid duplicates.
Examples:
- "Open an MR from feature/login to master" → source_branch='feature/login'
- "Open a WIP MR with a label" → title='Draft: ...', labels=['wip']
- Don't use to merge an already-open MR — use gitlab_merge_mr.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_branch | Yes | Source branch. | |
| target_branch | No | Target branch (default 'master'). | master |
| title | No | MR title. Auto-generated if omitted. | |
| description | No | MR description (markdown supported). | |
| labels | No | Labels to apply. | |
| remove_source_branch | No | Delete source branch after merge. | |
| project_path | No | GitLab project path (e.g. 'my-org/my-repo'). When omitted, the default from GITLAB_PROJECT_PATH env var is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iid | No | ||
| title | No | ||
| state | No | ||
| source_branch | No | ||
| target_branch | No | ||
| merge_status | No | ||
| has_conflicts | No | ||
| web_url | No | ||
| status | No | ||
| hint | No |