naftiko: 1.0.0-alpha2 info: label: X API v2 — Likes description: 'X API v2 — Likes. 2 operations. Lead operation: X Stream All Likes. Self-contained Naftiko capability covering one Twitter business surface.' tags: - Twitter - Likes created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TWITTER_API_KEY: TWITTER_API_KEY capability: consumes: - type: http namespace: x-likes baseUri: https://api.x.com description: X API v2 — Likes business capability. Self-contained, no shared references. resources: - name: 2-likes-firehose-stream path: /2/likes/firehose/stream operations: - name: streamlikesfirehose method: GET description: X Stream All Likes outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-likes-sample10-stream path: /2/likes/sample10/stream operations: - name: streamlikessample10 method: GET description: X Stream Sampled Likes outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. authentication: type: bearer token: '{{env.TWITTER_API_KEY}}' exposes: - type: rest namespace: x-likes-rest port: 8080 description: REST adapter for X API v2 — Likes. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/2/likes/firehose/stream name: 2-likes-firehose-stream description: REST surface for 2-likes-firehose-stream. operations: - method: GET name: streamlikesfirehose description: X Stream All Likes call: x-likes.streamlikesfirehose with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/likes/sample10/stream name: 2-likes-sample10-stream description: REST surface for 2-likes-sample10-stream. operations: - method: GET name: streamlikessample10 description: X Stream Sampled Likes call: x-likes.streamlikessample10 with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - type: mcp namespace: x-likes-mcp port: 9090 transport: http description: MCP adapter for X API v2 — Likes. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: x-stream-all-likes description: X Stream All Likes hints: readOnly: true destructive: false idempotent: true call: x-likes.streamlikesfirehose with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-stream-sampled-likes description: X Stream Sampled Likes hints: readOnly: true destructive: false idempotent: true call: x-likes.streamlikessample10 with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $.