Ir al contenido

Jobs

Los jobs de un pipeline o de un proyecto: listarlos junto con sus jobs de disparo, leer uno y su log, esperar a que termine, ejecutar un job manual, reintentar, cancelar o borrar uno; descargar el archivo de artefactos de un job, un informe o un archivo de él, o el último archivo o artefacto correcto de una referencia, conservar los artefactos de un job y borrarlos de un job o de todo un proyecto.

Aquí está también el ámbito del token de job de CI/CD: qué proyectos y grupos pueden usar el token de job de este proyecto para alcanzarlo, que se lee y se cambia con las acciones job.token_scope_*.

  • “Muestra el log del job fallido del pipeline 1234”
  • “Reintenta el job 5678”
  • “Descarga los artefactos del job build en main”
  • “¿Qué proyectos pueden usar el token de job de este proyecto?”
  • Dinámica, la superficie predeterminada: llama a gitlab_execute_action con action igual al ID de la acción, como job.artifacts, y sus parámetros en params. gitlab_find_action encuentra un ID a partir de una descripción de la tarea.
  • Meta (GITLAB_MCP_TOOL_SURFACE=meta): llama a gitlab_job con action igual al nombre de la acción, como artifacts, y sus parámetros en params.
  • Individual (GITLAB_MCP_TOOL_SURFACE=individual): llama a la herramienta propia de la acción, como gitlab_job_artifacts, pasándole directamente sus parámetros.

Todos los niveles sirven el grupo completo, tanto en instancias autogestionadas como en GitLab.com.

Acciones de solo lectura: 13 de 25, las que conserva un despliegue en modo de solo lectura.

La descripción de cada acción, y la de cada uno de sus parámetros, es el texto que sirve el servidor para ella en la superficie predeterminada, citado tal cual; por eso está en inglés. Una acción destructiva solo se ejecuta una vez confirmada, salvo que GITLAB_MCP_YOLO_MODE (o AUTOPILOT) se salte ese paso: la superficie dinámica necesita confirm: true en gitlab_execute_action, y las otras dos aceptan un parámetro confirm o la pregunta del cliente (Acciones destructivas).

AcciónIndividual
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 and truncated at 1MB. Returns: size, content, and truncation flag. See also: job.download_single_artifact, job.keep_artifacts, job.get.

  • Meta-herramienta: gitlab_job, acción artifacts
  • Herramienta individual: gitlab_job_artifacts
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID whose artifacts to download
project_idstring/integersíProject 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-herramienta: gitlab_job, acción cancel
  • Herramienta individual: gitlab_job_cancel
  • Nivel: Free
  • Comportamiento: escribe, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to cancel
project_idstring/integersíProject 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-herramienta: gitlab_job, acción delete_artifacts
  • Herramienta individual: gitlab_job_delete_artifacts
  • Nivel: Free
  • Comportamiento: escribe, destructiva (necesita confirmación), idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to delete artifacts from
project_idstring/integersíProject 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-herramienta: gitlab_job, acción delete_project_artifacts
  • Herramienta individual: gitlab_job_delete_project_artifacts
  • Nivel: Free
  • Comportamiento: escribe, destructiva (necesita confirmación), idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path

Download the latest successful artifacts archive for a ref and job name. Returns: archive size, content, and truncation flag. See also: job.artifacts, job.download_single_artifact, job.get.

  • Meta-herramienta: gitlab_job, acción download_artifacts
  • Herramienta individual: gitlab_job_download_artifacts
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path
jobstringnoJob name to download artifacts from
ref_namestringnoBranch or tag name

Download one artifact file from a job by job_id and artifact_path. Returns: file size, raw content, and truncation flag. See also: job.artifacts, job.download_artifacts, job.get.

  • Meta-herramienta: gitlab_job, acción download_single_artifact
  • Herramienta individual: gitlab_job_download_single_artifact
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
artifact_pathstringsíPath to the artifact file within the archive
job_idintegersíJob ID
project_idstring/integersíProject ID or URL-encoded path

Download one artifact file from the latest successful job on a ref by name and path. Returns: file size, raw content, and truncation flag. See also: job.download_artifacts, job.download_single_artifact, job.get.

  • Meta-herramienta: gitlab_job, acción download_single_artifact_by_ref
  • Herramienta individual: gitlab_job_download_single_artifact_by_ref
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
artifact_pathstringsíPath to the artifact file within the archive
jobstringsíJob name
project_idstring/integersíProject ID or URL-encoded path
ref_namestringsíBranch 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-herramienta: gitlab_job, acción erase
  • Herramienta individual: gitlab_job_erase
  • Nivel: Free
  • Comportamiento: escribe, destructiva (necesita confirmación), idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to act on
project_idstring/integersíProject 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-herramienta: gitlab_job, acción get
  • Herramienta individual: gitlab_job_get
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to retrieve
project_idstring/integersíProject 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-herramienta: gitlab_job, acción keep_artifacts
  • Herramienta individual: gitlab_job_keep_artifacts
  • Nivel: Free
  • Comportamiento: escribe, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to act on
project_idstring/integersíProject 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-herramienta: gitlab_job, acción list
  • Herramienta individual: gitlab_job_list
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
pipeline_idintegersíPipeline ID to list jobs for
project_idstring/integersíProject 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_tokenstringnoKeyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost.
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-herramienta: gitlab_job, acción list_bridges
  • Herramienta individual: gitlab_job_list_bridges
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
pipeline_idintegersíPipeline ID to list bridge jobs for
project_idstring/integersíProject 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_tokenstringnoKeyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost.
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-herramienta: gitlab_job, acción list_project
  • Herramienta individual: gitlab_job_list_project
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject 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_tokenstringnoKeyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost.
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-herramienta: gitlab_job, acción play
  • Herramienta individual: gitlab_job_play
  • Nivel: Free
  • Comportamiento: escribe, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to run
project_idstring/integersíProject 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-herramienta: gitlab_job, acción retry
  • Herramienta individual: gitlab_job_retry
  • Nivel: Free
  • Comportamiento: escribe, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to act on
project_idstring/integersíProject 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-herramienta: gitlab_job, acción token_scope_add_group
  • Herramienta individual: gitlab_add_group_job_token_allowlist
  • Nivel: Free
  • Comportamiento: escribe, no idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path
target_group_idintegersíID 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-herramienta: gitlab_job, acción token_scope_add_project
  • Herramienta individual: gitlab_add_project_job_token_allowlist
  • Nivel: Free
  • Comportamiento: escribe, no idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path
target_project_idintegersíID 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-herramienta: gitlab_job, acción token_scope_get
  • Herramienta individual: gitlab_get_job_token_access_settings
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject 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-herramienta: gitlab_job, acción token_scope_list_groups
  • Herramienta individual: gitlab_list_job_token_group_allowlist
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject 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_tokenstringnoKeyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost.
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-herramienta: gitlab_job, acción token_scope_list_inbound
  • Herramienta individual: gitlab_list_job_token_inbound_allowlist
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject 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_tokenstringnoKeyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost.
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-herramienta: gitlab_job, acción token_scope_patch
  • Herramienta individual: gitlab_patch_job_token_access_settings
  • Nivel: Free
  • Comportamiento: escribe, idempotente
ParámetroTipoRequeridoDescripción
enabledbooleansíEnable or disable the CI/CD job token scope
project_idstring/integersíProject 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-herramienta: gitlab_job, acción token_scope_remove_group
  • Herramienta individual: gitlab_remove_group_job_token_allowlist
  • Nivel: Free
  • Comportamiento: escribe, destructiva (necesita confirmación), idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path
target_group_idintegersíID 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-herramienta: gitlab_job, acción token_scope_remove_project
  • Herramienta individual: gitlab_remove_project_job_token_allowlist
  • Nivel: Free
  • Comportamiento: escribe, destructiva (necesita confirmación), idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path
target_project_idintegersíID of the project to remove from the allowlist

Get CI job trace output. Returns: text log with truncation metadata when logs exceed limits. See also: job.get, job.retry, job.cancel.

  • Meta-herramienta: gitlab_job, acción trace
  • Herramienta individual: gitlab_job_trace
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to get trace log for
project_idstring/integersíProject ID or URL-encoded path

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-herramienta: gitlab_job, acción wait
  • Herramienta individual: gitlab_job_wait
  • Nivel: Free
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
job_idintegersíJob ID to wait for
project_idstring/integersíProject 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)