Skip to content

Jobs

The jobs of a pipeline or a project: list them and their trigger jobs, read one and its log, wait for one to finish, play a manual job, retry, cancel or erase one; download a job’s artifact archive, one report or one file of it, or the latest successful archive or file for a ref, keep a job’s artifacts, and delete them for a job or a whole project.

The CI/CD job token scope is here too: which projects and groups may use this project’s job token to reach it, read and changed with the job.token_scope_* actions.

  • “Show the log of the failed job in pipeline 1234”
  • “Retry job 5678”
  • “Download the artifacts of the build job on main”
  • “Which projects may use this project’s job token?”
  • Dynamic, the default surface: call gitlab_execute_action with action set to the action’s ID, such as job.artifacts, and its parameters in params. gitlab_find_action finds an ID from a description of the task.
  • Meta (GITLAB_MCP_TOOL_SURFACE=meta): call gitlab_job with action set to the action’s name, such as artifacts, and its parameters in params.
  • Individual (GITLAB_MCP_TOOL_SURFACE=individual): call the action’s own tool, such as gitlab_job_artifacts, with its parameters as the arguments.

Every tier serves the whole group, on self-managed instances and on GitLab.com alike.

Read-only actions: 13 of 25, the ones a deployment in read-only mode keeps. A token with read_api and not api is served 13 of the 25.

The description of each action, and of each of its parameters, is the text the server serves for it on the default surface, quoted as served. The token lines say what GitLab 19.4.1 requires of a token for the requests each action sends; on an instance with Admin Mode turned on, an action only an administrator may run also needs admin_mode. A destructive action runs only once confirmed, unless GITLAB_MCP_YOLO_MODE (or AUTOPILOT) skips that step: the dynamic surface needs confirm: true on gitlab_execute_action, and the other two take a confirm parameter or the client’s prompt (Destructive actions).

ActionIndividual
job.artifactsgitlab_job_artifacts
job.cancelgitlab_job_cancel
job.delete_artifactsgitlab_job_delete_artifacts
job.delete_project_artifactsgitlab_job_delete_project_artifacts
job.download_artifactsgitlab_job_download_artifacts
job.download_single_artifactgitlab_job_download_single_artifact
job.download_single_artifact_by_refgitlab_job_download_single_artifact_by_ref
job.erasegitlab_job_erase
job.getgitlab_job_get
job.keep_artifactsgitlab_job_keep_artifacts
job.listgitlab_job_list
job.list_bridgesgitlab_job_list_bridges
job.list_projectgitlab_job_list_project
job.playgitlab_job_play
job.retrygitlab_job_retry
job.token_scope_add_groupgitlab_add_group_job_token_allowlist
job.token_scope_add_projectgitlab_add_project_job_token_allowlist
job.token_scope_getgitlab_get_job_token_access_settings
job.token_scope_list_groupsgitlab_list_job_token_group_allowlist
job.token_scope_list_inboundgitlab_list_job_token_inbound_allowlist
job.token_scope_patchgitlab_patch_job_token_access_settings
job.token_scope_remove_groupgitlab_remove_group_job_token_allowlist
job.token_scope_remove_projectgitlab_remove_project_job_token_allowlist
job.tracegitlab_job_trace
job.waitgitlab_job_wait

Download the full artifact archive for a CI job, or one report named by file_type (GitLab 19.4 or later), base64-encoded when it is 1 MB or less. Returns: size, content, and a truncated flag set when the artifact was larger and no content came back. See also: job.download_single_artifact, job.keep_artifacts, job.get.

  • Meta-tool: gitlab_job, action artifacts
  • Individual tool: gitlab_job_artifacts
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job Artifact: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID whose artifacts to download
project_idstring/integeryesProject ID or URL-encoded path
file_typestring (archive, accessibility, api_fuzzing, browser_performance, cluster_image_scanning, cobertura, codequality, container_scanning, cyclonedx, dast, dependency_scanning, dotenv, jacoco, junit, license_scanning, load_performance, lsif, metrics, performance, requirements, requirements_v2, sarif, sast, secret_detection)noWhich of the job’s artifacts to download: archive (the default, the zip of the job’s artifacts:paths) or a report type such as junit, cobertura, sast or dotenv. GitLab reads it from 19.4, and an older instance ignores it and answers with the archive

Cancel a CI job. Set force:true to cancel jobs already in a non-cancellable state (requires GitLab v17.2+). Returns: updated job state. See also: job.get, job.retry.

  • Meta-tool: gitlab_job, action cancel
  • Individual tool: gitlab_job_cancel
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job: Update at project (permissions page)
  • Behavior: writes, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to cancel
project_idstring/integeryesProject ID or URL-encoded path
forcebooleannoForce cancel even if the job is already in a non-cancellable state

Delete the artifacts for one CI job (destructive). Returns: a success confirmation. See also: job.artifacts, job.get, job.delete_project_artifacts.

  • Meta-tool: gitlab_job, action delete_artifacts
  • Individual tool: gitlab_job_delete_artifacts
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job Artifact: Delete at project (permissions page)
  • Behavior: writes, destructive (needs confirmation), idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to delete artifacts from
project_idstring/integeryesProject ID or URL-encoded path

Delete every eligible artifact across a project (destructive, irreversible). Returns: a success confirmation. See also: job.delete_artifacts, job.list_project, job.artifacts.

  • Meta-tool: gitlab_job, action delete_project_artifacts
  • Individual tool: gitlab_job_delete_project_artifacts
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Artifact: Delete at project (permissions page)
  • Behavior: writes, destructive (needs confirmation), idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path

Download the latest successful artifacts archive for a ref and job name, base64-encoded when it is 1 MB or less. Returns: archive size, content, and a truncated flag set when the archive was larger and no content came back. See also: job.artifacts, job.download_single_artifact, job.get.

  • Meta-tool: gitlab_job, action download_artifacts
  • Individual tool: gitlab_job_download_artifacts
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job Artifact: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
jobstringyesJob name to download artifacts from, as the CI configuration names it and never its ID. To download one job’s artifacts by its job_id use job.artifacts
project_idstring/integeryesProject ID or URL-encoded path
ref_namestringyesBranch or tag name

Download one artifact file from a job by job_id and artifact_path. Returns: file size, the encoding (text, or base64 for a file that is not text), the content, and a truncated flag. See also: job.artifacts, job.download_artifacts, job.get.

  • Meta-tool: gitlab_job, action download_single_artifact
  • Individual tool: gitlab_job_download_single_artifact
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job Artifact: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
artifact_pathstringyesPath to the artifact file within the archive
job_idintegeryesJob ID
project_idstring/integeryesProject ID or URL-encoded path

Download one artifact file from the latest successful job on a ref by name and path. Returns: file size, the encoding (text, or base64 for a file that is not text), the content, and a truncated flag. See also: job.download_artifacts, job.download_single_artifact, job.get.

  • Meta-tool: gitlab_job, action download_single_artifact_by_ref
  • Individual tool: gitlab_job_download_single_artifact_by_ref
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job Artifact: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
artifact_pathstringyesPath to the artifact file within the archive
jobstringyesJob name
project_idstring/integeryesProject ID or URL-encoded path
ref_namestringyesBranch or tag name

Erase a finished CI job’s trace log and artifacts (destructive). Returns: updated job state. See also: job.get, job.trace, job.artifacts.

  • Meta-tool: gitlab_job, action erase
  • Individual tool: gitlab_job_erase
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job: Delete at project (permissions page)
  • Behavior: writes, destructive (needs confirmation), idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to act on
project_idstring/integeryesProject ID or URL-encoded path

Get one CI job. Returns: status, stage, ref, embedded commit/pipeline/project/runner/user objects, timing fields, and failure metadata. See also: job.trace, job.cancel, job.retry.

  • Meta-tool: gitlab_job, action get
  • Individual tool: gitlab_job_get
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to retrieve
project_idstring/integeryesProject ID or URL-encoded path

Keep a CI job’s artifacts by clearing their expiration. Returns: updated job state. See also: job.artifacts, job.get, job.download_artifacts.

  • Meta-tool: gitlab_job, action keep_artifacts
  • Individual tool: gitlab_job_keep_artifacts
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job Artifact: Update at project (permissions page)
  • Behavior: writes, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to act on
project_idstring/integeryesProject ID or URL-encoded path

List CI jobs for one pipeline with status filters, keyset pagination, and ordering. Returns: job summaries with status, stage, ref, and pipeline association. See also: job.get, job.trace, pipeline.get.

  • Meta-tool: gitlab_job, action list
  • Individual tool: gitlab_job_list
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Pipeline: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
pipeline_idintegeryesPipeline ID to list jobs for
project_idstring/integeryesProject ID or URL-encoded path
include_retriedbooleannoInclude retried jobs in the response
order_bystringnoColumn to order keyset-paginated results by
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
page_tokenstringnoNext page of a keyset listing: the next_page_token of the previous response of this action, passed back unchanged. It carries the position and every filter of the listing as GitLab read them, and those are what the next page is asked with, whatever filters are sent beside it. Leave it empty for the first page.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost, and a keyset page names the next one in next_page_token rather than next_page.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
scopestring[]noFilter by job status: created, pending, preparing, waiting_for_resource, waiting_for_callback, running, success, failed, canceled, canceling, skipped, manual, scheduled
sortstring (asc, desc)noSort order for keyset pagination: asc or desc

List CI bridge (trigger) jobs for one pipeline with keyset pagination. Returns: bridge summaries with status and downstream pipeline references. See also: job.list, pipeline.get, job.get.

  • Meta-tool: gitlab_job, action list_bridges
  • Individual tool: gitlab_job_list_bridges
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Pipeline: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
pipeline_idintegeryesPipeline ID to list bridge jobs for
project_idstring/integeryesProject ID or URL-encoded path
include_retriedbooleannoInclude retried bridge jobs in the response
order_bystringnoColumn to order keyset-paginated results by
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
page_tokenstringnoNext page of a keyset listing: the next_page_token of the previous response of this action, passed back unchanged. It carries the position and every filter of the listing as GitLab read them, and those are what the next page is asked with, whatever filters are sent beside it. Leave it empty for the first page.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost, and a keyset page names the next one in next_page_token rather than next_page.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
scopestring[]noFilter by job status: created, pending, preparing, waiting_for_resource, waiting_for_callback, running, success, failed, canceled, canceling, skipped, manual, scheduled
sortstring (asc, desc)noSort order for keyset pagination: asc or desc

List CI jobs in one project with filters, keyset pagination, and ordering. Returns: job summaries, status, stage, ref, and pipeline associations. See also: job.get, job.trace, pipeline.get.

  • Meta-tool: gitlab_job, action list_project
  • Individual tool: gitlab_job_list_project
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path
include_retriedbooleannoInclude retried jobs in the response
order_bystringnoColumn to order keyset-paginated results by
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
page_tokenstringnoNext page of a keyset listing: the next_page_token of the previous response of this action, passed back unchanged. It carries the position and every filter of the listing as GitLab read them, and those are what the next page is asked with, whatever filters are sent beside it. Leave it empty for the first page.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost, and a keyset page names the next one in next_page_token rather than next_page.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
scopestring[]noFilter by job status: created, pending, preparing, waiting_for_resource, waiting_for_callback, running, success, failed, canceled, canceling, skipped, manual, scheduled
sortstring (asc, desc)noSort order for keyset pagination: asc or desc

Run a manual CI job with optional variable overrides. Returns: the started job state. See also: job.get, job.retry, job.trace.

  • Meta-tool: gitlab_job, action play
  • Individual tool: gitlab_job_play
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job: Run at project (permissions page)
  • Behavior: writes, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to run
project_idstring/integeryesProject ID or URL-encoded path
job_inputsobjectnoJob input parameters keyed by input name. Values may be string, number, boolean, or array of strings, matching the inputs declared in .gitlab-ci.yml spec:inputs.
job_variables_attributesobject[]noJob variables to inject into the manual job run

Retry a failed or canceled CI job. Returns: the newly created job state. See also: job.get, job.trace, job.cancel.

  • Meta-tool: gitlab_job, action retry
  • Individual tool: gitlab_job_retry
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job: Run at project (permissions page)
  • Behavior: writes, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to act on
project_idstring/integeryesProject ID or URL-encoded path

Add a group to a project’s CI/CD job token allowlist. Returns: the new allowlist entry with source project ID and target group ID. See also: job.token_scope_list_groups, job.token_scope_remove_group, job.token_scope_add_project.

  • Meta-tool: gitlab_job, action token_scope_add_group
  • Individual tool: gitlab_add_group_job_token_allowlist
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job Token Scope Allowlist: Create at project (permissions page)
  • Behavior: writes, not idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path
target_group_idintegeryesID of the group to add to the allowlist

Add a project to a project’s CI/CD job token inbound allowlist. Returns: the new allowlist entry with source and target project IDs. See also: job.token_scope_list_inbound, job.token_scope_remove_project, job.token_scope_add_group.

  • Meta-tool: gitlab_job, action token_scope_add_project
  • Individual tool: gitlab_add_project_job_token_allowlist
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job Token Scope Allowlist: Create at project (permissions page)
  • Behavior: writes, not idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path
target_project_idintegeryesID of the project to add to the allowlist

Get a project’s CI/CD job token access settings. Returns: whether inbound job token access is limited to the allowlist, and the deprecated outbound scope flag. See also: job.token_scope_patch, job.token_scope_list_inbound, job.token_scope_list_groups.

  • Meta-tool: gitlab_job, action token_scope_get
  • Individual tool: gitlab_get_job_token_access_settings
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job Token Scope: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path

List groups on a project’s CI/CD job token allowlist. Returns: allowlisted groups with id, name and web URL plus pagination metadata. See also: job.token_scope_add_group, job.token_scope_remove_group, job.token_scope_get.

  • Meta-tool: gitlab_job, action token_scope_list_groups
  • Individual tool: gitlab_list_job_token_group_allowlist
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job Token Scope Allowlist: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path
order_bystringnoColumn to order keyset-paginated results by (e.g. id). Only applies when pagination=‘keyset’.
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
page_tokenstringnoNext page of a keyset listing: the next_page_token of the previous response of this action, passed back unchanged. It carries the position and every filter of the listing as GitLab read them, and those are what the next page is asked with, whatever filters are sent beside it. Leave it empty for the first page.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost, and a keyset page names the next one in next_page_token rather than next_page.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
sortstring (asc, desc)noSort direction for keyset-paginated results: asc or desc. Only applies when pagination=‘keyset’.

List projects on a project’s CI/CD job token inbound allowlist. Returns: allowlisted projects with their names, paths, description, visibility, web and clone URLs, topics, counts and namespace, plus pagination metadata. See also: job.token_scope_add_project, job.token_scope_remove_project, job.token_scope_get.

  • Meta-tool: gitlab_job, action token_scope_list_inbound
  • Individual tool: gitlab_list_job_token_inbound_allowlist
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job Token Scope Allowlist: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path
order_bystringnoColumn to order keyset-paginated results by (e.g. id). Only applies when pagination=‘keyset’.
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
page_tokenstringnoNext page of a keyset listing: the next_page_token of the previous response of this action, passed back unchanged. It carries the position and every filter of the listing as GitLab read them, and those are what the next page is asked with, whatever filters are sent beside it. Leave it empty for the first page.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost, and a keyset page names the next one in next_page_token rather than next_page.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
sortstring (asc, desc)noSort direction for keyset-paginated results: asc or desc. Only applies when pagination=‘keyset’.

Update a project’s CI/CD job token access settings. Returns: a confirmation that the inbound scope setting was updated. See also: job.token_scope_get, job.token_scope_add_project, job.token_scope_add_group.

  • Meta-tool: gitlab_job, action token_scope_patch
  • Individual tool: gitlab_patch_job_token_access_settings
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job Token Scope: Update at project (permissions page)
  • Behavior: writes, idempotent
ParameterTypeMandatoryDescription
enabledbooleanyesEnable or disable the CI/CD job token scope
project_idstring/integeryesProject ID or URL-encoded path

Remove a group from a project’s CI/CD job token allowlist. Returns: a success confirmation naming the removed group. See also: job.token_scope_list_groups, job.token_scope_add_group, job.token_scope_remove_project.

  • Meta-tool: gitlab_job, action token_scope_remove_group
  • Individual tool: gitlab_remove_group_job_token_allowlist
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job Token Scope Allowlist: Delete at project (permissions page)
  • Behavior: writes, destructive (needs confirmation), idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path
target_group_idintegeryesID of the group to remove from the allowlist

Remove a project from a project’s CI/CD job token inbound allowlist. Returns: a success confirmation naming the removed project. See also: job.token_scope_list_inbound, job.token_scope_add_project, job.token_scope_remove_group.

  • Meta-tool: gitlab_job, action token_scope_remove_project
  • Individual tool: gitlab_remove_project_job_token_allowlist
  • Tier: Free
  • Classic or OAuth token: api
  • Fine-grained token: Job Token Scope Allowlist: Delete at project (permissions page)
  • Behavior: writes, destructive (needs confirmation), idempotent
ParameterTypeMandatoryDescription
project_idstring/integeryesProject ID or URL-encoded path
target_project_idintegeryesID of the project to remove from the allowlist

Get CI job trace output, the end of it when it is over 100 KB. Returns: the log text, a truncated flag and the bytes left out of its beginning. See also: job.get, job.retry, job.cancel.

  • Meta-tool: gitlab_job, action trace
  • Individual tool: gitlab_job_trace
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to get trace log for
project_idstring/integeryesProject ID or URL-encoded path
tail_linesintegernoReturn only the last N lines of the log, 1 to 10000. Either way at most the last 100 KB of the log is returned

Wait for a CI job to finish, polling until terminal state or timeout. Returns: final job snapshot, wait duration, poll count, and timed-out flag. See also: job.get, job.trace, job.retry.

  • Meta-tool: gitlab_job, action wait
  • Individual tool: gitlab_job_wait
  • Tier: Free
  • Classic or OAuth token: read_api (or api)
  • Fine-grained token: Job: Read at project (permissions page)
  • Behavior: read-only, idempotent
ParameterTypeMandatoryDescription
job_idintegeryesJob ID to wait for
project_idstring/integeryesProject ID or URL-encoded path
fail_on_errorbooleannoReturn isError when job ends in failed/canceled status (default true)
interval_secondsintegernoPolling interval in seconds (5-60, default 10)
timeout_secondsintegernoMaximum wait time in seconds (1-3600, default 300)