naftiko: 1.0.0-alpha2 info: label: Soracom Stats and Diagnostics Capability description: Self-contained Naftiko capability for SIM, group, and account-level air data usage statistics, audit logs, error logs, and diagnostics. tags: - Soracom - Stats - Audit - Diagnostics - Observability created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: SORACOM_API_KEY: SORACOM_API_KEY SORACOM_API_TOKEN: SORACOM_API_TOKEN capability: consumes: - type: http namespace: stats baseUri: https://api.soracom.io/v1 description: Soracom Stats, AuditLog, Log, and Diagnostic API. resources: - name: stats-air path: /stats/air/subscribers/{imsi}/{period} operations: - name: getAirStats method: GET description: Get cellular data usage stats for a subscriber by period (minutes/day/month). outputRawFormat: json outputParameters: - {name: result, type: array, value: $.} inputParameters: - {name: imsi, in: path, type: string, required: true} - {name: period, in: path, type: string, required: true} - {name: from, in: query, type: integer, required: false} - {name: to, in: query, type: integer, required: false} - name: audit-logs-api path: /audit_logs/api operations: - name: listApiAuditLogs method: GET description: List API audit logs. outputRawFormat: json outputParameters: - {name: result, type: array, value: $.} inputParameters: - {name: from, in: query, type: integer, required: false} - {name: to, in: query, type: integer, required: false} - {name: limit, in: query, type: integer, required: false} - name: audit-logs-napter path: /audit_logs/napter operations: - name: listNapterAuditLogs method: GET description: List Napter audit logs. outputRawFormat: json outputParameters: - {name: result, type: array, value: $.} inputParameters: - {name: from, in: query, type: integer, required: false} - {name: to, in: query, type: integer, required: false} - {name: limit, in: query, type: integer, required: false} - name: logs path: /logs operations: - name: listLogs method: GET description: List error logs for the operator. outputRawFormat: json outputParameters: - {name: result, type: array, value: $.} inputParameters: - {name: from, in: query, type: integer, required: false} - {name: to, in: query, type: integer, required: false} authentication: type: apikey key: X-Soracom-API-Key value: '{{env.SORACOM_API_KEY}}' placement: header exposes: - type: mcp namespace: stats-mcp port: 9090 transport: http description: MCP adapter for stats and audit logs. tools: - name: soracom-get-air-stats description: Get cellular data usage statistics for a subscriber. hints: {readOnly: true, destructive: false, idempotent: true} call: stats.getAirStats with: imsi: tools.imsi period: tools.period from: tools.from to: tools.to outputParameters: - {type: array, mapping: $.} - name: soracom-list-api-audit-logs description: List Soracom API audit logs. hints: {readOnly: true, destructive: false, idempotent: true} call: stats.listApiAuditLogs with: from: tools.from to: tools.to limit: tools.limit outputParameters: - {type: array, mapping: $.} - name: soracom-list-napter-audit-logs description: List Napter audit logs. hints: {readOnly: true, destructive: false, idempotent: true} call: stats.listNapterAuditLogs with: from: tools.from to: tools.to limit: tools.limit outputParameters: - {type: array, mapping: $.} - name: soracom-list-error-logs description: List operator error logs. hints: {readOnly: true, destructive: false, idempotent: true} call: stats.listLogs with: from: tools.from to: tools.to outputParameters: - {type: array, mapping: $.}