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: $.