tidb · Capability

TiDB HTTP API — DDL

TiDB HTTP API — DDL. 2 operations. Lead operation: Get DDL job history. Self-contained Naftiko capability covering one Tidb business surface.

Run with Naftiko TidbDDL

What You Can Do

GET
Getddlhistory — Get DDL job history
/v1/ddl/history
POST
Resignddlowner — Resign DDL owner
/v1/ddl/owner/resign

MCP Tools

get-ddl-job-history

Get DDL job history

read-only idempotent
resign-ddl-owner

Resign DDL owner

Capability Spec

http-ddl.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TiDB HTTP API — DDL
  description: 'TiDB HTTP API — DDL. 2 operations. Lead operation: Get DDL job history. Self-contained Naftiko capability
    covering one Tidb business surface.'
  tags:
  - Tidb
  - DDL
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TIDB_API_KEY: TIDB_API_KEY
capability:
  consumes:
  - type: http
    namespace: http-ddl
    baseUri: http://localhost:10080
    description: TiDB HTTP API — DDL business capability. Self-contained, no shared references.
    resources:
    - name: ddl-history
      path: /ddl/history
      operations:
      - name: getddlhistory
        method: GET
        description: Get DDL job history
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: start_job_id
          in: query
          type: integer
          description: The DDL job ID to start listing from, for pagination.
        - name: limit
          in: query
          type: integer
          description: Maximum number of DDL job history records to return.
    - name: ddl-owner-resign
      path: /ddl/owner/resign
      operations:
      - name: resignddlowner
        method: POST
        description: Resign DDL owner
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: http-ddl-rest
    port: 8080
    description: REST adapter for TiDB HTTP API — DDL. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/ddl/history
      name: ddl-history
      description: REST surface for ddl-history.
      operations:
      - method: GET
        name: getddlhistory
        description: Get DDL job history
        call: http-ddl.getddlhistory
        with:
          start_job_id: rest.start_job_id
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/ddl/owner/resign
      name: ddl-owner-resign
      description: REST surface for ddl-owner-resign.
      operations:
      - method: POST
        name: resignddlowner
        description: Resign DDL owner
        call: http-ddl.resignddlowner
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: http-ddl-mcp
    port: 9090
    transport: http
    description: MCP adapter for TiDB HTTP API — DDL. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-ddl-job-history
      description: Get DDL job history
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-ddl.getddlhistory
      with:
        start_job_id: tools.start_job_id
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: resign-ddl-owner
      description: Resign DDL owner
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-ddl.resignddlowner
      outputParameters:
      - type: object
        mapping: $.