Apache ShardingSphere · Capability

Apache ShardingSphere REST API — Databases

Apache ShardingSphere REST API — Databases. 4 operations. Lead operation: Apache ShardingSphere List Databases. Self-contained Naftiko capability covering one Apache Shardingsphere business surface.

Run with Naftiko Apache ShardingsphereDatabases

What You Can Do

GET
Listdatabases — Apache ShardingSphere List Databases
/v1/databases
POST
Createdatabase — Apache ShardingSphere Create Database
/v1/databases
GET
Getdatabase — Apache ShardingSphere Get Database
/v1/databases/{databasename}
DELETE
Deletedatabase — Apache ShardingSphere Delete Database
/v1/databases/{databasename}

MCP Tools

apache-shardingsphere-list-databases

Apache ShardingSphere List Databases

read-only idempotent
apache-shardingsphere-create-database

Apache ShardingSphere Create Database

apache-shardingsphere-get-database

Apache ShardingSphere Get Database

read-only idempotent
apache-shardingsphere-delete-database

Apache ShardingSphere Delete Database

idempotent

Capability Spec

rest-databases.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Apache ShardingSphere REST API — Databases
  description: 'Apache ShardingSphere REST API — Databases. 4 operations. Lead operation: Apache ShardingSphere List Databases.
    Self-contained Naftiko capability covering one Apache Shardingsphere business surface.'
  tags:
  - Apache Shardingsphere
  - Databases
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    APACHE_SHARDINGSPHERE_API_KEY: APACHE_SHARDINGSPHERE_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-databases
    baseUri: https://shardingsphere.example.com/api
    description: Apache ShardingSphere REST API — Databases business capability. Self-contained, no shared references.
    resources:
    - name: databases
      path: /databases
      operations:
      - name: listdatabases
        method: GET
        description: Apache ShardingSphere List Databases
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createdatabase
        method: POST
        description: Apache ShardingSphere Create Database
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: databases-databaseName
      path: /databases/{databaseName}
      operations:
      - name: getdatabase
        method: GET
        description: Apache ShardingSphere Get Database
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: databaseName
          in: path
          type: string
          required: true
      - name: deletedatabase
        method: DELETE
        description: Apache ShardingSphere Delete Database
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: databaseName
          in: path
          type: string
          required: true
  exposes:
  - type: rest
    namespace: rest-databases-rest
    port: 8080
    description: REST adapter for Apache ShardingSphere REST API — Databases. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/databases
      name: databases
      description: REST surface for databases.
      operations:
      - method: GET
        name: listdatabases
        description: Apache ShardingSphere List Databases
        call: rest-databases.listdatabases
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createdatabase
        description: Apache ShardingSphere Create Database
        call: rest-databases.createdatabase
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/databases/{databasename}
      name: databases-databasename
      description: REST surface for databases-databaseName.
      operations:
      - method: GET
        name: getdatabase
        description: Apache ShardingSphere Get Database
        call: rest-databases.getdatabase
        with:
          databaseName: rest.databaseName
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletedatabase
        description: Apache ShardingSphere Delete Database
        call: rest-databases.deletedatabase
        with:
          databaseName: rest.databaseName
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-databases-mcp
    port: 9090
    transport: http
    description: MCP adapter for Apache ShardingSphere REST API — Databases. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: apache-shardingsphere-list-databases
      description: Apache ShardingSphere List Databases
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-databases.listdatabases
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-shardingsphere-create-database
      description: Apache ShardingSphere Create Database
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-databases.createdatabase
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-shardingsphere-get-database
      description: Apache ShardingSphere Get Database
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-databases.getdatabase
      with:
        databaseName: tools.databaseName
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-shardingsphere-delete-database
      description: Apache ShardingSphere Delete Database
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-databases.deletedatabase
      with:
        databaseName: tools.databaseName
      outputParameters:
      - type: object
        mapping: $.