Skip to main content
Glama

MCP GitLab Server

by Vijay-Duke

gitlab_batch_operations

Execute complex GitLab workflows atomically with batch operations. Enables chaining tasks like branch creation, file additions, and merge requests, ensuring all steps succeed or rollback automatically. Use for dependent, multi-step project changes.

Instructions

Execute multiple operations atomically Returns: Results of all operations or rollback Use when: Complex multi-step workflows Feature: Reference previous operation results

Key benefits:

  • All-or-nothing execution

  • Operation chaining

  • Automatic rollback

  • Result references: {{op1.field}}

Example workflow:

  1. Create branch

  2. Add files

  3. Create MR All succeed or all rolled back

Related tools:

  • Individual operation tools

  • gitlab_safe_preview_commit: Test first

Input Schema

NameRequiredDescriptionDefault
operationsYesBatch operations list Type: array of objects Required: Yes Structure: { "name": "string (operation identifier)", "tool": "string (GitLab tool name)", "arguments": "object (tool-specific arguments)" } Features: - Sequential execution - Result referencing: {{operation_name.field}} - Automatic rollback on failure Examples: [ { "name": "create_branch", "tool": "gitlab_create_branch", "arguments": { "branch": "feature/new-feature", "ref": "main" } }, { "name": "create_file", "tool": "gitlab_create_commit", "arguments": { "branch": "{{create_branch.name}}", "commit_message": "Add new feature", "actions": [{ "action": "create", "file_path": "feature.py", "content": "# New feature" }] } }, { "name": "create_mr", "tool": "gitlab_create_merge_request", "arguments": { "source_branch": "{{create_branch.name}}", "target_branch": "main", "title": "Add new feature" } } ] Use cases: - Complex workflows - Dependent operations - Atomic multi-step changes
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
stop_on_errorNoError handling strategy Type: boolean Default: true Options: - true: Stop and rollback on first error - false: Continue, collect all errors Use cases: - true: Critical operations requiring all-or-nothing - false: Best-effort batch processing

Input Schema (JSON Schema)

{ "properties": { "operations": { "description": "Batch operations list\nType: array of objects\nRequired: Yes\nStructure:\n{\n \"name\": \"string (operation identifier)\",\n \"tool\": \"string (GitLab tool name)\",\n \"arguments\": \"object (tool-specific arguments)\"\n}\n\nFeatures:\n- Sequential execution\n- Result referencing: {{operation_name.field}}\n- Automatic rollback on failure\n\nExamples:\n[\n {\n \"name\": \"create_branch\",\n \"tool\": \"gitlab_create_branch\",\n \"arguments\": {\n \"branch\": \"feature/new-feature\",\n \"ref\": \"main\"\n }\n },\n {\n \"name\": \"create_file\",\n \"tool\": \"gitlab_create_commit\",\n \"arguments\": {\n \"branch\": \"{{create_branch.name}}\",\n \"commit_message\": \"Add new feature\",\n \"actions\": [{\n \"action\": \"create\",\n \"file_path\": \"feature.py\",\n \"content\": \"# New feature\"\n }]\n }\n },\n {\n \"name\": \"create_mr\",\n \"tool\": \"gitlab_create_merge_request\",\n \"arguments\": {\n \"source_branch\": \"{{create_branch.name}}\",\n \"target_branch\": \"main\",\n \"title\": \"Add new feature\"\n }\n }\n]\n\nUse cases:\n- Complex workflows\n- Dependent operations\n- Atomic multi-step changes", "items": { "properties": { "arguments": { "description": "Arguments for the tool", "type": "object" }, "name": { "description": "Operation name for reference", "type": "string" }, "tool": { "description": "GitLab tool name to execute", "type": "string" } }, "required": [ "name", "tool", "arguments" ], "type": "object" }, "type": "array" }, "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" }, "stop_on_error": { "default": true, "description": "Error handling strategy\nType: boolean\nDefault: true\nOptions:\n - true: Stop and rollback on first error\n - false: Continue, collect all errors\nUse cases:\n - true: Critical operations requiring all-or-nothing\n - false: Best-effort batch processing", "type": "boolean" } }, "required": [ "operations" ], "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