Grafana · Capability

Grafana — Rules

Grafana — Rules. 31 operations. Lead operation: Grafana Route Convert Prometheus Cortex Get Rules. Self-contained Naftiko capability covering one Grafana business surface.

Run with Naftiko GrafanaRules

What You Can Do

GET
Routeconvertprometheuscortexgetrules — Grafana Route Convert Prometheus Cortex Get Rules
/v1/convert/api/prom/rules
POST
Routeconvertprometheuscortexpostrulegroups — Grafana Route Convert Prometheus Cortex Post Rule Groups
/v1/convert/api/prom/rules
POST
Routeconvertprometheuscortexpostrulegroup — Grafana Route Convert Prometheus Cortex Post Rule Group
/v1/convert/api/prom/rules/{namespacetitle}
GET
Routeconvertprometheuscortexgetrulegroup — Grafana Route Convert Prometheus Cortex Get Rule Group
/v1/convert/api/prom/rules/{namespacetitle}/{group}
DELETE
Routeconvertprometheuscortexdeleterulegroup — Grafana Route Convert Prometheus Cortex Delete Rule Group
/v1/convert/api/prom/rules/{namespacetitle}/{group}
GET
Routeconvertprometheusgetrules — Grafana Route Convert Prometheus Get Rules
/v1/convert/prometheus/config/v1/rules
POST
Routeconvertprometheuspostrulegroups — Grafana Route Convert Prometheus Post Rule Groups
/v1/convert/prometheus/config/v1/rules
POST
Routeconvertprometheuspostrulegroup — Grafana Route Convert Prometheus Post Rule Group
/v1/convert/prometheus/config/v1/rules/{namespacetitle}
GET
Routeconvertprometheusgetrulegroup — Grafana Route Convert Prometheus Get Rule Group
/v1/convert/prometheus/config/v1/rules/{namespacetitle}/{group}
DELETE
Routeconvertprometheusdeleterulegroup — Grafana Route Convert Prometheus Delete Rule Group
/v1/convert/prometheus/config/v1/rules/{namespacetitle}/{group}
GET
Getteamlbacrulesapi — Grafana Get Team LBAC Rules Api
/v1/datasources/uid/{uid}/lbac/teams
PUT
Updateteamlbacrulesapi — Grafana Update Team LBAC Rules Api
/v1/datasources/uid/{uid}/lbac/teams
GET
Listrecordingrules — Grafana List Recording Rules
/v1/recording-rules
PUT
Updaterecordingrule — Grafana Update Recording Rule
/v1/recording-rules
POST
Createrecordingrule — Grafana Create Recording Rule
/v1/recording-rules
POST
Testcreaterecordingrule — Grafana Test Create Recording Rule
/v1/recording-rules/test
GET
Getrecordingrulewritetarget — Grafana Get Recording Rule Write Target
/v1/recording-rules/writer
POST
Createrecordingrulewritetarget — Grafana Create Recording Rule Write Target
/v1/recording-rules/writer
DELETE
Deleterecordingrulewritetarget — Grafana Delete Recording Rule Write Target
/v1/recording-rules/writer
DELETE
Deleterecordingrule — Grafana Delete Recording Rule
/v1/recording-rules/{recordingruleid}
GET
Routegetalertrules — Grafana Route Get Alert Rules
/v1/v1/provisioning/alert-rules
POST
Routepostalertrule — Grafana Route Post Alert Rule
/v1/v1/provisioning/alert-rules
GET
Routegetalertrulesexport — Grafana Route Get Alert Rules Export
/v1/v1/provisioning/alert-rules/export
GET
Routegetalertrule — Grafana Route Get Alert Rule
/v1/v1/provisioning/alert-rules/{uid}
PUT
Routeputalertrule — Grafana Route Put Alert Rule
/v1/v1/provisioning/alert-rules/{uid}
DELETE
Routedeletealertrule — Grafana Route Delete Alert Rule
/v1/v1/provisioning/alert-rules/{uid}
GET
Routegetalertruleexport — Grafana Route Get Alert Rule Export
/v1/v1/provisioning/alert-rules/{uid}/export
GET
Routegetalertrulegroup — Grafana Route Get Alert Rule Group
/v1/v1/provisioning/folder/{folderuid}/rule-groups/{group}
PUT
Routeputalertrulegroup — Grafana Route Put Alert Rule Group
/v1/v1/provisioning/folder/{folderuid}/rule-groups/{group}
DELETE
Routedeletealertrulegroup — Grafana Route Delete Alert Rule Group
/v1/v1/provisioning/folder/{folderuid}/rule-groups/{group}
GET
Routegetalertrulegroupexport — Grafana Route Get Alert Rule Group Export
/v1/v1/provisioning/folder/{folderuid}/rule-groups/{group}/export

MCP Tools

grafana-route-convert-prometheus-cortex

Grafana Route Convert Prometheus Cortex Get Rules

read-only idempotent
grafana-route-convert-prometheus-cortex-2

Grafana Route Convert Prometheus Cortex Post Rule Groups

grafana-route-convert-prometheus-cortex-3

Grafana Route Convert Prometheus Cortex Post Rule Group

grafana-route-convert-prometheus-cortex-4

Grafana Route Convert Prometheus Cortex Get Rule Group

read-only idempotent
grafana-route-convert-prometheus-cortex-5

Grafana Route Convert Prometheus Cortex Delete Rule Group

idempotent
grafana-route-convert-prometheus-get

Grafana Route Convert Prometheus Get Rules

read-only idempotent
grafana-route-convert-prometheus-post

Grafana Route Convert Prometheus Post Rule Groups

grafana-route-convert-prometheus-post-2

Grafana Route Convert Prometheus Post Rule Group

grafana-route-convert-prometheus-get-2

Grafana Route Convert Prometheus Get Rule Group

read-only idempotent
grafana-route-convert-prometheus-delete

Grafana Route Convert Prometheus Delete Rule Group

idempotent
grafana-get-team-lbac-rules

Grafana Get Team LBAC Rules Api

read-only idempotent
grafana-update-team-lbac-rules

Grafana Update Team LBAC Rules Api

idempotent
grafana-list-recording-rules

Grafana List Recording Rules

read-only idempotent
grafana-update-recording-rule

Grafana Update Recording Rule

idempotent
grafana-create-recording-rule

Grafana Create Recording Rule

grafana-test-create-recording-rule

Grafana Test Create Recording Rule

read-only
grafana-get-recording-rule-write

Grafana Get Recording Rule Write Target

read-only idempotent
grafana-create-recording-rule-write

Grafana Create Recording Rule Write Target

grafana-delete-recording-rule-write

Grafana Delete Recording Rule Write Target

idempotent
grafana-delete-recording-rule

Grafana Delete Recording Rule

idempotent
grafana-route-get-alert-rules

Grafana Route Get Alert Rules

read-only idempotent
grafana-route-post-alert-rule

Grafana Route Post Alert Rule

grafana-route-get-alert-rules-2

Grafana Route Get Alert Rules Export

read-only idempotent
grafana-route-get-alert-rule

Grafana Route Get Alert Rule

read-only idempotent
grafana-route-put-alert-rule

Grafana Route Put Alert Rule

idempotent
grafana-route-delete-alert-rule

Grafana Route Delete Alert Rule

idempotent
grafana-route-get-alert-rule-2

Grafana Route Get Alert Rule Export

read-only idempotent
grafana-route-get-alert-rule-3

Grafana Route Get Alert Rule Group

read-only idempotent
grafana-route-put-alert-rule-2

Grafana Route Put Alert Rule Group

idempotent
grafana-route-delete-alert-rule-2

Grafana Route Delete Alert Rule Group

idempotent
grafana-route-get-alert-rule-4

Grafana Route Get Alert Rule Group Export

read-only idempotent

Capability Spec

grafana-rules.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Grafana — Rules
  description: 'Grafana — Rules. 31 operations. Lead operation: Grafana Route Convert Prometheus Cortex Get Rules. Self-contained
    Naftiko capability covering one Grafana business surface.'
  tags:
  - Grafana
  - Rules
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GRAFANA_API_KEY: GRAFANA_API_KEY
capability:
  consumes:
  - type: http
    namespace: grafana-rules
    baseUri: http://{defaultHost}
    description: Grafana — Rules business capability. Self-contained, no shared references.
    resources:
    - name: convert-api-prom-rules
      path: /convert/api/prom/rules
      operations:
      - name: routeconvertprometheuscortexgetrules
        method: GET
        description: Grafana Route Convert Prometheus Cortex Get Rules
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: routeconvertprometheuscortexpostrulegroups
        method: POST
        description: Grafana Route Convert Prometheus Cortex Post Rule Groups
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Content-Type
          in: header
          type: string
          required: true
    - name: convert-api-prom-rules-NamespaceTitle
      path: /convert/api/prom/rules/{NamespaceTitle}
      operations:
      - name: routeconvertprometheuscortexpostrulegroup
        method: POST
        description: Grafana Route Convert Prometheus Cortex Post Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: NamespaceTitle
          in: path
          type: string
          required: true
        - name: x-grafana-alerting-datasource-uid
          in: header
          type: string
        - name: x-grafana-alerting-recording-rules-paused
          in: header
          type: boolean
        - name: x-grafana-alerting-alert-rules-paused
          in: header
          type: boolean
        - name: x-grafana-alerting-target-datasource-uid
          in: header
          type: string
        - name: x-grafana-alerting-folder-uid
          in: header
          type: string
        - name: x-grafana-alerting-notification-settings
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: convert-api-prom-rules-NamespaceTitle-Group
      path: /convert/api/prom/rules/{NamespaceTitle}/{Group}
      operations:
      - name: routeconvertprometheuscortexgetrulegroup
        method: GET
        description: Grafana Route Convert Prometheus Cortex Get Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: NamespaceTitle
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
      - name: routeconvertprometheuscortexdeleterulegroup
        method: DELETE
        description: Grafana Route Convert Prometheus Cortex Delete Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: NamespaceTitle
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
    - name: convert-prometheus-config-v1-rules
      path: /convert/prometheus/config/v1/rules
      operations:
      - name: routeconvertprometheusgetrules
        method: GET
        description: Grafana Route Convert Prometheus Get Rules
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: routeconvertprometheuspostrulegroups
        method: POST
        description: Grafana Route Convert Prometheus Post Rule Groups
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Content-Type
          in: header
          type: string
          required: true
    - name: convert-prometheus-config-v1-rules-NamespaceTitle
      path: /convert/prometheus/config/v1/rules/{NamespaceTitle}
      operations:
      - name: routeconvertprometheuspostrulegroup
        method: POST
        description: Grafana Route Convert Prometheus Post Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: NamespaceTitle
          in: path
          type: string
          required: true
        - name: x-grafana-alerting-datasource-uid
          in: header
          type: string
        - name: x-grafana-alerting-recording-rules-paused
          in: header
          type: boolean
        - name: x-grafana-alerting-alert-rules-paused
          in: header
          type: boolean
        - name: x-grafana-alerting-target-datasource-uid
          in: header
          type: string
        - name: x-grafana-alerting-folder-uid
          in: header
          type: string
        - name: x-grafana-alerting-notification-settings
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: convert-prometheus-config-v1-rules-NamespaceTitle-Group
      path: /convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}
      operations:
      - name: routeconvertprometheusgetrulegroup
        method: GET
        description: Grafana Route Convert Prometheus Get Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: NamespaceTitle
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
      - name: routeconvertprometheusdeleterulegroup
        method: DELETE
        description: Grafana Route Convert Prometheus Delete Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: NamespaceTitle
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
    - name: datasources-uid-uid-lbac-teams
      path: /datasources/uid/{uid}/lbac/teams
      operations:
      - name: getteamlbacrulesapi
        method: GET
        description: Grafana Get Team LBAC Rules Api
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: uid
          in: path
          type: string
          required: true
      - name: updateteamlbacrulesapi
        method: PUT
        description: Grafana Update Team LBAC Rules Api
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: uid
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: recording-rules
      path: /recording-rules
      operations:
      - name: listrecordingrules
        method: GET
        description: Grafana List Recording Rules
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updaterecordingrule
        method: PUT
        description: Grafana Update Recording Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: createrecordingrule
        method: POST
        description: Grafana Create Recording Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: recording-rules-test
      path: /recording-rules/test
      operations:
      - name: testcreaterecordingrule
        method: POST
        description: Grafana Test Create Recording Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: recording-rules-writer
      path: /recording-rules/writer
      operations:
      - name: getrecordingrulewritetarget
        method: GET
        description: Grafana Get Recording Rule Write Target
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createrecordingrulewritetarget
        method: POST
        description: Grafana Create Recording Rule Write Target
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleterecordingrulewritetarget
        method: DELETE
        description: Grafana Delete Recording Rule Write Target
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: recording-rules-recordingRuleID
      path: /recording-rules/{recordingRuleID}
      operations:
      - name: deleterecordingrule
        method: DELETE
        description: Grafana Delete Recording Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: recordingRuleID
          in: path
          type: integer
          required: true
    - name: v1-provisioning-alert-rules
      path: /v1/provisioning/alert-rules
      operations:
      - name: routegetalertrules
        method: GET
        description: Grafana Route Get Alert Rules
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: routepostalertrule
        method: POST
        description: Grafana Route Post Alert Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Disable-Provenance
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-provisioning-alert-rules-export
      path: /v1/provisioning/alert-rules/export
      operations:
      - name: routegetalertrulesexport
        method: GET
        description: Grafana Route Get Alert Rules Export
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: download
          in: query
          type: boolean
          description: Whether to initiate a download of the file or not.
        - name: format
          in: query
          type: string
          description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the
            query parameter will take precedence.
        - name: folderUid
          in: query
          type: array
          description: UIDs of folders from which to export rules
        - name: group
          in: query
          type: string
          description: Name of group of rules to export. Must be specified only together with a single folder UID
        - name: ruleUid
          in: query
          type: string
          description: UID of alert rule to export. If specified, parameters folderUid and group must be empty.
    - name: v1-provisioning-alert-rules-UID
      path: /v1/provisioning/alert-rules/{UID}
      operations:
      - name: routegetalertrule
        method: GET
        description: Grafana Route Get Alert Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: UID
          in: path
          type: string
          description: Alert rule UID
          required: true
      - name: routeputalertrule
        method: PUT
        description: Grafana Route Put Alert Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: UID
          in: path
          type: string
          description: Alert rule UID
          required: true
        - name: X-Disable-Provenance
          in: header
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: routedeletealertrule
        method: DELETE
        description: Grafana Route Delete Alert Rule
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: UID
          in: path
          type: string
          description: Alert rule UID
          required: true
        - name: X-Disable-Provenance
          in: header
          type: string
    - name: v1-provisioning-alert-rules-UID-export
      path: /v1/provisioning/alert-rules/{UID}/export
      operations:
      - name: routegetalertruleexport
        method: GET
        description: Grafana Route Get Alert Rule Export
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: download
          in: query
          type: boolean
          description: Whether to initiate a download of the file or not.
        - name: format
          in: query
          type: string
          description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the
            query parameter will take precedence.
        - name: UID
          in: path
          type: string
          description: Alert rule UID
          required: true
    - name: v1-provisioning-folder-FolderUID-rule-groups-Group
      path: /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}
      operations:
      - name: routegetalertrulegroup
        method: GET
        description: Grafana Route Get Alert Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: FolderUID
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
      - name: routeputalertrulegroup
        method: PUT
        description: Grafana Route Put Alert Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: X-Disable-Provenance
          in: header
          type: string
        - name: FolderUID
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: routedeletealertrulegroup
        method: DELETE
        description: Grafana Route Delete Alert Rule Group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: FolderUID
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
    - name: v1-provisioning-folder-FolderUID-rule-groups-Group-export
      path: /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export
      operations:
      - name: routegetalertrulegroupexport
        method: GET
        description: Grafana Route Get Alert Rule Group Export
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: download
          in: query
          type: boolean
          description: Whether to initiate a download of the file or not.
        - name: format
          in: query
          type: string
          description: Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the
            query parameter will take precedence.
        - name: FolderUID
          in: path
          type: string
          required: true
        - name: Group
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.GRAFANA_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: grafana-rules-rest
    port: 8080
    description: REST adapter for Grafana — Rules. One Spectral-compliant resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/convert/api/prom/rules
      name: convert-api-prom-rules
      description: REST surface for convert-api-prom-rules.
      operations:
      - method: GET
        name: routeconvertprometheuscortexgetrules
        description: Grafana Route Convert Prometheus Cortex Get Rules
        call: grafana-rules.routeconvertprometheuscortexgetrules
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: routeconvertprometheuscortexpostrulegroups
        description: Grafana Route Convert Prometheus Cortex Post Rule Groups
        call: grafana-rules.routeconvertprometheuscortexpostrulegroups
        with:
          Content-Type: rest.Content-Type
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/convert/api/prom/rules/{namespacetitle}
      name: convert-api-prom-rules-namespacetitle
      description: REST surface for convert-api-prom-rules-NamespaceTitle.
      operations:
      - method: POST
        name: routeconvertprometheuscortexpostrulegroup
        description: Grafana Route Convert Prometheus Cortex Post Rule Group
        call: grafana-rules.routeconvertprometheuscortexpostrulegroup
        with:
          NamespaceTitle: rest.NamespaceTitle
          x-grafana-alerting-datasource-uid: rest.x-grafana-alerting-datasource-uid
          x-grafana-alerting-recording-rules-paused: rest.x-grafana-alerting-recording-rules-paused
          x-grafana-alerting-alert-rules-paused: rest.x-grafana-alerting-alert-rules-paused
          x-grafana-alerting-target-datasource-uid: rest.x-grafana-alerting-target-datasource-uid
          x-grafana-alerting-folder-uid: rest.x-grafana-alerting-folder-uid
          x-grafana-alerting-notification-settings: rest.x-grafana-alerting-notification-settings
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/convert/api/prom/rules/{namespacetitle}/{group}
      name: convert-api-prom-rules-namespacetitle-group
      description: REST surface for convert-api-prom-rules-NamespaceTitle-Group.
      operations:
      - method: GET
        name: routeconvertprometheuscortexgetrulegroup
        description: Grafana Route Convert Prometheus Cortex Get Rule Group
        call: grafana-rules.routeconvertprometheuscortexgetrulegroup
        with:
          NamespaceTitle: rest.NamespaceTitle
          Group: rest.Group
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: routeconvertprometheuscortexdeleterulegroup
        description: Grafana Route Convert Prometheus Cortex Delete Rule Group
        call: grafana-rules.routeconvertprometheuscortexdeleterulegroup
        with:
          NamespaceTitle: rest.NamespaceTitle
          Group: rest.Group
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/convert/prometheus/config/v1/rules
      name: convert-prometheus-config-v1-rules
      description: REST surface for convert-prometheus-config-v1-rules.
      operations:
      - method: GET
        name: routeconvertprometheusgetrules
        description: Grafana Route Convert Prometheus Get Rules
        call: grafana-rules.routeconvertprometheusgetrules
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: routeconvertprometheuspostrulegroups
        description: Grafana Route Convert Prometheus Post Rule Groups
        call: grafana-rules.routeconvertprometheuspostrulegroups
        with:
          Content-Type: rest.Content-Type
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/convert/prometheus/config/v1/rules/{namespacetitle}
      name: convert-prometheus-config-v1-rules-namespacetitle
      description: REST surface for convert-prometheus-config-v1-rules-NamespaceTitle.
      operations:
      - method: POST
        name: routeconvertprometheuspostrulegroup
        description: Grafana Route Convert Prometheus Post Rule Group
        call: grafana-rules.routeconvertprometheuspostrulegroup
        with:
          NamespaceTitle: rest.NamespaceTitle
          x-grafana-alerting-datasource-uid: rest.x-grafana-alerting-datasource-uid
          x-grafana-alerting-recording-rules-paused: rest.x-grafana-alerting-recording-rules-paused
          x-grafana-alerting-alert-rules-paused: rest.x-grafana-alerting-alert-rules-paused
          x-grafana-alerting-target-datasource-uid: rest.x-grafana-alerting-target-datasource-uid
          x-grafana-alerting-folder-uid: rest.x-grafana-alerting-folder-uid
          x-grafana-alerting-notification-settings: rest.x-grafana-alerting-notification-settings
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/convert/prometheus/config/v1/rules/{namespacetitle}/{group}
      name: convert-prometheus-config-v1-rules-namespacetitle-group
      description: REST surface for convert-prometheus-config-v1-rules-NamespaceTitle-Group.
      operations:
      - method: GET
        name: routeconvertprometheusgetrulegroup
        description: Grafana Route Convert Prometheus Get Rule Group
        call: grafana-rules.routeconvertprometheusgetrulegroup
        with:
          NamespaceTitle: rest.NamespaceTitle
          Group: rest.Group
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: routeconvertprometheusdeleterulegroup
        description: Grafana Route Convert Prometheus Delete Rule Group
        call: grafana-rules.routeconvertprometheusdeleterulegroup
        with:
          NamespaceTitle: rest.NamespaceTitle
          Group: rest.Group
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/datasources/uid/{uid}/lbac/teams
      name: datasources-uid-uid-lbac-teams
      description: REST surface for datasources-uid-uid-lbac-teams.
      operations:
      - method: GET
        name: getteamlbacrulesapi
        description: Grafana Get Team LBAC Rules Api
        call: grafana-rules.getteamlbacrulesapi
        with:
          uid: rest.uid
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateteamlbacrulesapi
        description: Grafana Update Team LBAC Rules Api
        call: grafana-rules.updateteamlbacrulesapi
        with:
          uid: rest.uid
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/recording-rules
      name: recording-rules
      description: REST surface for recording-rules.
      operations:
      - method: GET
        name: listrecordingrules
        description: Grafana List Recording Rules
        call: grafana-rules.listrecordingrules
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updaterecordingrule
        description: Grafana Update Recording Rule
        call: grafana-rules.updaterecordingrule
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createrecordingrule
        description: Grafana Create Recording Rule
        call: grafana-rules.createrecordingrule
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/recording-rules/test
      name: recording-rules-test
      description: REST surface for recording-rules-test.
      operations:
      - method: POST
        name: testcreaterecordingrule
        description: Grafana Test Create Recording Rule
        call: grafana-rules.testcreaterecordingrule
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/recording-rules/writer
      name: recording-rules-writer
      description: REST surface for recording-rules-writer.
      operations:
      - method: GET
        name: getrecordingrulewritetarget
        description: Grafana Get Recording Rule Write Target
        call: grafana-rules.getrecordingrulewritetarget
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createrecordingrulewritetarget
        description: Grafana Create Recording Rule Write Target
        call: grafana-rules.createrecordingrulewritetarget
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleterecordingrulewritetarget
        description: Grafana Delete Recording Rule Write Target
        call: grafana-rules.deleterecordingrulewritetarget
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/recording-rules/{recordingruleid}
      name: recording-rules-recordingruleid
      description: REST surface for recording-rules-recordingRuleID.
      operations:
      - method: DELETE
        name: deleterecordingrule
        description: Grafana Delete Recording Rule
        call: grafana-rules.deleterecordingrule
        with:
          recordingRuleID: rest.recordingRuleID
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/provisioning/alert-rules
      name: v1-provisioning-alert-rules
      description: REST surface for v1-provisioning-alert-rules.
      operations:
      - method: GET
        name: routegetalertrules
        description: Grafana Route Get Alert Rules
        call: grafana-rules.routegetalertrules
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: routepostalertrule
        description: Grafana Route Post Alert Rule
        call: grafana-rules.routepostalertrule
        with:
          X-Disable-Provenance: rest.X-Disable-Provenance
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/provisioning/alert-rules/export
      name: v1-provisioning-alert-rules-export
      description: REST surface for v1-provisioning-alert-rules-export.
      operations:
      - method: GET
        name: routegetalertrulesexport
        description: Grafana Route Get Alert Rules Export
        call: grafana-rules.routegetalertrulesexport
        with:
          download: rest.download
          format: rest.format
          folderUid: rest.folderUid
          group: rest.group
          ruleUid: rest.ruleUid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/provisioning/alert-rules/{uid}
      name: v1-provisioning-alert-rules-uid
      description: REST surface for v1-provisioning-alert-rules-UID.
      operations:
      - method: GET
        name: routegetalertrule
        description: Grafana Route Get Alert Rule
        call: grafana-rules.routegetalertrule
        with:
          UID: rest.UID
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: routeputalertrule
        description: Grafana Route Put Alert Rule
        call: grafana-rules.routeputalertrule
        with:
          UID: rest.UID
          X-Disable-Provenance: rest.X-Disable-Provenance
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: routedeletealertrule
        description: Grafana Route Delete Alert Rule
        call: grafana-rules.routedeletealertrule
        with:
          UID: rest.UID
          X-Disable-Provenance: rest.X-Disable-Provenance
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/provisioning/alert-rules/{uid}/export
      name: v1-provisioning-alert-rules-uid-export
      description: REST surface for v1-provisioning-alert-rules-UID-export.
      operations:
      - method: GET
        name: routegetalertruleexport
        description: Grafana Route Get Alert Rule Export
        call: grafana-rules.routegetalertruleexport
        with:
          download: rest.download
          format: rest.format
          UID: rest.UID
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/provisioning/folder/{folderuid}/rule-groups/{group}
      name: v1-provisioning-folder-folderuid-rule-groups-group
      description: REST surface for v1-provisioning-folder-FolderUID-rule-groups-Group.
      operations:
      - method: GET
        name: routegetalertrulegroup
        description: Grafana Route Get Alert Rule Group
        call: grafana-rules.routegetalertrulegroup
        with:
          FolderUID: rest.FolderUID
          Group: rest.Group
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: routeputalertrulegroup
        description: Grafana Route Put Alert Rule Group
        call: grafana-rules.routeputalertrulegroup
        with:
          X-Disable-Provenance: rest.X-Disable-Provenance
          FolderUID: rest.FolderUID
          Group: rest.Group
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: routedeletealertrulegroup
        description: Grafana Route Delete Alert Rule Group
        call: grafana-rules.routedeletealertrulegroup
        with:
          FolderUID: rest.FolderUID
          Group: rest.Group
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/provisioning/folder/{folderuid}/rule-groups/{group}/export
      name: v1-provisioning-folder-folderuid-rule-groups-group-export
      description: REST surface for v1-provisioning-folder-FolderUID-rule-groups-Group-export.
      operations:
      - method: GET
        name: routegetalertrulegroupexport
        description: Grafana Route Get Alert Rule Group Export
        call: grafana-rules.routegetalertrulegroupexport
        with:
          download: rest.download
          format: rest.format
          FolderUID: rest.FolderUID
          Group: rest.Group
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: grafana-rules-mcp
    port: 9090
    transport: http
    description: MCP adapter for Grafana — Rules. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: grafana-route-convert-prometheus-cortex
     

# --- truncated at 32 KB (44 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/grafana/refs/heads/main/capabilities/grafana-rules.yaml