Apache ShardingSphere · Capability

Apache ShardingSphere REST API — ShardingRules

Apache ShardingSphere REST API — ShardingRules. 1 operations. Lead operation: Apache ShardingSphere Get Sharding Rules. Self-contained Naftiko capability covering one Apache Shardingsphere business surface.

Run with Naftiko Apache ShardingsphereShardingRules

What You Can Do

GET
Getshardingrules — Apache ShardingSphere Get Sharding Rules
/v1/databases/{databasename}/rules/sharding

MCP Tools

apache-shardingsphere-get-sharding-rules

Apache ShardingSphere Get Sharding Rules

read-only idempotent

Capability Spec

rest-shardingrules.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Apache ShardingSphere REST API — ShardingRules
  description: 'Apache ShardingSphere REST API — ShardingRules. 1 operations. Lead operation: Apache ShardingSphere Get Sharding
    Rules. Self-contained Naftiko capability covering one Apache Shardingsphere business surface.'
  tags:
  - Apache Shardingsphere
  - ShardingRules
  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-shardingrules
    baseUri: https://shardingsphere.example.com/api
    description: Apache ShardingSphere REST API — ShardingRules business capability. Self-contained, no shared references.
    resources:
    - name: databases-databaseName-rules-sharding
      path: /databases/{databaseName}/rules/sharding
      operations:
      - name: getshardingrules
        method: GET
        description: Apache ShardingSphere Get Sharding Rules
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: databaseName
          in: path
          type: string
          required: true
  exposes:
  - type: rest
    namespace: rest-shardingrules-rest
    port: 8080
    description: REST adapter for Apache ShardingSphere REST API — ShardingRules. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/databases/{databasename}/rules/sharding
      name: databases-databasename-rules-sharding
      description: REST surface for databases-databaseName-rules-sharding.
      operations:
      - method: GET
        name: getshardingrules
        description: Apache ShardingSphere Get Sharding Rules
        call: rest-shardingrules.getshardingrules
        with:
          databaseName: rest.databaseName
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-shardingrules-mcp
    port: 9090
    transport: http
    description: MCP adapter for Apache ShardingSphere REST API — ShardingRules. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: apache-shardingsphere-get-sharding-rules
      description: Apache ShardingSphere Get Sharding Rules
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-shardingrules.getshardingrules
      with:
        databaseName: tools.databaseName
      outputParameters:
      - type: object
        mapping: $.