Prometheus · Capability

Prometheus Alertmanager API — Alerts

Prometheus Alertmanager API — Alerts. 3 operations. Lead operation: Prometheus Get active alerts. Self-contained Naftiko capability covering one Prometheus business surface.

Run with Naftiko PrometheusAlerts

What You Can Do

GET
Getalerts — Prometheus Get active alerts
/v1/api/v2/alerts
POST
Postalerts — Prometheus Post alerts
/v1/api/v2/alerts
GET
Getalertgroups — Prometheus Get alert groups
/v1/api/v2/alerts/groups

MCP Tools

prometheus-get-active-alerts

Prometheus Get active alerts

read-only idempotent
prometheus-post-alerts

Prometheus Post alerts

prometheus-get-alert-groups

Prometheus Get alert groups

read-only idempotent

Capability Spec

alertmanager-alerts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Prometheus Alertmanager API — Alerts
  description: 'Prometheus Alertmanager API — Alerts. 3 operations. Lead operation: Prometheus Get active alerts. Self-contained
    Naftiko capability covering one Prometheus business surface.'
  tags:
  - Prometheus
  - Alerts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PROMETHEUS_API_KEY: PROMETHEUS_API_KEY
capability:
  consumes:
  - type: http
    namespace: alertmanager-alerts
    baseUri: http://{host}:{port}
    description: Prometheus Alertmanager API — Alerts business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-alerts
      path: /api/v2/alerts
      operations:
      - name: getalerts
        method: GET
        description: Prometheus Get active alerts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: active
          in: query
          type: boolean
          description: Only return active (non-silenced, non-inhibited) alerts.
        - name: silenced
          in: query
          type: boolean
          description: Include silenced alerts in results.
        - name: inhibited
          in: query
          type: boolean
          description: Include inhibited alerts in results.
        - name: unprocessed
          in: query
          type: boolean
          description: Include unprocessed alerts that have not yet been routed.
        - name: filter
          in: query
          type: array
          description: A list of label matchers to filter alerts by. Matchers use the syntax label=value, label!=value, label=~regex,
            or label!~regex.
        - name: receiver
          in: query
          type: string
          description: Filter by receiver name.
      - name: postalerts
        method: POST
        description: Prometheus Post alerts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-alerts-groups
      path: /api/v2/alerts/groups
      operations:
      - name: getalertgroups
        method: GET
        description: Prometheus Get alert groups
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: active
          in: query
          type: boolean
          description: Include active alerts.
        - name: silenced
          in: query
          type: boolean
          description: Include silenced alerts.
        - name: inhibited
          in: query
          type: boolean
          description: Include inhibited alerts.
        - name: filter
          in: query
          type: array
          description: Label matchers to filter by.
        - name: receiver
          in: query
          type: string
          description: Filter by receiver name.
  exposes:
  - type: rest
    namespace: alertmanager-alerts-rest
    port: 8080
    description: REST adapter for Prometheus Alertmanager API — Alerts. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/v2/alerts
      name: api-v2-alerts
      description: REST surface for api-v2-alerts.
      operations:
      - method: GET
        name: getalerts
        description: Prometheus Get active alerts
        call: alertmanager-alerts.getalerts
        with:
          active: rest.active
          silenced: rest.silenced
          inhibited: rest.inhibited
          unprocessed: rest.unprocessed
          filter: rest.filter
          receiver: rest.receiver
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postalerts
        description: Prometheus Post alerts
        call: alertmanager-alerts.postalerts
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/alerts/groups
      name: api-v2-alerts-groups
      description: REST surface for api-v2-alerts-groups.
      operations:
      - method: GET
        name: getalertgroups
        description: Prometheus Get alert groups
        call: alertmanager-alerts.getalertgroups
        with:
          active: rest.active
          silenced: rest.silenced
          inhibited: rest.inhibited
          filter: rest.filter
          receiver: rest.receiver
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: alertmanager-alerts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Prometheus Alertmanager API — Alerts. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: prometheus-get-active-alerts
      description: Prometheus Get active alerts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: alertmanager-alerts.getalerts
      with:
        active: tools.active
        silenced: tools.silenced
        inhibited: tools.inhibited
        unprocessed: tools.unprocessed
        filter: tools.filter
        receiver: tools.receiver
      outputParameters:
      - type: object
        mapping: $.
    - name: prometheus-post-alerts
      description: Prometheus Post alerts
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: alertmanager-alerts.postalerts
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: prometheus-get-alert-groups
      description: Prometheus Get alert groups
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: alertmanager-alerts.getalertgroups
      with:
        active: tools.active
        silenced: tools.silenced
        inhibited: tools.inhibited
        filter: tools.filter
        receiver: tools.receiver
      outputParameters:
      - type: object
        mapping: $.