GitLab CI/CD · Capability

GitLab API — clusters

GitLab API — clusters. 16 operations. Lead operation: List instance clusters. Self-contained Naftiko capability covering one Gitlab Ci business surface.

Run with Naftiko Gitlab Ciclusters

What You Can Do

GET
Getapiv4adminclusters — List instance clusters
/v1/api/v4/admin/clusters
POST
Postapiv4adminclustersadd — Add existing instance cluster
/v1/api/v4/admin/clusters/add
GET
Getapiv4adminclustersclusterid — Get a single instance cluster
/v1/api/v4/admin/clusters/{cluster-id}
PUT
Putapiv4adminclustersclusterid — Edit instance cluster
/v1/api/v4/admin/clusters/{cluster-id}
DELETE
Deleteapiv4adminclustersclusterid — Delete instance cluster
/v1/api/v4/admin/clusters/{cluster-id}
GET
Getapiv4discovercertbasedclusters — Discover all descendant certificate-based clusters in a group
/v1/api/v4/discover-cert-based-clusters
GET
Getapiv4groupsidclusters — List group clusters
/v1/api/v4/groups/{id}/clusters
POST
Postapiv4groupsidclustersuser — Add existing cluster to group
/v1/api/v4/groups/{id}/clusters/user
GET
Getapiv4groupsidclustersclusterid — Get a single group cluster
/v1/api/v4/groups/{id}/clusters/{cluster-id}
PUT
Putapiv4groupsidclustersclusterid — Edit group cluster
/v1/api/v4/groups/{id}/clusters/{cluster-id}
DELETE
Deleteapiv4groupsidclustersclusterid — Delete group cluster
/v1/api/v4/groups/{id}/clusters/{cluster-id}
GET
Getapiv4projectsidclusters — List project clusters
/v1/api/v4/projects/{id}/clusters
POST
Postapiv4projectsidclustersuser — Add existing cluster to project
/v1/api/v4/projects/{id}/clusters/user
GET
Getapiv4projectsidclustersclusterid — Get a single project cluster
/v1/api/v4/projects/{id}/clusters/{cluster-id}
PUT
Putapiv4projectsidclustersclusterid — Edit project cluster
/v1/api/v4/projects/{id}/clusters/{cluster-id}
DELETE
Deleteapiv4projectsidclustersclusterid — Delete project cluster
/v1/api/v4/projects/{id}/clusters/{cluster-id}

MCP Tools

list-instance-clusters

List instance clusters

read-only idempotent
add-existing-instance-cluster

Add existing instance cluster

get-single-instance-cluster

Get a single instance cluster

read-only idempotent
edit-instance-cluster

Edit instance cluster

idempotent
delete-instance-cluster

Delete instance cluster

idempotent
discover-all-descendant-certificate-based

Discover all descendant certificate-based clusters in a group

read-only idempotent
list-group-clusters

List group clusters

read-only idempotent
add-existing-cluster-group

Add existing cluster to group

get-single-group-cluster

Get a single group cluster

read-only idempotent
edit-group-cluster

Edit group cluster

idempotent
delete-group-cluster

Delete group cluster

idempotent
list-project-clusters

List project clusters

read-only idempotent
add-existing-cluster-project

Add existing cluster to project

get-single-project-cluster

Get a single project cluster

read-only idempotent
edit-project-cluster

Edit project cluster

idempotent
delete-project-cluster

Delete project cluster

idempotent

Capability Spec

gitlab-ci-clusters.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitLab API — clusters
  description: 'GitLab API — clusters. 16 operations. Lead operation: List instance clusters. Self-contained Naftiko capability
    covering one Gitlab Ci business surface.'
  tags:
  - Gitlab Ci
  - clusters
  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-clusters
    baseUri: https://gitlab.com
    description: GitLab API — clusters business capability. Self-contained, no shared references.
    resources:
    - name: api-v4-admin-clusters
      path: /api/v4/admin/clusters
      operations:
      - name: getapiv4adminclusters
        method: GET
        description: List instance clusters
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v4-admin-clusters-add
      path: /api/v4/admin/clusters/add
      operations:
      - name: postapiv4adminclustersadd
        method: POST
        description: Add existing instance cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: postApiV4AdminClustersAdd
          in: body
          type: string
          required: true
    - name: api-v4-admin-clusters-cluster_id
      path: /api/v4/admin/clusters/{cluster_id}
      operations:
      - name: getapiv4adminclustersclusterid
        method: GET
        description: Get a single instance cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cluster_id
          in: path
          type: integer
          description: The cluster ID
          required: true
      - name: putapiv4adminclustersclusterid
        method: PUT
        description: Edit instance cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cluster_id
          in: path
          type: integer
          description: The cluster ID
          required: true
        - name: putApiV4AdminClustersClusterId
          in: body
          type: string
          required: true
      - name: deleteapiv4adminclustersclusterid
        method: DELETE
        description: Delete instance cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cluster_id
          in: path
          type: integer
          description: The cluster ID
          required: true
    - name: api-v4-discover-cert-based-clusters
      path: /api/v4/discover-cert-based-clusters
      operations:
      - name: getapiv4discovercertbasedclusters
        method: GET
        description: Discover all descendant certificate-based clusters in a group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: group_id
          in: query
          type: integer
          description: The group ID to find all certificate-based clusters in the hierarchy
          required: true
    - name: api-v4-groups-id-clusters
      path: /api/v4/groups/{id}/clusters
      operations:
      - name: getapiv4groupsidclusters
        method: GET
        description: List group clusters
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the group
          required: true
        - 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-groups-id-clusters-user
      path: /api/v4/groups/{id}/clusters/user
      operations:
      - name: postapiv4groupsidclustersuser
        method: POST
        description: Add existing cluster to group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the group
          required: true
        - name: postApiV4GroupsIdClustersUser
          in: body
          type: string
          required: true
    - name: api-v4-groups-id-clusters-cluster_id
      path: /api/v4/groups/{id}/clusters/{cluster_id}
      operations:
      - name: getapiv4groupsidclustersclusterid
        method: GET
        description: Get a single group cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the group
          required: true
        - name: cluster_id
          in: path
          type: integer
          description: The cluster ID
          required: true
      - name: putapiv4groupsidclustersclusterid
        method: PUT
        description: Edit group cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the group
          required: true
        - name: cluster_id
          in: path
          type: integer
          description: The cluster ID
          required: true
        - name: putApiV4GroupsIdClustersClusterId
          in: body
          type: string
          required: true
      - name: deleteapiv4groupsidclustersclusterid
        method: DELETE
        description: Delete group cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the group
          required: true
        - name: cluster_id
          in: path
          type: integer
          description: The Cluster ID
          required: true
    - name: api-v4-projects-id-clusters
      path: /api/v4/projects/{id}/clusters
      operations:
      - name: getapiv4projectsidclusters
        method: GET
        description: List project clusters
        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: 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-clusters-user
      path: /api/v4/projects/{id}/clusters/user
      operations:
      - name: postapiv4projectsidclustersuser
        method: POST
        description: Add existing cluster to project
        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: postApiV4ProjectsIdClustersUser
          in: body
          type: string
          required: true
    - name: api-v4-projects-id-clusters-cluster_id
      path: /api/v4/projects/{id}/clusters/{cluster_id}
      operations:
      - name: getapiv4projectsidclustersclusterid
        method: GET
        description: Get a single project cluster
        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: cluster_id
          in: path
          type: integer
          description: The cluster ID
          required: true
      - name: putapiv4projectsidclustersclusterid
        method: PUT
        description: Edit project cluster
        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: cluster_id
          in: path
          type: integer
          description: The cluster ID
          required: true
        - name: putApiV4ProjectsIdClustersClusterId
          in: body
          type: string
          required: true
      - name: deleteapiv4projectsidclustersclusterid
        method: DELETE
        description: Delete project cluster
        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: cluster_id
          in: path
          type: integer
          description: The Cluster ID
          required: true
  exposes:
  - type: rest
    namespace: gitlab-ci-clusters-rest
    port: 8080
    description: REST adapter for GitLab API — clusters. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/v4/admin/clusters
      name: api-v4-admin-clusters
      description: REST surface for api-v4-admin-clusters.
      operations:
      - method: GET
        name: getapiv4adminclusters
        description: List instance clusters
        call: gitlab-ci-clusters.getapiv4adminclusters
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/admin/clusters/add
      name: api-v4-admin-clusters-add
      description: REST surface for api-v4-admin-clusters-add.
      operations:
      - method: POST
        name: postapiv4adminclustersadd
        description: Add existing instance cluster
        call: gitlab-ci-clusters.postapiv4adminclustersadd
        with:
          postApiV4AdminClustersAdd: rest.postApiV4AdminClustersAdd
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/admin/clusters/{cluster-id}
      name: api-v4-admin-clusters-cluster-id
      description: REST surface for api-v4-admin-clusters-cluster_id.
      operations:
      - method: GET
        name: getapiv4adminclustersclusterid
        description: Get a single instance cluster
        call: gitlab-ci-clusters.getapiv4adminclustersclusterid
        with:
          cluster_id: rest.cluster_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putapiv4adminclustersclusterid
        description: Edit instance cluster
        call: gitlab-ci-clusters.putapiv4adminclustersclusterid
        with:
          cluster_id: rest.cluster_id
          putApiV4AdminClustersClusterId: rest.putApiV4AdminClustersClusterId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapiv4adminclustersclusterid
        description: Delete instance cluster
        call: gitlab-ci-clusters.deleteapiv4adminclustersclusterid
        with:
          cluster_id: rest.cluster_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/discover-cert-based-clusters
      name: api-v4-discover-cert-based-clusters
      description: REST surface for api-v4-discover-cert-based-clusters.
      operations:
      - method: GET
        name: getapiv4discovercertbasedclusters
        description: Discover all descendant certificate-based clusters in a group
        call: gitlab-ci-clusters.getapiv4discovercertbasedclusters
        with:
          group_id: rest.group_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/groups/{id}/clusters
      name: api-v4-groups-id-clusters
      description: REST surface for api-v4-groups-id-clusters.
      operations:
      - method: GET
        name: getapiv4groupsidclusters
        description: List group clusters
        call: gitlab-ci-clusters.getapiv4groupsidclusters
        with:
          id: rest.id
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/groups/{id}/clusters/user
      name: api-v4-groups-id-clusters-user
      description: REST surface for api-v4-groups-id-clusters-user.
      operations:
      - method: POST
        name: postapiv4groupsidclustersuser
        description: Add existing cluster to group
        call: gitlab-ci-clusters.postapiv4groupsidclustersuser
        with:
          id: rest.id
          postApiV4GroupsIdClustersUser: rest.postApiV4GroupsIdClustersUser
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/groups/{id}/clusters/{cluster-id}
      name: api-v4-groups-id-clusters-cluster-id
      description: REST surface for api-v4-groups-id-clusters-cluster_id.
      operations:
      - method: GET
        name: getapiv4groupsidclustersclusterid
        description: Get a single group cluster
        call: gitlab-ci-clusters.getapiv4groupsidclustersclusterid
        with:
          id: rest.id
          cluster_id: rest.cluster_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putapiv4groupsidclustersclusterid
        description: Edit group cluster
        call: gitlab-ci-clusters.putapiv4groupsidclustersclusterid
        with:
          id: rest.id
          cluster_id: rest.cluster_id
          putApiV4GroupsIdClustersClusterId: rest.putApiV4GroupsIdClustersClusterId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapiv4groupsidclustersclusterid
        description: Delete group cluster
        call: gitlab-ci-clusters.deleteapiv4groupsidclustersclusterid
        with:
          id: rest.id
          cluster_id: rest.cluster_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/clusters
      name: api-v4-projects-id-clusters
      description: REST surface for api-v4-projects-id-clusters.
      operations:
      - method: GET
        name: getapiv4projectsidclusters
        description: List project clusters
        call: gitlab-ci-clusters.getapiv4projectsidclusters
        with:
          id: rest.id
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/clusters/user
      name: api-v4-projects-id-clusters-user
      description: REST surface for api-v4-projects-id-clusters-user.
      operations:
      - method: POST
        name: postapiv4projectsidclustersuser
        description: Add existing cluster to project
        call: gitlab-ci-clusters.postapiv4projectsidclustersuser
        with:
          id: rest.id
          postApiV4ProjectsIdClustersUser: rest.postApiV4ProjectsIdClustersUser
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/projects/{id}/clusters/{cluster-id}
      name: api-v4-projects-id-clusters-cluster-id
      description: REST surface for api-v4-projects-id-clusters-cluster_id.
      operations:
      - method: GET
        name: getapiv4projectsidclustersclusterid
        description: Get a single project cluster
        call: gitlab-ci-clusters.getapiv4projectsidclustersclusterid
        with:
          id: rest.id
          cluster_id: rest.cluster_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putapiv4projectsidclustersclusterid
        description: Edit project cluster
        call: gitlab-ci-clusters.putapiv4projectsidclustersclusterid
        with:
          id: rest.id
          cluster_id: rest.cluster_id
          putApiV4ProjectsIdClustersClusterId: rest.putApiV4ProjectsIdClustersClusterId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapiv4projectsidclustersclusterid
        description: Delete project cluster
        call: gitlab-ci-clusters.deleteapiv4projectsidclustersclusterid
        with:
          id: rest.id
          cluster_id: rest.cluster_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gitlab-ci-clusters-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitLab API — clusters. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-instance-clusters
      description: List instance clusters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.getapiv4adminclusters
      outputParameters:
      - type: object
        mapping: $.
    - name: add-existing-instance-cluster
      description: Add existing instance cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-clusters.postapiv4adminclustersadd
      with:
        postApiV4AdminClustersAdd: tools.postApiV4AdminClustersAdd
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-instance-cluster
      description: Get a single instance cluster
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.getapiv4adminclustersclusterid
      with:
        cluster_id: tools.cluster_id
      outputParameters:
      - type: object
        mapping: $.
    - name: edit-instance-cluster
      description: Edit instance cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.putapiv4adminclustersclusterid
      with:
        cluster_id: tools.cluster_id
        putApiV4AdminClustersClusterId: tools.putApiV4AdminClustersClusterId
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-instance-cluster
      description: Delete instance cluster
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gitlab-ci-clusters.deleteapiv4adminclustersclusterid
      with:
        cluster_id: tools.cluster_id
      outputParameters:
      - type: object
        mapping: $.
    - name: discover-all-descendant-certificate-based
      description: Discover all descendant certificate-based clusters in a group
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.getapiv4discovercertbasedclusters
      with:
        group_id: tools.group_id
      outputParameters:
      - type: object
        mapping: $.
    - name: list-group-clusters
      description: List group clusters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.getapiv4groupsidclusters
      with:
        id: tools.id
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: add-existing-cluster-group
      description: Add existing cluster to group
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-clusters.postapiv4groupsidclustersuser
      with:
        id: tools.id
        postApiV4GroupsIdClustersUser: tools.postApiV4GroupsIdClustersUser
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-group-cluster
      description: Get a single group cluster
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.getapiv4groupsidclustersclusterid
      with:
        id: tools.id
        cluster_id: tools.cluster_id
      outputParameters:
      - type: object
        mapping: $.
    - name: edit-group-cluster
      description: Edit group cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.putapiv4groupsidclustersclusterid
      with:
        id: tools.id
        cluster_id: tools.cluster_id
        putApiV4GroupsIdClustersClusterId: tools.putApiV4GroupsIdClustersClusterId
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-group-cluster
      description: Delete group cluster
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gitlab-ci-clusters.deleteapiv4groupsidclustersclusterid
      with:
        id: tools.id
        cluster_id: tools.cluster_id
      outputParameters:
      - type: object
        mapping: $.
    - name: list-project-clusters
      description: List project clusters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.getapiv4projectsidclusters
      with:
        id: tools.id
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: add-existing-cluster-project
      description: Add existing cluster to project
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-clusters.postapiv4projectsidclustersuser
      with:
        id: tools.id
        postApiV4ProjectsIdClustersUser: tools.postApiV4ProjectsIdClustersUser
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-project-cluster
      description: Get a single project cluster
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.getapiv4projectsidclustersclusterid
      with:
        id: tools.id
        cluster_id: tools.cluster_id
      outputParameters:
      - type: object
        mapping: $.
    - name: edit-project-cluster
      description: Edit project cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gitlab-ci-clusters.putapiv4projectsidclustersclusterid
      with:
        id: tools.id
        cluster_id: tools.cluster_id
        putApiV4ProjectsIdClustersClusterId: tools.putApiV4ProjectsIdClustersClusterId
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-project-cluster
      description: Delete project cluster
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gitlab-ci-clusters.deleteapiv4projectsidclustersclusterid
      with:
        id: tools.id
        cluster_id: tools.cluster_id
      outputParameters:
      - type: object
        mapping: $.