Docker · Capability

Docker Engine API — Swarm

Docker Engine API — Swarm. 7 operations. Lead operation: Inspect swarm. Self-contained Naftiko capability covering one Docker business surface.

Run with Naftiko DockerSwarm

What You Can Do

GET
Swarminspect — Inspect swarm
/v1/swarm
POST
Swarminit — Initialize a new swarm
/v1/swarm/init
POST
Swarmjoin — Join an existing swarm
/v1/swarm/join
POST
Swarmleave — Leave a swarm
/v1/swarm/leave
POST
Swarmunlock — Unlock a locked manager
/v1/swarm/unlock
GET
Swarmunlockkey — Get the unlock key
/v1/swarm/unlockkey
POST
Swarmupdate — Update a swarm
/v1/swarm/update

MCP Tools

inspect-swarm

Inspect swarm

read-only idempotent
initialize-new-swarm

Initialize a new swarm

join-existing-swarm

Join an existing swarm

leave-swarm

Leave a swarm

unlock-locked-manager

Unlock a locked manager

get-unlock-key

Get the unlock key

read-only idempotent
update-swarm

Update a swarm

Capability Spec

docker-swarm.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Docker Engine API — Swarm
  description: 'Docker Engine API — Swarm. 7 operations. Lead operation: Inspect swarm. Self-contained Naftiko capability
    covering one Docker business surface.'
  tags:
  - Docker
  - Swarm
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DOCKER_API_KEY: DOCKER_API_KEY
capability:
  consumes:
  - type: http
    namespace: docker-swarm
    baseUri: ''
    description: Docker Engine API — Swarm business capability. Self-contained, no shared references.
    resources:
    - name: swarm
      path: /swarm
      operations:
      - name: swarminspect
        method: GET
        description: Inspect swarm
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: swarm-init
      path: /swarm/init
      operations:
      - name: swarminit
        method: POST
        description: Initialize a new swarm
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: true
    - name: swarm-join
      path: /swarm/join
      operations:
      - name: swarmjoin
        method: POST
        description: Join an existing swarm
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: true
    - name: swarm-leave
      path: /swarm/leave
      operations:
      - name: swarmleave
        method: POST
        description: Leave a swarm
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: force
          in: query
          type: boolean
          description: Force leave swarm, even if this is the last manager or that it will
    - name: swarm-unlock
      path: /swarm/unlock
      operations:
      - name: swarmunlock
        method: POST
        description: Unlock a locked manager
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          required: true
    - name: swarm-unlockkey
      path: /swarm/unlockkey
      operations:
      - name: swarmunlockkey
        method: GET
        description: Get the unlock key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: swarm-update
      path: /swarm/update
      operations:
      - name: swarmupdate
        method: POST
        description: Update a swarm
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: string
          required: true
        - name: version
          in: query
          type: integer
          description: The version number of the swarm object being updated. This is
          required: true
        - name: rotateWorkerToken
          in: query
          type: boolean
          description: Rotate the worker join token.
        - name: rotateManagerToken
          in: query
          type: boolean
          description: Rotate the manager join token.
        - name: rotateManagerUnlockKey
          in: query
          type: boolean
          description: Rotate the manager unlock key.
  exposes:
  - type: rest
    namespace: docker-swarm-rest
    port: 8080
    description: REST adapter for Docker Engine API — Swarm. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/swarm
      name: swarm
      description: REST surface for swarm.
      operations:
      - method: GET
        name: swarminspect
        description: Inspect swarm
        call: docker-swarm.swarminspect
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/swarm/init
      name: swarm-init
      description: REST surface for swarm-init.
      operations:
      - method: POST
        name: swarminit
        description: Initialize a new swarm
        call: docker-swarm.swarminit
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/swarm/join
      name: swarm-join
      description: REST surface for swarm-join.
      operations:
      - method: POST
        name: swarmjoin
        description: Join an existing swarm
        call: docker-swarm.swarmjoin
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/swarm/leave
      name: swarm-leave
      description: REST surface for swarm-leave.
      operations:
      - method: POST
        name: swarmleave
        description: Leave a swarm
        call: docker-swarm.swarmleave
        with:
          force: rest.force
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/swarm/unlock
      name: swarm-unlock
      description: REST surface for swarm-unlock.
      operations:
      - method: POST
        name: swarmunlock
        description: Unlock a locked manager
        call: docker-swarm.swarmunlock
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/swarm/unlockkey
      name: swarm-unlockkey
      description: REST surface for swarm-unlockkey.
      operations:
      - method: GET
        name: swarmunlockkey
        description: Get the unlock key
        call: docker-swarm.swarmunlockkey
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/swarm/update
      name: swarm-update
      description: REST surface for swarm-update.
      operations:
      - method: POST
        name: swarmupdate
        description: Update a swarm
        call: docker-swarm.swarmupdate
        with:
          body: rest.body
          version: rest.version
          rotateWorkerToken: rest.rotateWorkerToken
          rotateManagerToken: rest.rotateManagerToken
          rotateManagerUnlockKey: rest.rotateManagerUnlockKey
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: docker-swarm-mcp
    port: 9090
    transport: http
    description: MCP adapter for Docker Engine API — Swarm. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: inspect-swarm
      description: Inspect swarm
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: docker-swarm.swarminspect
      outputParameters:
      - type: object
        mapping: $.
    - name: initialize-new-swarm
      description: Initialize a new swarm
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-swarm.swarminit
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: join-existing-swarm
      description: Join an existing swarm
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-swarm.swarmjoin
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: leave-swarm
      description: Leave a swarm
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-swarm.swarmleave
      with:
        force: tools.force
      outputParameters:
      - type: object
        mapping: $.
    - name: unlock-locked-manager
      description: Unlock a locked manager
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-swarm.swarmunlock
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-unlock-key
      description: Get the unlock key
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: docker-swarm.swarmunlockkey
      outputParameters:
      - type: object
        mapping: $.
    - name: update-swarm
      description: Update a swarm
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: docker-swarm.swarmupdate
      with:
        body: tools.body
        version: tools.version
        rotateWorkerToken: tools.rotateWorkerToken
        rotateManagerToken: tools.rotateManagerToken
        rotateManagerUnlockKey: tools.rotateManagerUnlockKey
      outputParameters:
      - type: object
        mapping: $.