gitlab_create_merge_request
Creates a GitLab merge request from a source branch into a target branch in a specified project; check existing requests first to avoid duplicates.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source_branch": "<source_branch>",
"project_path": "<project_path>"
},
"name": "gitlab_create_merge_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | MR title. Auto-generated if omitted. | |
| labels | No | Labels to apply. | |
| description | No | MR description (markdown supported). | |
| project_path | Yes | GitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted. | |
| source_branch | Yes | Source branch. | |
| target_branch | No | Target branch (default 'master'). | master |
| remove_source_branch | No | Delete source branch after merge. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iid | No | ||
| hint | No | ||
| state | No | ||
| title | No | ||
| status | No | ||
| web_url | No | ||
| merge_status | No | ||
| has_conflicts | No | ||
| source_branch | No | ||
| target_branch | No |