Twitch · Capability

Twitch Helix API — Polls

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

Run with Naftiko TwitchPolls

What You Can Do

GET
Getpolls — Twitch Get Polls
/v1/polls
POST
Createpoll — Twitch Create Poll
/v1/polls
PATCH
Endpoll — Twitch End Poll
/v1/polls/end

MCP Tools

twitch-get-polls

Twitch Get Polls

read-only idempotent
twitch-create-poll

Twitch Create Poll

twitch-end-poll

Twitch End Poll

idempotent

Capability Spec

helix-polls.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Twitch Helix API — Polls
  description: 'Twitch Helix API — Polls. 3 operations. Lead operation: Twitch Get Polls. Self-contained Naftiko capability
    covering one Twitch business surface.'
  tags:
  - Twitch
  - Polls
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TWITCH_API_KEY: TWITCH_API_KEY
capability:
  consumes:
  - type: http
    namespace: helix-polls
    baseUri: https://api.twitch.tv/helix
    description: Twitch Helix API — Polls business capability. Self-contained, no shared references.
    resources:
    - name: polls
      path: /polls
      operations:
      - name: getpolls
        method: GET
        description: Twitch Get Polls
        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: createpoll
        method: POST
        description: Twitch Create Poll
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: polls-end
      path: /polls/end
      operations:
      - name: endpoll
        method: PATCH
        description: Twitch End Poll
        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-polls-rest
    port: 8080
    description: REST adapter for Twitch Helix API — Polls. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/polls
      name: polls
      description: REST surface for polls.
      operations:
      - method: GET
        name: getpolls
        description: Twitch Get Polls
        call: helix-polls.getpolls
        with:
          broadcaster_id: rest.broadcaster_id
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createpoll
        description: Twitch Create Poll
        call: helix-polls.createpoll
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/polls/end
      name: polls-end
      description: REST surface for polls-end.
      operations:
      - method: PATCH
        name: endpoll
        description: Twitch End Poll
        call: helix-polls.endpoll
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: helix-polls-mcp
    port: 9090
    transport: http
    description: MCP adapter for Twitch Helix API — Polls. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: twitch-get-polls
      description: Twitch Get Polls
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: helix-polls.getpolls
      with:
        broadcaster_id: tools.broadcaster_id
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: twitch-create-poll
      description: Twitch Create Poll
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: helix-polls.createpoll
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: twitch-end-poll
      description: Twitch End Poll
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: helix-polls.endpoll
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.