naftiko: 1.0.0-alpha2 info: label: X API v2 — Connections description: 'X API v2 — Connections. 4 operations. Lead operation: X Terminate Multiple Connections. Self-contained Naftiko capability covering one Twitter business surface.' tags: - Twitter - Connections created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TWITTER_API_KEY: TWITTER_API_KEY capability: consumes: - type: http namespace: x-connections baseUri: https://api.x.com description: X API v2 — Connections business capability. Self-contained, no shared references. resources: - name: 2-connections path: /2/connections operations: - name: deleteconnectionsbyuuids method: DELETE description: X Terminate Multiple Connections outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: getconnectionhistory method: GET description: X Get Connection History outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: status in: query type: string description: Filter by connection status. Use 'active' for current connections, 'inactive' for historical/disconnected connections, or 'all' for both. - name: endpoints in: query type: array description: Filter by streaming endpoint. Specify one or more endpoint names to filter results. - name: max_results in: query type: integer description: The maximum number of results to return per page. - name: pagination_token in: query type: string description: Token for paginating through results. Use the value from 'next_token' in the previous response. - name: 2-connections-all path: /2/connections/all operations: - name: deleteallconnections method: DELETE description: X Terminate All Connections outputRawFormat: json outputParameters: - name: result type: object value: $. - name: 2-connections-endpoint_id path: /2/connections/{endpoint_id} operations: - name: deleteconnectionsbyendpoint method: DELETE description: X Terminate Connections by Endpoint outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: endpoint_id in: path type: string description: The endpoint ID to terminate connections for. required: true authentication: type: bearer token: '{{env.TWITTER_API_KEY}}' exposes: - type: rest namespace: x-connections-rest port: 8080 description: REST adapter for X API v2 — Connections. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/2/connections name: 2-connections description: REST surface for 2-connections. operations: - method: DELETE name: deleteconnectionsbyuuids description: X Terminate Multiple Connections call: x-connections.deleteconnectionsbyuuids with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: getconnectionhistory description: X Get Connection History call: x-connections.getconnectionhistory with: status: rest.status endpoints: rest.endpoints max_results: rest.max_results pagination_token: rest.pagination_token outputParameters: - type: object mapping: $. - path: /v1/2/connections/all name: 2-connections-all description: REST surface for 2-connections-all. operations: - method: DELETE name: deleteallconnections description: X Terminate All Connections call: x-connections.deleteallconnections outputParameters: - type: object mapping: $. - path: /v1/2/connections/{endpoint-id} name: 2-connections-endpoint-id description: REST surface for 2-connections-endpoint_id. operations: - method: DELETE name: deleteconnectionsbyendpoint description: X Terminate Connections by Endpoint call: x-connections.deleteconnectionsbyendpoint with: endpoint_id: rest.endpoint_id outputParameters: - type: object mapping: $. - type: mcp namespace: x-connections-mcp port: 9090 transport: http description: MCP adapter for X API v2 — Connections. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: x-terminate-multiple-connections description: X Terminate Multiple Connections hints: readOnly: false destructive: true idempotent: true call: x-connections.deleteconnectionsbyuuids with: body: tools.body outputParameters: - type: object mapping: $. - name: x-get-connection-history description: X Get Connection History hints: readOnly: true destructive: false idempotent: true call: x-connections.getconnectionhistory with: status: tools.status endpoints: tools.endpoints max_results: tools.max_results pagination_token: tools.pagination_token outputParameters: - type: object mapping: $. - name: x-terminate-all-connections description: X Terminate All Connections hints: readOnly: false destructive: true idempotent: true call: x-connections.deleteallconnections outputParameters: - type: object mapping: $. - name: x-terminate-connections-endpoint description: X Terminate Connections by Endpoint hints: readOnly: false destructive: true idempotent: true call: x-connections.deleteconnectionsbyendpoint with: endpoint_id: tools.endpoint_id outputParameters: - type: object mapping: $.