Cockroach Labs · Capability

CockroachDB Cloud API — Clusters

CockroachDB Cloud API — Clusters. 9 operations. Lead operation: List major cluster versions. Self-contained Naftiko capability covering one Cockroach Labs business surface.

Run with Naftiko Cockroach LabsClusters

What You Can Do

GET
Listmajorclusterversions — List major cluster versions
/v1/api/v1/cluster-versions
GET
Listclusters — List clusters
/v1/api/v1/clusters
POST
Createcluster — Create a cluster
/v1/api/v1/clusters
GET
Listavailableregions — List available regions
/v1/api/v1/clusters/available-regions
GET
Getcluster — Get a cluster
/v1/api/v1/clusters/{cluster-id}
PATCH
Updatecluster — Update a cluster
/v1/api/v1/clusters/{cluster-id}
DELETE
Deletecluster — Delete a cluster
/v1/api/v1/clusters/{cluster-id}
GET
Getconnectionstring — Get connection string
/v1/api/v1/clusters/{cluster-id}/connection-string
GET
Listclusternodes — List cluster nodes
/v1/api/v1/clusters/{cluster-id}/nodes

MCP Tools

list-major-cluster-versions

List major cluster versions

read-only idempotent
list-clusters

List clusters

read-only idempotent
create-cluster

Create a cluster

list-available-regions

List available regions

read-only idempotent
get-cluster

Get a cluster

read-only idempotent
update-cluster

Update a cluster

idempotent
delete-cluster

Delete a cluster

idempotent
get-connection-string

Get connection string

read-only idempotent
list-cluster-nodes

List cluster nodes

read-only idempotent

Capability Spec

cloud-clusters.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CockroachDB Cloud API — Clusters
  description: 'CockroachDB Cloud API — Clusters. 9 operations. Lead operation: List major cluster versions. Self-contained
    Naftiko capability covering one Cockroach Labs business surface.'
  tags:
  - Cockroach Labs
  - Clusters
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COCKROACH_LABS_API_KEY: COCKROACH_LABS_API_KEY
capability:
  consumes:
  - type: http
    namespace: cloud-clusters
    baseUri: https://cockroachlabs.cloud
    description: CockroachDB Cloud API — Clusters business capability. Self-contained, no shared references.
    resources:
    - name: api-v1-cluster-versions
      path: /api/v1/cluster-versions
      operations:
      - name: listmajorclusterversions
        method: GET
        description: List major cluster versions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v1-clusters
      path: /api/v1/clusters
      operations:
      - name: listclusters
        method: GET
        description: List clusters
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createcluster
        method: POST
        description: Create a cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-clusters-available-regions
      path: /api/v1/clusters/available-regions
      operations:
      - name: listavailableregions
        method: GET
        description: List available regions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: provider
          in: query
          type: string
          description: Cloud provider to filter regions by. Accepted values are GCP, AWS, AZURE.
        - name: serverless
          in: query
          type: boolean
          description: If true, only return regions that support serverless clusters.
    - name: api-v1-clusters-cluster_id
      path: /api/v1/clusters/{cluster_id}
      operations:
      - name: getcluster
        method: GET
        description: Get a cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatecluster
        method: PATCH
        description: Update a cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecluster
        method: DELETE
        description: Delete a cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v1-clusters-cluster_id-connection-string
      path: /api/v1/clusters/{cluster_id}/connection-string
      operations:
      - name: getconnectionstring
        method: GET
        description: Get connection string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: database
          in: query
          type: string
          description: Name of the database to connect to.
        - name: sql_user
          in: query
          type: string
          description: SQL username to include in the connection string.
        - name: os
          in: query
          type: string
          description: Operating system for which to format the connection string. Accepted values are MAC, LINUX, WINDOWS.
    - name: api-v1-clusters-cluster_id-nodes
      path: /api/v1/clusters/{cluster_id}/nodes
      operations:
      - name: listclusternodes
        method: GET
        description: List cluster nodes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: region_name
          in: query
          type: string
          description: Filter nodes by the name of the cloud provider region.
    authentication:
      type: bearer
      token: '{{env.COCKROACH_LABS_API_KEY}}'
  exposes:
  - type: rest
    namespace: cloud-clusters-rest
    port: 8080
    description: REST adapter for CockroachDB Cloud API — Clusters. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/v1/cluster-versions
      name: api-v1-cluster-versions
      description: REST surface for api-v1-cluster-versions.
      operations:
      - method: GET
        name: listmajorclusterversions
        description: List major cluster versions
        call: cloud-clusters.listmajorclusterversions
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters
      name: api-v1-clusters
      description: REST surface for api-v1-clusters.
      operations:
      - method: GET
        name: listclusters
        description: List clusters
        call: cloud-clusters.listclusters
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcluster
        description: Create a cluster
        call: cloud-clusters.createcluster
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/available-regions
      name: api-v1-clusters-available-regions
      description: REST surface for api-v1-clusters-available-regions.
      operations:
      - method: GET
        name: listavailableregions
        description: List available regions
        call: cloud-clusters.listavailableregions
        with:
          provider: rest.provider
          serverless: rest.serverless
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/{cluster-id}
      name: api-v1-clusters-cluster-id
      description: REST surface for api-v1-clusters-cluster_id.
      operations:
      - method: GET
        name: getcluster
        description: Get a cluster
        call: cloud-clusters.getcluster
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatecluster
        description: Update a cluster
        call: cloud-clusters.updatecluster
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecluster
        description: Delete a cluster
        call: cloud-clusters.deletecluster
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/{cluster-id}/connection-string
      name: api-v1-clusters-cluster-id-connection-string
      description: REST surface for api-v1-clusters-cluster_id-connection-string.
      operations:
      - method: GET
        name: getconnectionstring
        description: Get connection string
        call: cloud-clusters.getconnectionstring
        with:
          database: rest.database
          sql_user: rest.sql_user
          os: rest.os
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/{cluster-id}/nodes
      name: api-v1-clusters-cluster-id-nodes
      description: REST surface for api-v1-clusters-cluster_id-nodes.
      operations:
      - method: GET
        name: listclusternodes
        description: List cluster nodes
        call: cloud-clusters.listclusternodes
        with:
          region_name: rest.region_name
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-clusters-mcp
    port: 9090
    transport: http
    description: MCP adapter for CockroachDB Cloud API — Clusters. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-major-cluster-versions
      description: List major cluster versions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-clusters.listmajorclusterversions
      outputParameters:
      - type: object
        mapping: $.
    - name: list-clusters
      description: List clusters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-clusters.listclusters
      outputParameters:
      - type: object
        mapping: $.
    - name: create-cluster
      description: Create a cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-clusters.createcluster
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-available-regions
      description: List available regions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-clusters.listavailableregions
      with:
        provider: tools.provider
        serverless: tools.serverless
      outputParameters:
      - type: object
        mapping: $.
    - name: get-cluster
      description: Get a cluster
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-clusters.getcluster
      outputParameters:
      - type: object
        mapping: $.
    - name: update-cluster
      description: Update a cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: cloud-clusters.updatecluster
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-cluster
      description: Delete a cluster
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-clusters.deletecluster
      outputParameters:
      - type: object
        mapping: $.
    - name: get-connection-string
      description: Get connection string
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-clusters.getconnectionstring
      with:
        database: tools.database
        sql_user: tools.sql_user
        os: tools.os
      outputParameters:
      - type: object
        mapping: $.
    - name: list-cluster-nodes
      description: List cluster nodes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-clusters.listclusternodes
      with:
        region_name: tools.region_name
      outputParameters:
      - type: object
        mapping: $.