Skip to content

Implement create_merge_request MCP Tool and service

Proposal

Add support for new MCP tool: create_merge_request which maps to Merge requests API - Create MR

  • Add a new API mapping following our framework/annotation approach
  • Allow the following arguments from the API documentation
    • id (required) - The ID or URL-encoded path of the project
    • source_branch (required) - The source branch
    • target_branch (required) - The target branch
    • title (required) - Title of MR
    • allow_collaboration (optional) - Allow commits from members who can merge to the target branch
    • assignee_id (optional) - Assignee user ID
    • assignee_ids (optional) - The ID of the users to assign the merge request to
    • description (optional) - Description of the merge request. Limited to 1,048,576 characters
    • labels (optional) - Labels for the merge request, as a comma-separated list
    • milestone_id (optional) - The ID of a milestone to assign the merge request to
    • remove_source_branch (optional) - Flag indicating if a merge request should remove the source branch when merging
    • reviewer_ids (optional) - The ID of the users to request a review from
    • squash (optional) - Flag indicating if the merge request should squash commits when merging
    • target_project_id (optional) - The ID of the target project
route_setting :mcp, tool_name: :create_merge_request, params: [:id]
Edited by 🤖 GitLab Bot 🤖