naftiko: 1.0.0-alpha2 info: label: X API v2 — Trends description: 'X API v2 — Trends. 2 operations. Lead operation: X Get Trends by WOEID. Self-contained Naftiko capability covering one Twitter business surface.' tags: - Twitter - Trends created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TWITTER_API_KEY: TWITTER_API_KEY capability: consumes: - type: http namespace: x-trends baseUri: https://api.x.com description: X API v2 — Trends business capability. Self-contained, no shared references. resources: - name: 2-trends-by-woeid-woeid path: /2/trends/by/woeid/{woeid} operations: - name: gettrendsbywoeid method: GET description: X Get Trends by WOEID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: woeid in: path type: integer description: The WOEID of the place to lookup a trend for. required: true - name: max_trends in: query type: integer description: The maximum number of results. - name: 2-users-personalized_trends path: /2/users/personalized_trends operations: - name: gettrendspersonalizedtrends method: GET description: X Get Personalized Trends outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: bearer token: '{{env.TWITTER_API_KEY}}' exposes: - type: rest namespace: x-trends-rest port: 8080 description: REST adapter for X API v2 — Trends. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/2/trends/by/woeid/{woeid} name: 2-trends-by-woeid-woeid description: REST surface for 2-trends-by-woeid-woeid. operations: - method: GET name: gettrendsbywoeid description: X Get Trends by WOEID call: x-trends.gettrendsbywoeid with: woeid: rest.woeid max_trends: rest.max_trends outputParameters: - type: object mapping: $. - path: /v1/2/users/personalized-trends name: 2-users-personalized-trends description: REST surface for 2-users-personalized_trends. operations: - method: GET name: gettrendspersonalizedtrends description: X Get Personalized Trends call: x-trends.gettrendspersonalizedtrends outputParameters: - type: object mapping: $. - type: mcp namespace: x-trends-mcp port: 9090 transport: http description: MCP adapter for X API v2 — Trends. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: x-get-trends-woeid description: X Get Trends by WOEID hints: readOnly: true destructive: false idempotent: true call: x-trends.gettrendsbywoeid with: woeid: tools.woeid max_trends: tools.max_trends outputParameters: - type: object mapping: $. - name: x-get-personalized-trends description: X Get Personalized Trends hints: readOnly: true destructive: false idempotent: true call: x-trends.gettrendspersonalizedtrends outputParameters: - type: object mapping: $.