GitLab CI/CD · Capability

GitLab API — ci_jobs

GitLab API — ci_jobs. 8 operations. Lead operation: Trigger an actionable job (manual, delayed, etc). Self-contained Naftiko capability covering one Gitlab Ci business surface.

Run with Naftiko Gitlab Cici_jobs

What You Can Do

GET
Getapiv4job — Get current job using job token
/v1/api/v4/job
GET
Getapiv4projectsidjobs — Get a projects jobs
/v1/api/v4/projects/{id}/jobs
GET
Getapiv4projectsidjobsjobid — Get a specific job of a project
/v1/api/v4/projects/{id}/jobs/{job-id}
POST
Postapiv4projectsidjobsjobidcancel — Cancel a specific job of a project
/v1/api/v4/projects/{id}/jobs/{job-id}/cancel
POST
Postapiv4projectsidjobsjobiderase — Erase job (remove artifacts and the trace)
/v1/api/v4/projects/{id}/jobs/{job-id}/erase
POST
Postapiv4projectsidjobsjobidplay — Trigger an actionable job (manual, delayed, etc)
/v1/api/v4/projects/{id}/jobs/{job-id}/play
POST
Postapiv4projectsidjobsjobidretry — Retry a specific job of a project
/v1/api/v4/projects/{id}/jobs/{job-id}/retry
GET
Getapiv4projectsidjobsjobidtrace — Get a trace of a specific job of a project
/v1/api/v4/projects/{id}/jobs/{job-id}/trace

MCP Tools

get-current-job-using-job

Get current job using job token

read-only idempotent
get-projects-jobs

Get a projects jobs

read-only idempotent
get-specific-job-project

Get a specific job of a project

read-only idempotent
cancel-specific-job-project

Cancel a specific job of a project

erase-job-remove-artifacts-and

Erase job (remove artifacts and the trace)

trigger-actionable-job-manual-delayed

Trigger an actionable job (manual, delayed, etc)

retry-specific-job-project

Retry a specific job of a project

get-trace-specific-job-project

Get a trace of a specific job of a project

read-only idempotent

Capability Spec

gitlab-ci-ci-jobs.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitLab API — ci_jobs
  description: 'GitLab API — ci_jobs. 8 operations. Lead operation: Trigger an actionable job (manual, delayed, etc). Self-contained
    Naftiko capability covering one Gitlab Ci business surface.'
  tags:
  - Gitlab Ci
  - ci_jobs
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITLAB_CI_API_KEY: GITLAB_CI_API_KEY
capability:
  consumes:
  - type: http
    namespace: gitlab-ci-ci-jobs
    baseUri: https://gitlab.com
    description: GitLab API — ci_jobs business capability. Self-contained, no shared references.
    resources:
    - name: api-v4-job
      path: /api/v4/job
      operations:
      - name: getapiv4job
        method: GET
        description: Get current job using job token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v4-projects-id-jobs
      path: /api/v4/projects/{id}/jobs
      operations:
      - name: getapiv4projectsidjobs
        method: GET
        description: Get a projects jobs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID or URL-encoded path of the project
          required: true
        - name: scope
          in: query
          type: array
          description: The scope of builds to show
        - name: ref
          in: query
          type: string
          description: The branch name (ref) to filter jobs by
        - name: page
          in: query
          type: integer
          description: Current page number
        - name: per_page
          in: query
          type: integer
          description: Number of items per page
    - name: api-v4-projects-id-jobs-job_id
      path: /api/v4/projects/{id}/jobs/{job_id}
      operations:
      - name: getapiv4projectsidjobsjobid
        method: GET
        description: Get a specific job of a project
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: integer
          description: The ID of a job
          required: true
        - name: id
          in: path
          type: integer
          required: true
    - name: api-v4-projects-id-jobs-job_id-cancel
      path: /api/v4/projects/{id}/jobs/{job_id}/cancel
      operations:
      - name: postapiv4projectsidjobsjobidcancel
        method: POST
        description: Cancel a specific job of a project
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: integer
          description: The ID of a job
          required: true
        - name: id
          in: path
          type: integer
          required: true
        - name: postApiV4ProjectsIdJobsJobIdCancel
          in: body
          type: string
          required: true
    - name: api-v4-projects-id-jobs-job_id-erase
      path: /api/v4/projects/{id}/jobs/{job_id}/erase
      operations:
      - name: postapiv4projectsidjobsjobiderase
        method: POST
        description: Erase job (remove artifacts and the trace)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: integer
          description: The ID of a build
          required: true
        - name: id
          in: path
          type: integer
          required: true
    - name: api-v4-projects-id-jobs-job_id-play
      path: /api/v4/projects/{id}/jobs/{job_id}/play
      operations:
      - name: postapiv4projectsidjobsjobidplay
        method: POST
        description: Trigger an actionable job (manual, delayed, etc)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: integer
          description: The ID of a Job
          required: true
        - name: id
          in: path
          type: integer
          required: true
        - name: postApiV4ProjectsIdJobsJobIdPlay
          in: body
          type: string
          required: true
    - name: api-v4-projects-id-jobs-job_id-retry
      path: /api/v4/projects/{id}/jobs/{job_id}/retry
      operations:
      - name: postapiv4projectsidjobsjobidretry
        method: POST
        description: Retry a specific job of a project
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: integer
          description: The ID of a job
          required: true
        - name: id
          in: path
          type: integer
          required: true
        - name: postApiV4ProjectsIdJobsJobIdRetry
          in: body
          type: string
          required: true
    - name: api-v4-projects-id-jobs-job_id-trace
      path: /api/v4/projects/{id}/jobs/{job_id}/trace
      operations:
      - name: getapiv4projectsidjobsjobidtrace
        method: GET
        description: Get a trace of a specific job of a project
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: job_id
          in: path
          type: integer
          description: The ID of a job
          required: true
        - name: byte_offset
          in: query
          type: integer
          description: Byte offset to start reading from
        - name: byte_limit
          in: query
          type: integer
          description: Maximum number of bytes to return
        - name: id
          in: path
          type: integer
          required: true
  exposes:
  - type: rest
    namespace: gitlab-ci-ci-jobs-rest
    port: 8080
    description: REST adapter for GitLab API — ci_jobs. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/api/v4/job
      name: api-v4-job
      description: REST surface for api-v4-job.
      operations:
      - method: GET
        name: getapiv4job
        description: Get current job using job token
        call: gitlab-ci-ci-jobs.getapiv4job
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/jobs
      name: api-v4-projects-id-jobs
      description: REST surface for api-v4-projects-id-jobs.
      operations:
      - method: GET
        name: getapiv4projectsidjobs
        description: Get a projects jobs
        call: gitlab-ci-ci-jobs.getapiv4projectsidjobs
        with:
          id: rest.id
          scope: rest.scope
          ref: rest.ref
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/jobs/{job-id}
      name: api-v4-projects-id-jobs-job-id
      description: REST surface for api-v4-projects-id-jobs-job_id.
      operations:
      - method: GET
        name: getapiv4projectsidjobsjobid
        description: Get a specific job of a project
        call: gitlab-ci-ci-jobs.getapiv4projectsidjobsjobid
        with:
          job_id: rest.job_id
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/jobs/{job-id}/cancel
      name: api-v4-projects-id-jobs-job-id-cancel
      description: REST surface for api-v4-projects-id-jobs-job_id-cancel.
      operations:
      - method: POST
        name: postapiv4projectsidjobsjobidcancel
        description: Cancel a specific job of a project
        call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobidcancel
        with:
          job_id: rest.job_id
          id: rest.id
          postApiV4ProjectsIdJobsJobIdCancel: rest.postApiV4ProjectsIdJobsJobIdCancel
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/jobs/{job-id}/erase
      name: api-v4-projects-id-jobs-job-id-erase
      description: REST surface for api-v4-projects-id-jobs-job_id-erase.
      operations:
      - method: POST
        name: postapiv4projectsidjobsjobiderase
        description: Erase job (remove artifacts and the trace)
        call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobiderase
        with:
          job_id: rest.job_id
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/jobs/{job-id}/play
      name: api-v4-projects-id-jobs-job-id-play
      description: REST surface for api-v4-projects-id-jobs-job_id-play.
      operations:
      - method: POST
        name: postapiv4projectsidjobsjobidplay
        description: Trigger an actionable job (manual, delayed, etc)
        call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobidplay
        with:
          job_id: rest.job_id
          id: rest.id
          postApiV4ProjectsIdJobsJobIdPlay: rest.postApiV4ProjectsIdJobsJobIdPlay
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/jobs/{job-id}/retry
      name: api-v4-projects-id-jobs-job-id-retry
      description: REST surface for api-v4-projects-id-jobs-job_id-retry.
      operations:
      - method: POST
        name: postapiv4projectsidjobsjobidretry
        description: Retry a specific job of a project
        call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobidretry
        with:
          job_id: rest.job_id
          id: rest.id
          postApiV4ProjectsIdJobsJobIdRetry: rest.postApiV4ProjectsIdJobsJobIdRetry
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/jobs/{job-id}/trace
      name: api-v4-projects-id-jobs-job-id-trace
      description: REST surface for api-v4-projects-id-jobs-job_id-trace.
      operations:
      - method: GET
        name: getapiv4projectsidjobsjobidtrace
        description: Get a trace of a specific job of a project
        call: gitlab-ci-ci-jobs.getapiv4projectsidjobsjobidtrace
        with:
          job_id: rest.job_id
          byte_offset: rest.byte_offset
          byte_limit: rest.byte_limit
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gitlab-ci-ci-jobs-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitLab API — ci_jobs. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-current-job-using-job
      description: Get current job using job token
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-ci-jobs.getapiv4job
      outputParameters:
      - type: object
        mapping: $.
    - name: get-projects-jobs
      description: Get a projects jobs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-ci-jobs.getapiv4projectsidjobs
      with:
        id: tools.id
        scope: tools.scope
        ref: tools.ref
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: get-specific-job-project
      description: Get a specific job of a project
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-ci-jobs.getapiv4projectsidjobsjobid
      with:
        job_id: tools.job_id
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: cancel-specific-job-project
      description: Cancel a specific job of a project
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobidcancel
      with:
        job_id: tools.job_id
        id: tools.id
        postApiV4ProjectsIdJobsJobIdCancel: tools.postApiV4ProjectsIdJobsJobIdCancel
      outputParameters:
      - type: object
        mapping: $.
    - name: erase-job-remove-artifacts-and
      description: Erase job (remove artifacts and the trace)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobiderase
      with:
        job_id: tools.job_id
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: trigger-actionable-job-manual-delayed
      description: Trigger an actionable job (manual, delayed, etc)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobidplay
      with:
        job_id: tools.job_id
        id: tools.id
        postApiV4ProjectsIdJobsJobIdPlay: tools.postApiV4ProjectsIdJobsJobIdPlay
      outputParameters:
      - type: object
        mapping: $.
    - name: retry-specific-job-project
      description: Retry a specific job of a project
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-ci-jobs.postapiv4projectsidjobsjobidretry
      with:
        job_id: tools.job_id
        id: tools.id
        postApiV4ProjectsIdJobsJobIdRetry: tools.postApiV4ProjectsIdJobsJobIdRetry
      outputParameters:
      - type: object
        mapping: $.
    - name: get-trace-specific-job-project
      description: Get a trace of a specific job of a project
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-ci-jobs.getapiv4projectsidjobsjobidtrace
      with:
        job_id: tools.job_id
        byte_offset: tools.byte_offset
        byte_limit: tools.byte_limit
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.