Skip to main content
Glama

Pipeline

gitlab_pipeline
Destructive

Create, retry, cancel, or delete GitLab CI/CD pipelines; manage trigger tokens, resource groups, and schedules; retrieve variables and JUnit test reports.

Instructions

Example: {"action":"cancel","params":{...}} For the params schema of any action, read the MCP resource gitlab://schema/meta/gitlab_pipeline/.

Manage GitLab CI/CD pipelines plus trigger tokens, resource groups (mutual-exclusion locks), JUnit test reports, and pipeline schedules. Delete permanently removes a pipeline and all its jobs. When to use: pipeline CRUD on a project, retry/cancel a run, fetch CI variables and JUnit test reports, manage trigger tokens, resource groups (mutual-exclusion locks), scheduled pipelines and their variables. NOT for: jobs, logs, artifacts, manual play actions (use gitlab_job), MR-specific pipelines (use gitlab_merge_request 'pipelines' / 'create_pipeline'), CI lint or includes (use gitlab_template).

Behavior:

  • Idempotent reads: list / latest / get / variables / test_report / test_report_summary / trigger_list / trigger_get / resource_group_list / resource_group_get / resource_group_upcoming_jobs / schedule_list / schedule_get / schedule_list_triggered_pipelines.

  • create / schedule_run / trigger_run start a NEW run on every call (NON-idempotent — produce a fresh pipeline_id). retry re-queues failed/canceled jobs on the existing pipeline (same pipeline_id; continue using it for subsequent get/wait calls). cancel is idempotent (no-op once final). update_metadata / trigger_update / resource_group_edit / schedule_update / schedule_edit_variable / schedule_take_ownership are idempotent (same input → same state).

  • Side effects: create / retry / schedule_run / trigger_run queue runners, consume CI minutes, may trigger downstream pipelines, deployments and webhooks. trigger_create returns a secret token visible only ONCE — store it immediately. wait blocks server-side until terminal state or timeout.

  • Destructive: delete permanently removes the pipeline and all its jobs, artifacts, logs and traces (irreversible). trigger_delete / schedule_delete / schedule_delete_variable are irreversible.

Returns:

  • list / latest / variables / test_report / test_report_summary / trigger_list / resource_group_list / resource_group_upcoming_jobs / schedule_list / schedule_list_triggered_pipelines: array(s) or aggregated payloads with pagination where applicable.

  • get / create / cancel / retry / update_metadata / wait / trigger_get / trigger_create / trigger_update / trigger_run / resource_group_get / resource_group_edit / schedule_get / schedule_create / schedule_update / schedule_run / schedule_take_ownership / schedule_create_variable / schedule_edit_variable: pipeline / trigger / resource group / schedule object.

  • delete / trigger_delete / schedule_delete / schedule_delete_variable: {success, message}. Errors: 404 (hint: pipeline_id and trigger/schedule IDs are project-scoped), 403 (hint: requires Maintainer+ to delete pipelines or manage triggers/schedules), 400 (hint: cron expressions must use 5 fields; cron_timezone must be a valid TZ name; create requires 'ref').

Param conventions: * = required. All pipeline actions need project_id*. List actions accept page, per_page.

Pipelines:

  • list: project_id*, status (success/failed/running/pending/canceled), scope, source, ref, sha, username

  • get / cancel / retry / variables / test_report / test_report_summary: project_id*, pipeline_id*

  • delete: project_id*, pipeline_id*. PERMANENTLY removes pipeline and jobs.

  • latest: project_id*, ref

  • create: project_id*, ref*, variables (array of {key, value, variable_type})

  • update_metadata: project_id*, pipeline_id*, name*

  • wait: project_id*, pipeline_id*, interval_seconds (5-60, default 10), timeout_seconds (1-3600, default 300), fail_on_error (default true)

Triggers:

  • trigger_list: project_id*

  • trigger_get / trigger_delete: project_id*, trigger_id*

  • trigger_create: project_id*, description*

  • trigger_update: project_id*, trigger_id*, description

  • trigger_run: project_id*, ref*, token*, variables (map)

Resource groups:

  • resource_group_list: project_id*

  • resource_group_get / resource_group_edit: project_id*, key*. Edit params: process_mode.

  • resource_group_upcoming_jobs: project_id*, key*

Schedules:

  • schedule_list: project_id*, scope (active/inactive)

  • schedule_get / schedule_delete / schedule_run / schedule_take_ownership: project_id*, schedule_id*

  • schedule_create: project_id*, description*, ref*, cron*, cron_timezone, active

  • schedule_update: project_id*, schedule_id*, description, ref, cron, cron_timezone, active

  • schedule_create_variable: project_id*, schedule_id*, key*, value*, variable_type (env_var/file)

  • schedule_edit_variable: project_id*, schedule_id*, key*, value*, variable_type

  • schedule_delete_variable: project_id*, schedule_id*, key*

  • schedule_list_triggered_pipelines: project_id*, schedule_id*

See also: gitlab_job (job details/logs/artifacts), gitlab_merge_request, gitlab_ci_variable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform. Pick exactly one of the values in `enum`. Each action expects its own `params` object — see the tool description for the per-action parameter list.
paramsNoAction-specific parameters as a JSON object. Required and optional fields differ per action; consult this tool's description for the chosen action. Send only the fields documented for that action — unknown keys are rejected with a validation error (only reserved meta keys like `confirm` are stripped before validation). For the JSON Schema of a specific action's `params`, read the MCP resource `gitlab://schema/meta/{tool}/{action}` (replace placeholders with the tool name and the chosen action).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
next_stepsNoOptional. Suggested follow-up actions or tool calls for the LLM, contextual to the result.
paginationNoPresent on list actions. Use `has_more` and `next_page` to paginate through results.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes beyond the annotations (destructiveHint, openWorldHint) by detailing idempotency of actions, side effects (e.g., queue runners, consume CI minutes, trigger downstream pipelines), and the irreversible nature of destructive operations. It also warns about trigger token visibility. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured into sections (Behavior, Returns, Errors, Param conventions, per-action details). It is front-loaded with a high-level example. While every sentence earns its place given the complexity, it could be slightly more concise without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 33 actions and many parameters, the description is remarkably complete: it covers behaviors, return types for each action, error hints (e.g., 404, 403, 400), param conventions, and cross-references. The presence of an output schema reduces burden, but the description still enriches context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the input schema has only two parameters (action, params), the description provides a detailed per-action parameter list (e.g., for 'list': project_id*, status, scope, etc.), clearly marking required fields with asterisks and explaining conventions. This adds significant meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Manage GitLab CI/CD pipelines plus trigger tokens, resource groups, JUnit test reports, and pipeline schedules.' It distinguishes from sibling tools like gitlab_job, gitlab_merge_request, and gitlab_template by specifying what it is NOT for, making the purpose specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides 'When to use' and 'NOT for' sections, detailing exact use cases and suggesting alternative tools (e.g., 'use gitlab_job' for job actions, 'use gitlab_merge_request' for MR-specific pipelines). This offers clear guidance on when to select this tool versus its siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/jmrplens/gitlab-mcp-server'

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