Twitch · Capability

Twitch Helix API — Predictions

Twitch Helix API — Predictions. 2 operations. Lead operation: Twitch Get Predictions. Self-contained Naftiko capability covering one Twitch business surface.

Run with Naftiko TwitchPredictions

What You Can Do

GET
Getpredictions — Twitch Get Predictions
/v1/predictions
POST
Createprediction — Twitch Create Prediction
/v1/predictions

MCP Tools

twitch-get-predictions

Twitch Get Predictions

read-only idempotent
twitch-create-prediction

Twitch Create Prediction

Capability Spec

helix-predictions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Twitch Helix API — Predictions
  description: 'Twitch Helix API — Predictions. 2 operations. Lead operation: Twitch Get Predictions. Self-contained Naftiko
    capability covering one Twitch business surface.'
  tags:
  - Twitch
  - Predictions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TWITCH_API_KEY: TWITCH_API_KEY
capability:
  consumes:
  - type: http
    namespace: helix-predictions
    baseUri: https://api.twitch.tv/helix
    description: Twitch Helix API — Predictions business capability. Self-contained, no shared references.
    resources:
    - name: predictions
      path: /predictions
      operations:
      - name: getpredictions
        method: GET
        description: Twitch Get Predictions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: broadcaster_id
          in: query
          type: string
          required: true
        - name: id
          in: query
          type: string
      - name: createprediction
        method: POST
        description: Twitch Create Prediction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.TWITCH_API_KEY}}'
  exposes:
  - type: rest
    namespace: helix-predictions-rest
    port: 8080
    description: REST adapter for Twitch Helix API — Predictions. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/predictions
      name: predictions
      description: REST surface for predictions.
      operations:
      - method: GET
        name: getpredictions
        description: Twitch Get Predictions
        call: helix-predictions.getpredictions
        with:
          broadcaster_id: rest.broadcaster_id
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createprediction
        description: Twitch Create Prediction
        call: helix-predictions.createprediction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: helix-predictions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Twitch Helix API — Predictions. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: twitch-get-predictions
      description: Twitch Get Predictions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: helix-predictions.getpredictions
      with:
        broadcaster_id: tools.broadcaster_id
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: twitch-create-prediction
      description: Twitch Create Prediction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: helix-predictions.createprediction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.