RabbitMQ · Capability

RabbitMQ Management HTTP API — Virtual Hosts

RabbitMQ Management HTTP API — Virtual Hosts. 4 operations. Lead operation: List virtual hosts. Self-contained Naftiko capability covering one Rabbitmq business surface.

Run with Naftiko RabbitmqVirtual Hosts

What You Can Do

GET
Listvhosts — List virtual hosts
/v1/vhosts
GET
Getvhost — Get virtual host
/v1/vhosts/{vhost}
PUT
Createvhost — Create virtual host
/v1/vhosts/{vhost}
DELETE
Deletevhost — Delete virtual host
/v1/vhosts/{vhost}

MCP Tools

list-virtual-hosts

List virtual hosts

read-only idempotent
get-virtual-host

Get virtual host

read-only idempotent
create-virtual-host

Create virtual host

idempotent
delete-virtual-host

Delete virtual host

idempotent

Capability Spec

management-virtual-hosts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: RabbitMQ Management HTTP API — Virtual Hosts
  description: 'RabbitMQ Management HTTP API — Virtual Hosts. 4 operations. Lead operation: List virtual hosts. Self-contained
    Naftiko capability covering one Rabbitmq business surface.'
  tags:
  - Rabbitmq
  - Virtual Hosts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    RABBITMQ_API_KEY: RABBITMQ_API_KEY
capability:
  consumes:
  - type: http
    namespace: management-virtual-hosts
    baseUri: http://localhost:15672/api
    description: RabbitMQ Management HTTP API — Virtual Hosts business capability. Self-contained, no shared references.
    resources:
    - name: vhosts
      path: /vhosts
      operations:
      - name: listvhosts
        method: GET
        description: List virtual hosts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: vhosts-vhost
      path: /vhosts/{vhost}
      operations:
      - name: getvhost
        method: GET
        description: Get virtual host
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vhost
          in: path
          type: string
          required: true
      - name: createvhost
        method: PUT
        description: Create virtual host
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vhost
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: deletevhost
        method: DELETE
        description: Delete virtual host
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vhost
          in: path
          type: string
          required: true
    authentication:
      type: basic
      username: '{{env.RABBITMQ_USER}}'
      password: '{{env.RABBITMQ_PASS}}'
  exposes:
  - type: rest
    namespace: management-virtual-hosts-rest
    port: 8080
    description: REST adapter for RabbitMQ Management HTTP API — Virtual Hosts. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/vhosts
      name: vhosts
      description: REST surface for vhosts.
      operations:
      - method: GET
        name: listvhosts
        description: List virtual hosts
        call: management-virtual-hosts.listvhosts
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/vhosts/{vhost}
      name: vhosts-vhost
      description: REST surface for vhosts-vhost.
      operations:
      - method: GET
        name: getvhost
        description: Get virtual host
        call: management-virtual-hosts.getvhost
        with:
          vhost: rest.vhost
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: createvhost
        description: Create virtual host
        call: management-virtual-hosts.createvhost
        with:
          vhost: rest.vhost
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletevhost
        description: Delete virtual host
        call: management-virtual-hosts.deletevhost
        with:
          vhost: rest.vhost
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: management-virtual-hosts-mcp
    port: 9090
    transport: http
    description: MCP adapter for RabbitMQ Management HTTP API — Virtual Hosts. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: list-virtual-hosts
      description: List virtual hosts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: management-virtual-hosts.listvhosts
      outputParameters:
      - type: object
        mapping: $.
    - name: get-virtual-host
      description: Get virtual host
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: management-virtual-hosts.getvhost
      with:
        vhost: tools.vhost
      outputParameters:
      - type: object
        mapping: $.
    - name: create-virtual-host
      description: Create virtual host
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: management-virtual-hosts.createvhost
      with:
        vhost: tools.vhost
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-virtual-host
      description: Delete virtual host
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: management-virtual-hosts.deletevhost
      with:
        vhost: tools.vhost
      outputParameters:
      - type: object
        mapping: $.