HashiCorp Consul · Capability

HashiCorp Consul HTTP API — Status

HashiCorp Consul HTTP API — Status. 2 operations. Lead operation: Get Raft leader. Self-contained Naftiko capability covering one Consul business surface.

Run with Naftiko ConsulStatus

What You Can Do

GET
Getstatusleader — Get Raft leader
/v1/status/leader
GET
Getstatuspeers — List Raft peers
/v1/status/peers

MCP Tools

get-raft-leader

Get Raft leader

read-only idempotent
list-raft-peers

List Raft peers

read-only idempotent

Capability Spec

http-status.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: HashiCorp Consul HTTP API — Status
  description: 'HashiCorp Consul HTTP API — Status. 2 operations. Lead operation: Get Raft leader. Self-contained Naftiko
    capability covering one Consul business surface.'
  tags:
  - Consul
  - Status
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CONSUL_API_KEY: CONSUL_API_KEY
capability:
  consumes:
  - type: http
    namespace: http-status
    baseUri: http://localhost:8500/v1
    description: HashiCorp Consul HTTP API — Status business capability. Self-contained, no shared references.
    resources:
    - name: status-leader
      path: /status/leader
      operations:
      - name: getstatusleader
        method: GET
        description: Get Raft leader
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: status-peers
      path: /status/peers
      operations:
      - name: getstatuspeers
        method: GET
        description: List Raft peers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: X-Consul-Token
      value: '{{env.CONSUL_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: http-status-rest
    port: 8080
    description: REST adapter for HashiCorp Consul HTTP API — Status. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/status/leader
      name: status-leader
      description: REST surface for status-leader.
      operations:
      - method: GET
        name: getstatusleader
        description: Get Raft leader
        call: http-status.getstatusleader
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/status/peers
      name: status-peers
      description: REST surface for status-peers.
      operations:
      - method: GET
        name: getstatuspeers
        description: List Raft peers
        call: http-status.getstatuspeers
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: http-status-mcp
    port: 9090
    transport: http
    description: MCP adapter for HashiCorp Consul HTTP API — Status. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-raft-leader
      description: Get Raft leader
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-status.getstatusleader
      outputParameters:
      - type: object
        mapping: $.
    - name: list-raft-peers
      description: List Raft peers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-status.getstatuspeers
      outputParameters:
      - type: object
        mapping: $.