naftiko: 1.0.0-alpha2 info: label: Grafana — Patch description: 'Grafana — Patch. 4 operations. Lead operation: Grafana Patch Annotation. Self-contained Naftiko capability covering one Grafana business surface.' tags: - Grafana - Patch created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GRAFANA_API_KEY: GRAFANA_API_KEY capability: consumes: - type: http namespace: grafana-patch baseUri: http://{defaultHost} description: Grafana — Patch business capability. Self-contained, no shared references. resources: - name: annotations-annotation_id path: /annotations/{annotation_id} operations: - name: patchannotation method: PATCH description: Grafana Patch Annotation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: annotation_id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: org-preferences path: /org/preferences operations: - name: patchorgpreferences method: PATCH description: Grafana Patch Org Preferences outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: query-history-query_history_uid path: /query-history/{query_history_uid} operations: - name: patchquerycomment method: PATCH description: Grafana Patch Query Comment outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query_history_uid in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: user-preferences path: /user/preferences operations: - name: patchuserpreferences method: PATCH description: Grafana Patch User Preferences outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true authentication: type: apikey key: Authorization value: '{{env.GRAFANA_API_KEY}}' placement: header exposes: - type: rest namespace: grafana-patch-rest port: 8080 description: REST adapter for Grafana — Patch. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/annotations/{annotation-id} name: annotations-annotation-id description: REST surface for annotations-annotation_id. operations: - method: PATCH name: patchannotation description: Grafana Patch Annotation call: grafana-patch.patchannotation with: annotation_id: rest.annotation_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/org/preferences name: org-preferences description: REST surface for org-preferences. operations: - method: PATCH name: patchorgpreferences description: Grafana Patch Org Preferences call: grafana-patch.patchorgpreferences with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/query-history/{query-history-uid} name: query-history-query-history-uid description: REST surface for query-history-query_history_uid. operations: - method: PATCH name: patchquerycomment description: Grafana Patch Query Comment call: grafana-patch.patchquerycomment with: query_history_uid: rest.query_history_uid body: rest.body outputParameters: - type: object mapping: $. - path: /v1/user/preferences name: user-preferences description: REST surface for user-preferences. operations: - method: PATCH name: patchuserpreferences description: Grafana Patch User Preferences call: grafana-patch.patchuserpreferences with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: grafana-patch-mcp port: 9090 transport: http description: MCP adapter for Grafana — Patch. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: grafana-patch-annotation description: Grafana Patch Annotation hints: readOnly: false destructive: false idempotent: true call: grafana-patch.patchannotation with: annotation_id: tools.annotation_id body: tools.body outputParameters: - type: object mapping: $. - name: grafana-patch-org-preferences description: Grafana Patch Org Preferences hints: readOnly: false destructive: false idempotent: true call: grafana-patch.patchorgpreferences with: body: tools.body outputParameters: - type: object mapping: $. - name: grafana-patch-query-comment description: Grafana Patch Query Comment hints: readOnly: false destructive: false idempotent: true call: grafana-patch.patchquerycomment with: query_history_uid: tools.query_history_uid body: tools.body outputParameters: - type: object mapping: $. - name: grafana-patch-user-preferences description: Grafana Patch User Preferences hints: readOnly: false destructive: false idempotent: true call: grafana-patch.patchuserpreferences with: body: tools.body outputParameters: - type: object mapping: $.