Skip to main content
Glama

MCP GitLab Server

by Vijay-Duke

gitlab_cherry_pick_commit

Apply a specific commit to another branch for backporting fixes or selective changes. Input the commit SHA and target branch to create a new commit with the same changes.

Instructions

Apply commit to another branch Returns: New commit on target branch Use when: Backporting fixes, selective changes Creates: New commit with same changes

Example: Backport bug fix to stable

  • commit: "abc123" (fix from main)

  • branch: "stable-1.0" (apply here)

Related tools:

  • gitlab_get_commit: Find commit to pick

  • gitlab_create_merge_request: MR for picked commit

Input Schema

NameRequiredDescriptionDefault
branchYesTarget branch for commits Type: string Required: Yes Format: Existing branch name Examples: - 'main' (commit to main) - 'feature/add-login' (feature branch) - 'hotfix/security-patch' (hotfix branch) Note: Branch must exist before committing
commit_shaYesGit commit SHA Type: string Format: Abbreviated (min 7 chars) or full 40-character SHA Required: Yes Examples: - 'a1b2c3d' (short form - minimum 7 characters) - 'a1b2c3d4e5f6' (medium form) - 'e83c5163316f89bfbde7d9ab23ca2e25604af290' (full SHA) How to find: git log, GitLab UI, or MR/commit pages
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted

Input Schema (JSON Schema)

{ "properties": { "branch": { "description": "Target branch for commits\nType: string\nRequired: Yes\nFormat: Existing branch name\nExamples:\n - 'main' (commit to main)\n - 'feature/add-login' (feature branch)\n - 'hotfix/security-patch' (hotfix branch)\nNote: Branch must exist before committing", "type": "string" }, "commit_sha": { "description": "Git commit SHA\nType: string\nFormat: Abbreviated (min 7 chars) or full 40-character SHA\nRequired: Yes\nExamples:\n - 'a1b2c3d' (short form - minimum 7 characters)\n - 'a1b2c3d4e5f6' (medium form)\n - 'e83c5163316f89bfbde7d9ab23ca2e25604af290' (full SHA)\nHow to find: git log, GitLab UI, or MR/commit pages", "type": "string" }, "project_id": { "description": "Project identifier (auto-detected if not provided)\nType: integer OR string\nFormat: numeric ID or 'namespace/project'\nOptional: Yes - auto-detects from current git repository\nExamples:\n - 12345 (numeric ID)\n - 'gitlab-org/gitlab' (namespace/project path)\n - 'my-group/my-subgroup/my-project' (nested groups)\nNote: If in a git repo with GitLab remote, this can be omitted", "type": "string" } }, "required": [ "commit_sha", "branch" ], "type": "object" }

Other Tools from MCP GitLab Server

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vijay-Duke/mcp-gitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server