tidb · Capability

TiDB HTTP API — MVCC

TiDB HTTP API — MVCC. 2 operations. Lead operation: Get MVCC info by hex key. Self-contained Naftiko capability covering one Tidb business surface.

Run with Naftiko TidbMVCC

What You Can Do

GET
Getmvccbyhexkey — Get MVCC info by hex key
/v1/mvcc/hex/{hexkey}
GET
Getmvccbyhandle — Get MVCC info by row handle
/v1/mvcc/key/{db}/{table}/{handle}

MCP Tools

get-mvcc-info-hex-key

Get MVCC info by hex key

read-only idempotent
get-mvcc-info-row-handle

Get MVCC info by row handle

read-only idempotent

Capability Spec

http-mvcc.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TiDB HTTP API — MVCC
  description: 'TiDB HTTP API — MVCC. 2 operations. Lead operation: Get MVCC info by hex key. Self-contained Naftiko capability
    covering one Tidb business surface.'
  tags:
  - Tidb
  - MVCC
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TIDB_API_KEY: TIDB_API_KEY
capability:
  consumes:
  - type: http
    namespace: http-mvcc
    baseUri: http://localhost:10080
    description: TiDB HTTP API — MVCC business capability. Self-contained, no shared references.
    resources:
    - name: mvcc-hex-hexKey
      path: /mvcc/hex/{hexKey}
      operations:
      - name: getmvccbyhexkey
        method: GET
        description: Get MVCC info by hex key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: hexKey
          in: path
          type: string
          description: The raw key encoded as a hexadecimal string.
          required: true
    - name: mvcc-key-db-table-handle
      path: /mvcc/key/{db}/{table}/{handle}
      operations:
      - name: getmvccbyhandle
        method: GET
        description: Get MVCC info by row handle
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: handle
          in: path
          type: string
          description: The row handle (primary key value or internal row ID) for the target row.
          required: true
  exposes:
  - type: rest
    namespace: http-mvcc-rest
    port: 8080
    description: REST adapter for TiDB HTTP API — MVCC. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/mvcc/hex/{hexkey}
      name: mvcc-hex-hexkey
      description: REST surface for mvcc-hex-hexKey.
      operations:
      - method: GET
        name: getmvccbyhexkey
        description: Get MVCC info by hex key
        call: http-mvcc.getmvccbyhexkey
        with:
          hexKey: rest.hexKey
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/mvcc/key/{db}/{table}/{handle}
      name: mvcc-key-db-table-handle
      description: REST surface for mvcc-key-db-table-handle.
      operations:
      - method: GET
        name: getmvccbyhandle
        description: Get MVCC info by row handle
        call: http-mvcc.getmvccbyhandle
        with:
          handle: rest.handle
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: http-mvcc-mcp
    port: 9090
    transport: http
    description: MCP adapter for TiDB HTTP API — MVCC. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-mvcc-info-hex-key
      description: Get MVCC info by hex key
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-mvcc.getmvccbyhexkey
      with:
        hexKey: tools.hexKey
      outputParameters:
      - type: object
        mapping: $.
    - name: get-mvcc-info-row-handle
      description: Get MVCC info by row handle
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-mvcc.getmvccbyhandle
      with:
        handle: tools.handle
      outputParameters:
      - type: object
        mapping: $.