Free Cocktail API · Capability

Free Cocktail API

TheCocktailDB Free API provides access to a vast database of cocktail recipes, ingredients, glassware, and images. Search by name, ingredient, category, glass, or alcohol content, look up details by ID, list available filters, or fetch a random cocktail.

Run with Naftiko FreeCocktailApiAPI

What You Can Do

GET
Searchcocktails — Search cocktails or ingredients
/search.php
GET
Lookupbyid — Lookup cocktail or ingredient by ID
/lookup.php
GET
Randomcocktail — Get a random cocktail
/random.php
GET
Filtercocktails — Filter cocktails
/filter.php
GET
Listfilters — List filter values
/list.php

MCP Tools

searchcocktails

Search cocktails or ingredients

read-only idempotent
lookupbyid

Lookup cocktail or ingredient by ID

read-only idempotent
randomcocktail

Get a random cocktail

read-only idempotent
filtercocktails

Filter cocktails

read-only idempotent
listfilters

List filter values

read-only idempotent

Capability Spec

free-cocktail-api-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Free Cocktail API
  description: TheCocktailDB Free API provides access to a vast database of cocktail recipes, ingredients, glassware, and
    images. Search by name, ingredient, category, glass, or alcohol content, look up details by ID, list available filters,
    or fetch a random cocktail.
  tags:
  - Free
  - Cocktail
  - Api
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: free-cocktail-api
    baseUri: https://www.thecocktaildb.com/api/json/v1/1
    description: Free Cocktail API HTTP API.
    resources:
    - name: search-php
      path: /search.php
      operations:
      - name: searchcocktails
        method: GET
        description: Search cocktails or ingredients
        inputParameters:
        - name: s
          in: query
          type: string
          description: Cocktail name to search for.
        - name: f
          in: query
          type: string
          description: First letter to list cocktails by.
        - name: i
          in: query
          type: string
          description: Ingredient name to search for.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: lookup-php
      path: /lookup.php
      operations:
      - name: lookupbyid
        method: GET
        description: Lookup cocktail or ingredient by ID
        inputParameters:
        - name: i
          in: query
          type: string
          description: Cocktail ID.
        - name: iid
          in: query
          type: string
          description: Ingredient ID.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: random-php
      path: /random.php
      operations:
      - name: randomcocktail
        method: GET
        description: Get a random cocktail
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: filter-php
      path: /filter.php
      operations:
      - name: filtercocktails
        method: GET
        description: Filter cocktails
        inputParameters:
        - name: i
          in: query
          type: string
          description: Ingredient to filter by.
        - name: a
          in: query
          type: string
          description: Alcoholic or Non_Alcoholic.
        - name: c
          in: query
          type: string
          description: Category to filter by.
        - name: g
          in: query
          type: string
          description: Glass type to filter by.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: list-php
      path: /list.php
      operations:
      - name: listfilters
        method: GET
        description: List filter values
        inputParameters:
        - name: c
          in: query
          type: string
          description: List categories.
        - name: g
          in: query
          type: string
          description: List glasses.
        - name: i
          in: query
          type: string
          description: List ingredients.
        - name: a
          in: query
          type: string
          description: List alcoholic filters.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: free-cocktail-api-rest
    description: REST adapter for Free Cocktail API.
    resources:
    - path: /search.php
      name: searchcocktails
      operations:
      - method: GET
        name: searchcocktails
        description: Search cocktails or ingredients
        call: free-cocktail-api.searchcocktails
        outputParameters:
        - type: object
          mapping: $.
    - path: /lookup.php
      name: lookupbyid
      operations:
      - method: GET
        name: lookupbyid
        description: Lookup cocktail or ingredient by ID
        call: free-cocktail-api.lookupbyid
        outputParameters:
        - type: object
          mapping: $.
    - path: /random.php
      name: randomcocktail
      operations:
      - method: GET
        name: randomcocktail
        description: Get a random cocktail
        call: free-cocktail-api.randomcocktail
        outputParameters:
        - type: object
          mapping: $.
    - path: /filter.php
      name: filtercocktails
      operations:
      - method: GET
        name: filtercocktails
        description: Filter cocktails
        call: free-cocktail-api.filtercocktails
        outputParameters:
        - type: object
          mapping: $.
    - path: /list.php
      name: listfilters
      operations:
      - method: GET
        name: listfilters
        description: List filter values
        call: free-cocktail-api.listfilters
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: free-cocktail-api-mcp
    transport: http
    description: MCP adapter for Free Cocktail API for AI agent use.
    tools:
    - name: searchcocktails
      description: Search cocktails or ingredients
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: free-cocktail-api.searchcocktails
      with:
        s: tools.s
        f: tools.f
        i: tools.i
      inputParameters:
      - name: s
        type: string
        description: Cocktail name to search for.
      - name: f
        type: string
        description: First letter to list cocktails by.
      - name: i
        type: string
        description: Ingredient name to search for.
      outputParameters:
      - type: object
        mapping: $.
    - name: lookupbyid
      description: Lookup cocktail or ingredient by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: free-cocktail-api.lookupbyid
      with:
        i: tools.i
        iid: tools.iid
      inputParameters:
      - name: i
        type: string
        description: Cocktail ID.
      - name: iid
        type: string
        description: Ingredient ID.
      outputParameters:
      - type: object
        mapping: $.
    - name: randomcocktail
      description: Get a random cocktail
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: free-cocktail-api.randomcocktail
      outputParameters:
      - type: object
        mapping: $.
    - name: filtercocktails
      description: Filter cocktails
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: free-cocktail-api.filtercocktails
      with:
        i: tools.i
        a: tools.a
        c: tools.c
        g: tools.g
      inputParameters:
      - name: i
        type: string
        description: Ingredient to filter by.
      - name: a
        type: string
        description: Alcoholic or Non_Alcoholic.
      - name: c
        type: string
        description: Category to filter by.
      - name: g
        type: string
        description: Glass type to filter by.
      outputParameters:
      - type: object
        mapping: $.
    - name: listfilters
      description: List filter values
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: free-cocktail-api.listfilters
      with:
        c: tools.c
        g: tools.g
        i: tools.i
        a: tools.a
      inputParameters:
      - name: c
        type: string
        description: List categories.
      - name: g
        type: string
        description: List glasses.
      - name: i
        type: string
        description: List ingredients.
      - name: a
        type: string
        description: List alcoholic filters.
      outputParameters:
      - type: object
        mapping: $.