tidb · Capability

TiDB Cloud API — Clusters

TiDB Cloud API — Clusters. 8 operations. Lead operation: List clusters. Self-contained Naftiko capability covering one Tidb business surface.

Run with Naftiko TidbClusters

What You Can Do

GET
Listclusters — List clusters
/v1/clusters
POST
Createcluster — Create a cluster
/v1/clusters
GET
Getcluster — Get a cluster
/v1/clusters/{clusterid}
PATCH
Updatecluster — Update a cluster
/v1/clusters/{clusterid}
DELETE
Deletecluster — Delete a cluster
/v1/clusters/{clusterid}
POST
Pausecluster — Pause a cluster
/v1/clusters/clusterid-pausecluster
POST
Resetclusterrootpassword — Reset root password
/v1/clusters/clusterid-resetrootpassword
POST
Resumecluster — Resume a cluster
/v1/clusters/clusterid-resumecluster

MCP Tools

list-clusters

List clusters

read-only idempotent
create-cluster

Create a cluster

get-cluster

Get a cluster

read-only idempotent
update-cluster

Update a cluster

idempotent
delete-cluster

Delete a cluster

idempotent
pause-cluster

Pause a cluster

reset-root-password

Reset root password

resume-cluster

Resume a cluster

Capability Spec

cloud-clusters.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TiDB Cloud API — Clusters
  description: 'TiDB Cloud API — Clusters. 8 operations. Lead operation: List clusters. Self-contained Naftiko capability
    covering one Tidb business surface.'
  tags:
  - Tidb
  - Clusters
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TIDB_API_KEY: TIDB_API_KEY
capability:
  consumes:
  - type: http
    namespace: cloud-clusters
    baseUri: https://dedicated.tidbapi.com/v1beta1
    description: TiDB Cloud API — Clusters business capability. Self-contained, no shared references.
    resources:
    - name: clusters
      path: /clusters
      operations:
      - name: listclusters
        method: GET
        description: List clusters
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: projectId
          in: query
          type: string
          description: Filter clusters by project ID.
        - name: clusterStates
          in: query
          type: array
          description: Filter clusters by state. Possible values include CREATING, ACTIVE, PAUSED, RESUMING, DELETING, and
            UPGRADING.
      - name: createcluster
        method: POST
        description: Create a cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: validateOnly
          in: query
          type: boolean
          description: If true, validates the request without creating the cluster.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: clusters-clusterId
      path: /clusters/{clusterId}
      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: clusters-clusterId}:pauseCluster
      path: /clusters/{clusterId}:pauseCluster
      operations:
      - name: pausecluster
        method: POST
        description: Pause a cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: clusters-clusterId}:resetRootPassword
      path: /clusters/{clusterId}:resetRootPassword
      operations:
      - name: resetclusterrootpassword
        method: POST
        description: Reset root password
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: clusters-clusterId}:resumeCluster
      path: /clusters/{clusterId}:resumeCluster
      operations:
      - name: resumecluster
        method: POST
        description: Resume a cluster
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: cloud-clusters-rest
    port: 8080
    description: REST adapter for TiDB Cloud API — Clusters. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/clusters
      name: clusters
      description: REST surface for clusters.
      operations:
      - method: GET
        name: listclusters
        description: List clusters
        call: cloud-clusters.listclusters
        with:
          projectId: rest.projectId
          clusterStates: rest.clusterStates
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcluster
        description: Create a cluster
        call: cloud-clusters.createcluster
        with:
          validateOnly: rest.validateOnly
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/clusters/{clusterid}
      name: clusters-clusterid
      description: REST surface for clusters-clusterId.
      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/clusters/clusterid-pausecluster
      name: clusters-clusterid-pausecluster
      description: REST surface for clusters-clusterId}:pauseCluster.
      operations:
      - method: POST
        name: pausecluster
        description: Pause a cluster
        call: cloud-clusters.pausecluster
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/clusters/clusterid-resetrootpassword
      name: clusters-clusterid-resetrootpassword
      description: REST surface for clusters-clusterId}:resetRootPassword.
      operations:
      - method: POST
        name: resetclusterrootpassword
        description: Reset root password
        call: cloud-clusters.resetclusterrootpassword
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/clusters/clusterid-resumecluster
      name: clusters-clusterid-resumecluster
      description: REST surface for clusters-clusterId}:resumeCluster.
      operations:
      - method: POST
        name: resumecluster
        description: Resume a cluster
        call: cloud-clusters.resumecluster
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-clusters-mcp
    port: 9090
    transport: http
    description: MCP adapter for TiDB Cloud API — Clusters. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-clusters
      description: List clusters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-clusters.listclusters
      with:
        projectId: tools.projectId
        clusterStates: tools.clusterStates
      outputParameters:
      - type: object
        mapping: $.
    - name: create-cluster
      description: Create a cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-clusters.createcluster
      with:
        validateOnly: tools.validateOnly
        body: tools.body
      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: pause-cluster
      description: Pause a cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-clusters.pausecluster
      outputParameters:
      - type: object
        mapping: $.
    - name: reset-root-password
      description: Reset root password
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-clusters.resetclusterrootpassword
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: resume-cluster
      description: Resume a cluster
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-clusters.resumecluster
      outputParameters:
      - type: object
        mapping: $.