naftiko: 1.0.0-alpha2 info: label: openobserve — Metrics description: 'openobserve — Metrics. 9 operations. Lead operation: Ingest metrics via JSON. Self-contained Naftiko capability covering one Openobserve business surface.' tags: - Openobserve - Metrics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: OPENOBSERVE_API_KEY: OPENOBSERVE_API_KEY capability: consumes: - type: http namespace: openobserve-metrics baseUri: '' description: openobserve — Metrics business capability. Self-contained, no shared references. resources: - name: api-org_id-ingest-metrics-_json path: /api/{org_id}/ingest/metrics/_json operations: - name: metricsingestionjson method: POST description: Ingest metrics via JSON outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: body in: body type: object description: Request body (JSON). required: true - name: api-org_id-prometheus-api-v1-format_query path: /api/{org_id}/prometheus/api/v1/format_query operations: - name: prometheusformatquery method: GET description: Format Prometheus query outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string description: Prometheus expression query string. required: true - name: org_id in: path type: string required: true - name: api-org_id-prometheus-api-v1-label-label_name-values path: /api/{org_id}/prometheus/api/v1/label/{label_name}/values operations: - name: prometheuslabelvalues method: GET description: Get label values outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: label_name in: path type: string description: Label name required: true - name: match[] in: query type: string description: Series selector argument that selects the series from which to read the label values required: true - name: start in: query type: string description: ': Start timestamp' - name: end in: query type: string description: ': End timestamp' - name: api-org_id-prometheus-api-v1-labels path: /api/{org_id}/prometheus/api/v1/labels operations: - name: prometheuslabels method: GET description: Get metric label names outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: match[] in: query type: string description: Series selector argument that selects the series from which to read the label names required: true - name: start in: query type: string description: ': Start timestamp' - name: end in: query type: string description: ': End timestamp' - name: api-org_id-prometheus-api-v1-metadata path: /api/{org_id}/prometheus/api/v1/metadata operations: - name: prometheusmetadata method: GET description: Get metric metadata outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: limit in: query type: string description: Maximum number of metrics to return required: true - name: metric in: query type: string description: A metric name to filter metadata for. All metric metadata is retrieved if left empty - name: api-org_id-prometheus-api-v1-query path: /api/{org_id}/prometheus/api/v1/query operations: - name: prometheusquery method: GET description: Execute Prometheus instant query outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: query in: query type: string description: Prometheus expression query string required: true - name: time in: query type: string description: ': Evaluation timestamp. Optional' - name: timeout in: query type: string description: Evaluation timeout - name: api-org_id-prometheus-api-v1-query_range path: /api/{org_id}/prometheus/api/v1/query_range operations: - name: prometheusrangequery method: GET description: Execute Prometheus range query outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: query in: query type: string description: Prometheus expression query string required: true - name: start in: query type: string description: ': Start timestamp, inclusive' required: true - name: end in: query type: string description: ': End timestamp, inclusive' required: true - name: step in: query type: string description: Query resolution step width in duration format or float number of seconds - name: timeout in: query type: string description: Evaluation timeout - name: api-org_id-prometheus-api-v1-series path: /api/{org_id}/prometheus/api/v1/series operations: - name: prometheusseries method: GET description: Find metric series outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: match[] in: query type: string description: ': Series selector argument that selects the series to return' required: true - name: start in: query type: string description: ': Start timestamp' - name: end in: query type: string description: ': End timestamp' - name: api-org_id-prometheus-api-v1-write path: /api/{org_id}/prometheus/api/v1/write operations: - name: prometheusremotewrite method: POST description: Ingest Prometheus metrics outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: Organization name required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: apikey key: Authorization value: '{{env.OPENOBSERVE_API_KEY}}' placement: header exposes: - type: rest namespace: openobserve-metrics-rest port: 8080 description: REST adapter for openobserve — Metrics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/{org-id}/ingest/metrics/json name: api-org-id-ingest-metrics-json description: REST surface for api-org_id-ingest-metrics-_json. operations: - method: POST name: metricsingestionjson description: Ingest metrics via JSON call: openobserve-metrics.metricsingestionjson with: org_id: rest.org_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/format-query name: api-org-id-prometheus-api-v1-format-query description: REST surface for api-org_id-prometheus-api-v1-format_query. operations: - method: GET name: prometheusformatquery description: Format Prometheus query call: openobserve-metrics.prometheusformatquery with: query: rest.query org_id: rest.org_id outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/label/{label-name}/values name: api-org-id-prometheus-api-v1-label-label-name-values description: REST surface for api-org_id-prometheus-api-v1-label-label_name-values. operations: - method: GET name: prometheuslabelvalues description: Get label values call: openobserve-metrics.prometheuslabelvalues with: org_id: rest.org_id label_name: rest.label_name match[]: rest.match[] start: rest.start end: rest.end outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/labels name: api-org-id-prometheus-api-v1-labels description: REST surface for api-org_id-prometheus-api-v1-labels. operations: - method: GET name: prometheuslabels description: Get metric label names call: openobserve-metrics.prometheuslabels with: org_id: rest.org_id match[]: rest.match[] start: rest.start end: rest.end outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/metadata name: api-org-id-prometheus-api-v1-metadata description: REST surface for api-org_id-prometheus-api-v1-metadata. operations: - method: GET name: prometheusmetadata description: Get metric metadata call: openobserve-metrics.prometheusmetadata with: org_id: rest.org_id limit: rest.limit metric: rest.metric outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/query name: api-org-id-prometheus-api-v1-query description: REST surface for api-org_id-prometheus-api-v1-query. operations: - method: GET name: prometheusquery description: Execute Prometheus instant query call: openobserve-metrics.prometheusquery with: org_id: rest.org_id query: rest.query time: rest.time timeout: rest.timeout outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/query-range name: api-org-id-prometheus-api-v1-query-range description: REST surface for api-org_id-prometheus-api-v1-query_range. operations: - method: GET name: prometheusrangequery description: Execute Prometheus range query call: openobserve-metrics.prometheusrangequery with: org_id: rest.org_id query: rest.query start: rest.start end: rest.end step: rest.step timeout: rest.timeout outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/series name: api-org-id-prometheus-api-v1-series description: REST surface for api-org_id-prometheus-api-v1-series. operations: - method: GET name: prometheusseries description: Find metric series call: openobserve-metrics.prometheusseries with: org_id: rest.org_id match[]: rest.match[] start: rest.start end: rest.end outputParameters: - type: object mapping: $. - path: /v1/api/{org-id}/prometheus/api/v1/write name: api-org-id-prometheus-api-v1-write description: REST surface for api-org_id-prometheus-api-v1-write. operations: - method: POST name: prometheusremotewrite description: Ingest Prometheus metrics call: openobserve-metrics.prometheusremotewrite with: org_id: rest.org_id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: openobserve-metrics-mcp port: 9090 transport: http description: MCP adapter for openobserve — Metrics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: ingest-metrics-json description: Ingest metrics via JSON hints: readOnly: false destructive: false idempotent: false call: openobserve-metrics.metricsingestionjson with: org_id: tools.org_id body: tools.body outputParameters: - type: object mapping: $. - name: format-prometheus-query description: Format Prometheus query hints: readOnly: true destructive: false idempotent: true call: openobserve-metrics.prometheusformatquery with: query: tools.query org_id: tools.org_id outputParameters: - type: object mapping: $. - name: get-label-values description: Get label values hints: readOnly: true destructive: false idempotent: true call: openobserve-metrics.prometheuslabelvalues with: org_id: tools.org_id label_name: tools.label_name match[]: tools.match[] start: tools.start end: tools.end outputParameters: - type: object mapping: $. - name: get-metric-label-names description: Get metric label names hints: readOnly: true destructive: false idempotent: true call: openobserve-metrics.prometheuslabels with: org_id: tools.org_id match[]: tools.match[] start: tools.start end: tools.end outputParameters: - type: object mapping: $. - name: get-metric-metadata description: Get metric metadata hints: readOnly: true destructive: false idempotent: true call: openobserve-metrics.prometheusmetadata with: org_id: tools.org_id limit: tools.limit metric: tools.metric outputParameters: - type: object mapping: $. - name: execute-prometheus-instant-query description: Execute Prometheus instant query hints: readOnly: true destructive: false idempotent: true call: openobserve-metrics.prometheusquery with: org_id: tools.org_id query: tools.query time: tools.time timeout: tools.timeout outputParameters: - type: object mapping: $. - name: execute-prometheus-range-query description: Execute Prometheus range query hints: readOnly: true destructive: false idempotent: true call: openobserve-metrics.prometheusrangequery with: org_id: tools.org_id query: tools.query start: tools.start end: tools.end step: tools.step timeout: tools.timeout outputParameters: - type: object mapping: $. - name: find-metric-series description: Find metric series hints: readOnly: true destructive: false idempotent: true call: openobserve-metrics.prometheusseries with: org_id: tools.org_id match[]: tools.match[] start: tools.start end: tools.end outputParameters: - type: object mapping: $. - name: ingest-prometheus-metrics description: Ingest Prometheus metrics hints: readOnly: false destructive: false idempotent: false call: openobserve-metrics.prometheusremotewrite with: org_id: tools.org_id body: tools.body outputParameters: - type: object mapping: $.