The Cat API · Capability

The Cat API — Favourites

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

Run with Naftiko The Cat ApiFavourites

What You Can Do

GET
Listfavourites — List Favourites
/v1/favourites
POST
Savefavourite — Save Favourite
/v1/favourites
GET
Getfavourite — Get Favourite
/v1/favourites/{favourite-id}
DELETE
Deletefavourite — Delete Favourite
/v1/favourites/{favourite-id}

MCP Tools

list-favourites

List Favourites

read-only idempotent
save-favourite

Save Favourite

get-favourite

Get Favourite

read-only idempotent
delete-favourite

Delete Favourite

idempotent

Capability Spec

the-cat-favourites.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: The Cat API — Favourites
  description: 'The Cat API — Favourites. 4 operations. Lead operation: List Favourites. Self-contained Naftiko capability
    covering one The Cat Api business surface.'
  tags:
  - The Cat Api
  - Favourites
  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-favourites
    baseUri: https://api.thecatapi.com/v1
    description: The Cat API — Favourites business capability. Self-contained, no shared references.
    resources:
    - name: favourites
      path: /favourites
      operations:
      - name: listfavourites
        method: GET
        description: List Favourites
        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: savefavourite
        method: POST
        description: Save Favourite
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: favourites-favourite_id
      path: /favourites/{favourite_id}
      operations:
      - name: getfavourite
        method: GET
        description: Get Favourite
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: favourite_id
          in: path
          type: integer
          required: true
      - name: deletefavourite
        method: DELETE
        description: Delete Favourite
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: favourite_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-favourites-rest
    port: 8080
    description: REST adapter for The Cat API — Favourites. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/favourites
      name: favourites
      description: REST surface for favourites.
      operations:
      - method: GET
        name: listfavourites
        description: List Favourites
        call: the-cat-favourites.listfavourites
        with:
          limit: rest.limit
          page: rest.page
          sub_id: rest.sub_id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: savefavourite
        description: Save Favourite
        call: the-cat-favourites.savefavourite
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/favourites/{favourite-id}
      name: favourites-favourite-id
      description: REST surface for favourites-favourite_id.
      operations:
      - method: GET
        name: getfavourite
        description: Get Favourite
        call: the-cat-favourites.getfavourite
        with:
          favourite_id: rest.favourite_id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletefavourite
        description: Delete Favourite
        call: the-cat-favourites.deletefavourite
        with:
          favourite_id: rest.favourite_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: the-cat-favourites-mcp
    port: 9090
    transport: http
    description: MCP adapter for The Cat API — Favourites. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-favourites
      description: List Favourites
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-cat-favourites.listfavourites
      with:
        limit: tools.limit
        page: tools.page
        sub_id: tools.sub_id
      outputParameters:
      - type: object
        mapping: $.
    - name: save-favourite
      description: Save Favourite
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: the-cat-favourites.savefavourite
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-favourite
      description: Get Favourite
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: the-cat-favourites.getfavourite
      with:
        favourite_id: tools.favourite_id
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-favourite
      description: Delete Favourite
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: the-cat-favourites.deletefavourite
      with:
        favourite_id: tools.favourite_id
      outputParameters:
      - type: object
        mapping: $.