Automate GitLab project management, issues, merge requests, pipelines, branches, and user operations via Rube MCP (Composio). Always search tools first for current schemas.
Add this skill
npx mdskills install sickn33/gitlab-automationComprehensive GitLab automation guide with detailed workflows, parameter docs, and common pitfalls
1---2name: gitlab-automation3description: "Automate GitLab project management, issues, merge requests, pipelines, branches, and user operations via Rube MCP (Composio). Always search tools first for current schemas."4requires:5 mcp: [rube]6---78# GitLab Automation via Rube MCP910Automate GitLab operations including project management, issue tracking, merge request workflows, CI/CD pipeline monitoring, branch management, and user administration through Composio's GitLab toolkit.1112## Prerequisites1314- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)15- Active GitLab connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `gitlab`16- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas1718## Setup1920**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.2122231. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds242. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `gitlab`253. If connection is not ACTIVE, follow the returned auth link to complete GitLab OAuth264. Confirm connection status shows ACTIVE before running any workflows2728## Core Workflows2930### 1. Manage Issues3132**When to use**: User wants to create, update, list, or search issues in a GitLab project3334**Tool sequence**:351. `GITLAB_GET_PROJECTS` - Find the target project and get its ID [Prerequisite]362. `GITLAB_LIST_PROJECT_ISSUES` - List and filter issues for a project [Required]373. `GITLAB_CREATE_PROJECT_ISSUE` - Create a new issue [Required for create]384. `GITLAB_UPDATE_PROJECT_ISSUE` - Update an existing issue (title, labels, state, assignees) [Required for update]395. `GITLAB_LIST_PROJECT_USERS` - Find user IDs for assignment [Optional]4041**Key parameters**:42- `id`: Project ID (integer) or URL-encoded path (e.g., `"my-group/my-project"`)43- `title`: Issue title (required for creation)44- `description`: Issue body text (max 1,048,576 characters)45- `labels`: Comma-separated label names (e.g., `"bug,critical"`)46- `add_labels` / `remove_labels`: Add or remove labels without replacing all47- `state`: Filter by `"all"`, `"opened"`, or `"closed"`48- `state_event`: `"close"` or `"reopen"` to change issue state49- `assignee_ids`: Array of user IDs; use `[0]` to unassign all50- `issue_iid`: Internal issue ID within the project (required for updates)51- `milestone`: Filter by milestone title52- `search`: Search in title and description53- `scope`: `"created_by_me"`, `"assigned_to_me"`, or `"all"`54- `page` / `per_page`: Pagination (default per_page: 20)5556**Pitfalls**:57- `id` accepts either integer project ID or URL-encoded path; wrong IDs yield 4xx errors58- `issue_iid` is the project-internal ID (shown as #42), different from the global issue ID59- Labels in `labels` field replace ALL existing labels; use `add_labels`/`remove_labels` for incremental changes60- Setting `assignee_ids` to empty array does NOT unassign; use `[0]` instead61- `updated_at` field requires administrator or project/group owner rights6263### 2. Manage Merge Requests6465**When to use**: User wants to list, filter, or review merge requests in a project6667**Tool sequence**:681. `GITLAB_GET_PROJECT` - Get project details and verify access [Prerequisite]692. `GITLAB_GET_PROJECT_MERGE_REQUESTS` - List and filter merge requests [Required]703. `GITLAB_GET_REPOSITORY_BRANCHES` - Verify source/target branches [Optional]714. `GITLAB_LIST_ALL_PROJECT_MEMBERS` - Find reviewers/assignees [Optional]7273**Key parameters**:74- `id`: Project ID or URL-encoded path75- `state`: `"opened"`, `"closed"`, `"locked"`, `"merged"`, or `"all"`76- `scope`: `"created_by_me"` (default), `"assigned_to_me"`, or `"all"`77- `source_branch` / `target_branch`: Filter by branch names78- `author_id` / `author_username`: Filter by MR author79- `assignee_id`: Filter by assignee (use `None` for unassigned, `Any` for assigned)80- `reviewer_id` / `reviewer_username`: Filter by reviewer81- `labels`: Comma-separated label filter82- `search`: Search in title and description83- `wip`: `"yes"` for draft MRs, `"no"` for non-draft84- `order_by`: `"created_at"` (default), `"title"`, `"merged_at"`, `"updated_at"`85- `view`: `"simple"` for minimal fields86- `iids[]`: Filter by specific MR internal IDs8788**Pitfalls**:89- Default `scope` is `"created_by_me"` which limits results; use `"all"` for complete listings90- `author_id` and `author_username` are mutually exclusive91- `reviewer_id` and `reviewer_username` are mutually exclusive92- `approved` filter requires the `mr_approved_filter` feature flag (disabled by default)93- Large MR histories can be noisy; use filters and moderate `per_page` values9495### 3. Manage Projects and Repositories9697**When to use**: User wants to list projects, create new projects, or manage branches9899**Tool sequence**:1001. `GITLAB_GET_PROJECTS` - List all accessible projects with filters [Required]1012. `GITLAB_GET_PROJECT` - Get detailed info for a specific project [Optional]1023. `GITLAB_LIST_USER_PROJECTS` - List projects owned by a specific user [Optional]1034. `GITLAB_CREATE_PROJECT` - Create a new project [Required for create]1045. `GITLAB_GET_REPOSITORY_BRANCHES` - List branches in a project [Required for branch ops]1056. `GITLAB_CREATE_REPOSITORY_BRANCH` - Create a new branch [Optional]1067. `GITLAB_GET_REPOSITORY_BRANCH` - Get details of a specific branch [Optional]1078. `GITLAB_LIST_REPOSITORY_COMMITS` - View commit history [Optional]1089. `GITLAB_GET_PROJECT_LANGUAGES` - Get language breakdown [Optional]109110**Key parameters**:111- `name` / `path`: Project name and URL-friendly path (both required for creation)112- `visibility`: `"private"`, `"internal"`, or `"public"`113- `namespace_id`: Group or user ID for project placement114- `search`: Case-insensitive substring search for projects115- `membership`: `true` to limit to projects user is a member of116- `owned`: `true` to limit to user-owned projects117- `project_id`: Project ID for branch operations118- `branch_name`: Name for new branch119- `ref`: Source branch or commit SHA for new branch creation120- `order_by`: `"id"`, `"name"`, `"path"`, `"created_at"`, `"updated_at"`, `"star_count"`, `"last_activity_at"`121122**Pitfalls**:123- `GITLAB_GET_PROJECTS` pagination is required for complete coverage; stopping at first page misses projects124- Some responses place items under `data.details`; parse the actual returned list structure125- Most follow-up calls depend on correct `project_id`; verify with `GITLAB_GET_PROJECT` first126- Invalid `branch_name`/`ref`/`sha` causes client errors; verify branch existence via `GITLAB_GET_REPOSITORY_BRANCHES` first127- Both `name` and `path` are required for `GITLAB_CREATE_PROJECT`128129### 4. Monitor CI/CD Pipelines130131**When to use**: User wants to check pipeline status, list jobs, or monitor CI/CD runs132133**Tool sequence**:1341. `GITLAB_GET_PROJECT` - Verify project access [Prerequisite]1352. `GITLAB_LIST_PROJECT_PIPELINES` - List pipelines with filters [Required]1363. `GITLAB_GET_SINGLE_PIPELINE` - Get detailed info for a specific pipeline [Optional]1374. `GITLAB_LIST_PIPELINE_JOBS` - List jobs within a pipeline [Optional]138139**Key parameters**:140- `id`: Project ID or URL-encoded path141- `status`: Filter by `"created"`, `"waiting_for_resource"`, `"preparing"`, `"pending"`, `"running"`, `"success"`, `"failed"`, `"canceled"`, `"skipped"`, `"manual"`, `"scheduled"`142- `scope`: `"running"`, `"pending"`, `"finished"`, `"branches"`, `"tags"`143- `ref`: Branch or tag name144- `sha`: Specific commit SHA145- `source`: Pipeline source (use `"parent_pipeline"` for child pipelines)146- `order_by`: `"id"` (default), `"status"`, `"ref"`, `"updated_at"`, `"user_id"`147- `created_after` / `created_before`: ISO 8601 date filters148- `pipeline_id`: Specific pipeline ID for job listing149- `include_retried`: `true` to include retried jobs (default `false`)150151**Pitfalls**:152- Large pipeline histories can be noisy; use `status`, `ref`, and date filters to narrow results153- Use moderate `per_page` values to keep output manageable154- Pipeline job `scope` accepts single status string or array of statuses155- `yaml_errors: true` returns only pipelines with invalid configurations156157### 5. Manage Users and Members158159**When to use**: User wants to find users, list project members, or check user status160161**Tool sequence**:1621. `GITLAB_GET_USERS` - Search and list GitLab users [Required]1632. `GITLAB_GET_USER` - Get details for a specific user by ID [Optional]1643. `GITLAB_GET_USERS_ID_STATUS` - Get user status message and availability [Optional]1654. `GITLAB_LIST_ALL_PROJECT_MEMBERS` - List all project members (direct + inherited) [Required for member listing]1665. `GITLAB_LIST_PROJECT_USERS` - List project users with search filter [Optional]167168**Key parameters**:169- `search`: Search by name, username, or public email170- `username`: Get specific user by username171- `active` / `blocked`: Filter by user state172- `id`: Project ID for member listing173- `query`: Filter members by name, email, or username174- `state`: Filter members by `"awaiting"` or `"active"` (Premium/Ultimate)175- `user_ids`: Filter by specific user IDs176177**Pitfalls**:178- Many user filters (admins, auditors, extern_uid, two_factor) are admin-only179- `GITLAB_LIST_ALL_PROJECT_MEMBERS` includes direct, inherited, and invited members180- User search is case-insensitive but may not match partial email domains181- Premium/Ultimate features (state filter, seat info) are not available on free plans182183## Common Patterns184185### ID Resolution186GitLab uses two identifier formats for projects:187- **Numeric ID**: Integer project ID (e.g., `123`)188- **URL-encoded path**: Namespace/project format (e.g., `"my-group%2Fmy-project"` or `"my-group/my-project"`)189- **Issue IID vs ID**: `issue_iid` is the project-internal number (#42); the global `id` is different190- **User ID**: Numeric; resolve via `GITLAB_GET_USERS` with `search` or `username`191192### Pagination193GitLab uses offset-based pagination:194- Set `page` (starting at 1) and `per_page` (1-100, default 20)195- Continue incrementing `page` until response returns fewer items than `per_page` or is empty196- Total count may be available in response headers (`X-Total`, `X-Total-Pages`)197- Always paginate to completion for accurate results198199### URL-Encoded Paths200When using project paths as identifiers:201- Forward slashes must be URL-encoded: `my-group/my-project` becomes `my-group%2Fmy-project`202- Some tools accept unencoded paths; check schema for each tool203- Prefer numeric IDs when available for reliability204205## Known Pitfalls206207### ID Formats208- Project `id` field accepts both integer and string (URL-encoded path)209- Issue `issue_iid` is project-scoped; do not confuse with global issue ID210- Pipeline IDs are project-scoped integers211- User IDs are global integers across the GitLab instance212213### Rate Limits214- GitLab has per-user rate limits (typically 300-2000 requests/minute depending on plan)215- Large pipeline/issue histories should use date and status filters to reduce result sets216- Paginate responsibly with moderate `per_page` values217218### Parameter Quirks219- `labels` field replaces ALL labels; use `add_labels`/`remove_labels` for incremental changes220- `assignee_ids: [0]` unassigns all; empty array does nothing221- `scope` defaults vary: `"created_by_me"` for MRs, `"all"` for issues222- `author_id` and `author_username` are mutually exclusive in MR filters223- Date parameters use ISO 8601 format: `"2024-01-15T10:30:00Z"`224225### Plan Restrictions226- Some features require Premium/Ultimate: `epic_id`, `weight`, `iteration_id`, `approved_by_ids`, member `state` filter227- Admin-only features: user management filters, `updated_at` override, custom attributes228- The `mr_approved_filter` feature flag is disabled by default229230## Quick Reference231232| Task | Tool Slug | Key Params |233|------|-----------|------------|234| List projects | `GITLAB_GET_PROJECTS` | `search`, `membership`, `visibility` |235| Get project details | `GITLAB_GET_PROJECT` | `id` |236| User's projects | `GITLAB_LIST_USER_PROJECTS` | `id`, `search`, `owned` |237| Create project | `GITLAB_CREATE_PROJECT` | `name`, `path`, `visibility` |238| List issues | `GITLAB_LIST_PROJECT_ISSUES` | `id`, `state`, `labels`, `search` |239| Create issue | `GITLAB_CREATE_PROJECT_ISSUE` | `id`, `title`, `description`, `labels` |240| Update issue | `GITLAB_UPDATE_PROJECT_ISSUE` | `id`, `issue_iid`, `state_event` |241| List merge requests | `GITLAB_GET_PROJECT_MERGE_REQUESTS` | `id`, `state`, `scope`, `labels` |242| List branches | `GITLAB_GET_REPOSITORY_BRANCHES` | `project_id`, `search` |243| Get branch | `GITLAB_GET_REPOSITORY_BRANCH` | `project_id`, `branch_name` |244| Create branch | `GITLAB_CREATE_REPOSITORY_BRANCH` | `project_id`, `branch_name`, `ref` |245| List commits | `GITLAB_LIST_REPOSITORY_COMMITS` | project ID, branch ref |246| Project languages | `GITLAB_GET_PROJECT_LANGUAGES` | project ID |247| List pipelines | `GITLAB_LIST_PROJECT_PIPELINES` | `id`, `status`, `ref` |248| Get pipeline | `GITLAB_GET_SINGLE_PIPELINE` | `project_id`, `pipeline_id` |249| List pipeline jobs | `GITLAB_LIST_PIPELINE_JOBS` | `id`, `pipeline_id`, `scope` |250| Search users | `GITLAB_GET_USERS` | `search`, `username`, `active` |251| Get user | `GITLAB_GET_USER` | user ID |252| User status | `GITLAB_GET_USERS_ID_STATUS` | user ID |253| List project members | `GITLAB_LIST_ALL_PROJECT_MEMBERS` | `id`, `query`, `state` |254| List project users | `GITLAB_LIST_PROJECT_USERS` | `id`, `search` |255
Full transparency — inspect the skill content before installing.