The Cat API · Capability

The Cat API — Votes

The Cat API — Votes. 4 operations. Lead operation: List Votes. Self-contained Naftiko capability covering one The Cat Api business surface.

Run with Naftiko The Cat ApiVotes

What You Can Do

GET
Listvotes — List Votes
/v1/votes
POST
Createvote — Create Vote
/v1/votes
GET
Getvote — Get Vote
/v1/votes/{vote-id}
DELETE
Deletevote — Delete Vote
/v1/votes/{vote-id}

MCP Tools

list-votes

List Votes

read-only idempotent
create-vote

Create Vote

get-vote

Get Vote

read-only idempotent
delete-vote

Delete Vote

idempotent

Capability Spec

the-cat-votes.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: The Cat API — Votes
  description: 'The Cat API — Votes. 4 operations. Lead operation: List Votes. Self-contained Naftiko capability covering
    one The Cat Api business surface.'
  tags:
  - The Cat Api
  - Votes
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    THE_CAT_API_API_KEY: THE_CAT_API_API_KEY
capability:
  consumes:
  - type: http
    namespace: the-cat-votes
    baseUri: https://api.thecatapi.com/v1
    description: The Cat API — Votes business capability. Self-contained, no shared references.
    resources:
    - name: votes
      path: /votes
      operations:
      - name: listvotes
        method: GET
        description: List Votes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: limit
          in: query
          type: integer
        - name: page
          in: query
          type: integer
        - name: sub_id
          in: query
          type: string
          description: Filter by sub-account identifier.
      - name: createvote
        method: POST
        description: Create Vote
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: votes-vote_id
      path: /votes/{vote_id}
      operations:
      - name: getvote
        method: GET
        description: Get Vote
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vote_id
          in: path
          type: integer
          required: true
      - name: deletevote
        method: DELETE
        description: Delete Vote
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vote_id
          in: path
          type: integer
          required: true
    authentication:
      type: apikey
      key: x-api-key
      value: '{{env.THE_CAT_API_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: the-cat-votes-rest
    port: 8080
    description: REST adapter for The Cat API — Votes. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/votes
      name: votes
      description: REST surface for votes.
      operations:
      - method: GET
        name: listvotes
        description: List Votes
        call: the-cat-votes.listvotes
        with:
          limit: rest.limit
          page: rest.page
          sub_id: rest.sub_id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createvote
        description: Create Vote
        call: the-cat-votes.createvote
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/votes/{vote-id}
      name: votes-vote-id
      description: REST surface for votes-vote_id.
      operations:
      - method: GET
        name: getvote
        description: Get Vote
        call: the-cat-votes.getvote
        with:
          vote_id: rest.vote_id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletevote
        description: Delete Vote
        call: the-cat-votes.deletevote
        with:
          vote_id: rest.vote_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: the-cat-votes-mcp
    port: 9090
    transport: http
    description: MCP adapter for The Cat API — Votes. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-votes
      description: List Votes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-cat-votes.listvotes
      with:
        limit: tools.limit
        page: tools.page
        sub_id: tools.sub_id
      outputParameters:
      - type: object
        mapping: $.
    - name: create-vote
      description: Create Vote
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: the-cat-votes.createvote
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-vote
      description: Get Vote
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-cat-votes.getvote
      with:
        vote_id: tools.vote_id
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-vote
      description: Delete Vote
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: the-cat-votes.deletevote
      with:
        vote_id: tools.vote_id
      outputParameters:
      - type: object
        mapping: $.