naftiko: 1.0.0-alpha2 info: label: Fastly Metrics and Stats API — Real-Time Analytics description: 'Fastly Metrics and Stats API — Real-Time Analytics. 3 operations. Lead operation: Get real-time analytics for the last 120 seconds. Self-contained Naftiko capability covering one Fastly business surface.' tags: - Fastly - Real-Time Analytics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: FASTLY_API_KEY: FASTLY_API_KEY capability: consumes: - type: http namespace: metrics-and-stats-real-time-analytics baseUri: https://rt.fastly.com description: Fastly Metrics and Stats API — Real-Time Analytics business capability. Self-contained, no shared references. resources: - name: v1-channel-service_id-ts-h path: /v1/channel/{service_id}/ts/h operations: - name: getrealtimestatslast120seconds method: GET description: Get real-time analytics for the last 120 seconds outputRawFormat: json outputParameters: - name: result type: object value: $. - name: v1-channel-service_id-ts-h-limit-max_entries path: /v1/channel/{service_id}/ts/h/limit/{max_entries} operations: - name: getrealtimestatslastsecond method: GET description: Get real-time analytics with a limit outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: max_entries in: path type: integer description: The maximum number of entries to return. required: true - name: v1-channel-service_id-ts-start_timestamp path: /v1/channel/{service_id}/ts/{start_timestamp} operations: - name: getrealtimestats method: GET description: Get real-time analytics outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: start_timestamp in: path type: integer description: The Unix timestamp to start retrieving analytics data from. required: true authentication: type: apikey key: Fastly-Key value: '{{env.FASTLY_API_KEY}}' placement: header exposes: - type: rest namespace: metrics-and-stats-real-time-analytics-rest port: 8080 description: REST adapter for Fastly Metrics and Stats API — Real-Time Analytics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/channel/{service-id}/ts/h name: v1-channel-service-id-ts-h description: REST surface for v1-channel-service_id-ts-h. operations: - method: GET name: getrealtimestatslast120seconds description: Get real-time analytics for the last 120 seconds call: metrics-and-stats-real-time-analytics.getrealtimestatslast120seconds outputParameters: - type: object mapping: $. - path: /v1/v1/channel/{service-id}/ts/h/limit/{max-entries} name: v1-channel-service-id-ts-h-limit-max-entries description: REST surface for v1-channel-service_id-ts-h-limit-max_entries. operations: - method: GET name: getrealtimestatslastsecond description: Get real-time analytics with a limit call: metrics-and-stats-real-time-analytics.getrealtimestatslastsecond with: max_entries: rest.max_entries outputParameters: - type: object mapping: $. - path: /v1/v1/channel/{service-id}/ts/{start-timestamp} name: v1-channel-service-id-ts-start-timestamp description: REST surface for v1-channel-service_id-ts-start_timestamp. operations: - method: GET name: getrealtimestats description: Get real-time analytics call: metrics-and-stats-real-time-analytics.getrealtimestats with: start_timestamp: rest.start_timestamp outputParameters: - type: object mapping: $. - type: mcp namespace: metrics-and-stats-real-time-analytics-mcp port: 9090 transport: http description: MCP adapter for Fastly Metrics and Stats API — Real-Time Analytics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-real-time-analytics-last description: Get real-time analytics for the last 120 seconds hints: readOnly: true destructive: false idempotent: true call: metrics-and-stats-real-time-analytics.getrealtimestatslast120seconds outputParameters: - type: object mapping: $. - name: get-real-time-analytics-limit description: Get real-time analytics with a limit hints: readOnly: true destructive: false idempotent: true call: metrics-and-stats-real-time-analytics.getrealtimestatslastsecond with: max_entries: tools.max_entries outputParameters: - type: object mapping: $. - name: get-real-time-analytics description: Get real-time analytics hints: readOnly: true destructive: false idempotent: true call: metrics-and-stats-real-time-analytics.getrealtimestats with: start_timestamp: tools.start_timestamp outputParameters: - type: object mapping: $.