CockroachDB · Capability

CockroachDB Cloud API — Databases

CockroachDB Cloud API — Databases. 4 operations. Lead operation: List databases. Self-contained Naftiko capability covering one Cockroachdb business surface.

Run with Naftiko CockroachdbDatabases

What You Can Do

GET
Listdatabases — List databases
/v1/api/v1/clusters/{cluster-id}/databases
POST
Createdatabase — Create a database
/v1/api/v1/clusters/{cluster-id}/databases
PATCH
Editdatabase — Update a database
/v1/api/v1/clusters/{cluster-id}/databases/{name}
DELETE
Deletedatabase — Delete a database
/v1/api/v1/clusters/{cluster-id}/databases/{name}

MCP Tools

list-databases

List databases

read-only idempotent
create-database

Create a database

update-database

Update a database

idempotent
delete-database

Delete a database

idempotent

Capability Spec

cloud-databases.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CockroachDB Cloud API — Databases
  description: 'CockroachDB Cloud API — Databases. 4 operations. Lead operation: List databases. Self-contained Naftiko capability
    covering one Cockroachdb business surface.'
  tags:
  - Cockroachdb
  - Databases
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COCKROACHDB_API_KEY: COCKROACHDB_API_KEY
capability:
  consumes:
  - type: http
    namespace: cloud-databases
    baseUri: https://cockroachlabs.cloud
    description: CockroachDB Cloud API — Databases business capability. Self-contained, no shared references.
    resources:
    - name: api-v1-clusters-cluster_id-databases
      path: /api/v1/clusters/{cluster_id}/databases
      operations:
      - name: listdatabases
        method: GET
        description: List databases
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createdatabase
        method: POST
        description: Create a database
        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-cluster_id-databases-name
      path: /api/v1/clusters/{cluster_id}/databases/{name}
      operations:
      - name: editdatabase
        method: PATCH
        description: Update a database
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletedatabase
        method: DELETE
        description: Delete a database
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.COCKROACHDB_API_KEY}}'
  exposes:
  - type: rest
    namespace: cloud-databases-rest
    port: 8080
    description: REST adapter for CockroachDB Cloud API — Databases. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/v1/clusters/{cluster-id}/databases
      name: api-v1-clusters-cluster-id-databases
      description: REST surface for api-v1-clusters-cluster_id-databases.
      operations:
      - method: GET
        name: listdatabases
        description: List databases
        call: cloud-databases.listdatabases
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createdatabase
        description: Create a database
        call: cloud-databases.createdatabase
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/clusters/{cluster-id}/databases/{name}
      name: api-v1-clusters-cluster-id-databases-name
      description: REST surface for api-v1-clusters-cluster_id-databases-name.
      operations:
      - method: PATCH
        name: editdatabase
        description: Update a database
        call: cloud-databases.editdatabase
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletedatabase
        description: Delete a database
        call: cloud-databases.deletedatabase
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-databases-mcp
    port: 9090
    transport: http
    description: MCP adapter for CockroachDB Cloud API — Databases. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-databases
      description: List databases
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-databases.listdatabases
      outputParameters:
      - type: object
        mapping: $.
    - name: create-database
      description: Create a database
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-databases.createdatabase
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-database
      description: Update a database
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: cloud-databases.editdatabase
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-database
      description: Delete a database
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-databases.deletedatabase
      outputParameters:
      - type: object
        mapping: $.