naftiko: 1.0.0-alpha2 info: label: Grafana — Alerts description: 'Grafana — Alerts. 11 operations. Lead operation: Grafana Route Get Alert Rules. Self-contained Naftiko capability covering one Grafana business surface.' tags: - Grafana - Alerts created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GRAFANA_API_KEY: GRAFANA_API_KEY capability: consumes: - type: http namespace: grafana-alerts-2 baseUri: http://{defaultHost} description: Grafana — Alerts business capability. Self-contained, no shared references. resources: - 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-alerts-2-rest port: 8080 description: REST adapter for Grafana — Alerts. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - 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-alerts-2.routegetalertrules outputParameters: - type: object mapping: $. - method: POST name: routepostalertrule description: Grafana Route Post Alert Rule call: grafana-alerts-2.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-alerts-2.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-alerts-2.routegetalertrule with: UID: rest.UID outputParameters: - type: object mapping: $. - method: PUT name: routeputalertrule description: Grafana Route Put Alert Rule call: grafana-alerts-2.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-alerts-2.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-alerts-2.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-alerts-2.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-alerts-2.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-alerts-2.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-alerts-2.routegetalertrulegroupexport with: download: rest.download format: rest.format FolderUID: rest.FolderUID Group: rest.Group outputParameters: - type: object mapping: $. - type: mcp namespace: grafana-alerts-2-mcp port: 9090 transport: http description: MCP adapter for Grafana — Alerts. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: grafana-route-get-alert-rules description: Grafana Route Get Alert Rules hints: readOnly: true destructive: false idempotent: true call: grafana-alerts-2.routegetalertrules outputParameters: - type: object mapping: $. - name: grafana-route-post-alert-rule description: Grafana Route Post Alert Rule hints: readOnly: false destructive: false idempotent: false call: grafana-alerts-2.routepostalertrule with: X-Disable-Provenance: tools.X-Disable-Provenance body: tools.body outputParameters: - type: object mapping: $. - name: grafana-route-get-alert-rules-2 description: Grafana Route Get Alert Rules Export hints: readOnly: true destructive: false idempotent: true call: grafana-alerts-2.routegetalertrulesexport with: download: tools.download format: tools.format folderUid: tools.folderUid group: tools.group ruleUid: tools.ruleUid outputParameters: - type: object mapping: $. - name: grafana-route-get-alert-rule description: Grafana Route Get Alert Rule hints: readOnly: true destructive: false idempotent: true call: grafana-alerts-2.routegetalertrule with: UID: tools.UID outputParameters: - type: object mapping: $. - name: grafana-route-put-alert-rule description: Grafana Route Put Alert Rule hints: readOnly: false destructive: false idempotent: true call: grafana-alerts-2.routeputalertrule with: UID: tools.UID X-Disable-Provenance: tools.X-Disable-Provenance body: tools.body outputParameters: - type: object mapping: $. - name: grafana-route-delete-alert-rule description: Grafana Route Delete Alert Rule hints: readOnly: false destructive: true idempotent: true call: grafana-alerts-2.routedeletealertrule with: UID: tools.UID X-Disable-Provenance: tools.X-Disable-Provenance outputParameters: - type: object mapping: $. - name: grafana-route-get-alert-rule-2 description: Grafana Route Get Alert Rule Export hints: readOnly: true destructive: false idempotent: true call: grafana-alerts-2.routegetalertruleexport with: download: tools.download format: tools.format UID: tools.UID outputParameters: - type: object mapping: $. - name: grafana-route-get-alert-rule-3 description: Grafana Route Get Alert Rule Group hints: readOnly: true destructive: false idempotent: true call: grafana-alerts-2.routegetalertrulegroup with: FolderUID: tools.FolderUID Group: tools.Group outputParameters: - type: object mapping: $. - name: grafana-route-put-alert-rule-2 description: Grafana Route Put Alert Rule Group hints: readOnly: false destructive: false idempotent: true call: grafana-alerts-2.routeputalertrulegroup with: X-Disable-Provenance: tools.X-Disable-Provenance FolderUID: tools.FolderUID Group: tools.Group body: tools.body outputParameters: - type: object mapping: $. - name: grafana-route-delete-alert-rule-2 description: Grafana Route Delete Alert Rule Group hints: readOnly: false destructive: true idempotent: true call: grafana-alerts-2.routedeletealertrulegroup with: FolderUID: tools.FolderUID Group: tools.Group outputParameters: - type: object mapping: $. - name: grafana-route-get-alert-rule-4 description: Grafana Route Get Alert Rule Group Export hints: readOnly: true destructive: false idempotent: true call: grafana-alerts-2.routegetalertrulegroupexport with: download: tools.download format: tools.format FolderUID: tools.FolderUID Group: tools.Group outputParameters: - type: object mapping: $.