LogMeal · Capability

LogMeal Food Recognition API

The LogMeal API is a RESTful service that recognizes foods, drinks, vegetables, fruits, and prepared dishes from images, returns ingredient lists with quantities, computes nutritional information, and tracks user intakes over time. Authentication is by user token in the Authorization header. Images are submitted as multipart/form-data or as a base64-encoded string in JSON.

Run with Naftiko LogmealAPI

What You Can Do

POST
Segmentationcomplete — Segment and recognize foods in an image
/v2/image/segmentation/complete
POST
Recipeingredients — Retrieve ingredients for a confirmed intake
/v2/nutrition/recipe/ingredients
POST
Recipenutritionalinfo — Retrieve nutritional information for a confirmed intake
/v2/nutrition/recipe/nutritionalInfo
GET
Getintakeslist — List user food intakes
/v2/history/getIntakesList

MCP Tools

segmentationcomplete

Segment and recognize foods in an image

recipeingredients

Retrieve ingredients for a confirmed intake

recipenutritionalinfo

Retrieve nutritional information for a confirmed intake

getintakeslist

List user food intakes

read-only idempotent

Capability Spec

logmeal-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: LogMeal Food Recognition API
  description: The LogMeal API is a RESTful service that recognizes foods, drinks, vegetables, fruits, and prepared dishes
    from images, returns ingredient lists with quantities, computes nutritional information, and tracks user intakes over
    time. Authentication is by user token in the Authorization header. Images are submitted as multipart/form-data or as a
    base64-encoded string in JSON.
  tags:
  - Logmeal
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: logmeal
    baseUri: https://api.logmeal.com
    description: LogMeal Food Recognition API HTTP API.
    authentication:
      type: bearer
      token: '{{LOGMEAL_TOKEN}}'
    resources:
    - name: v2-image-segmentation-complete
      path: /v2/image/segmentation/complete
      operations:
      - name: segmentationcomplete
        method: POST
        description: Segment and recognize foods in an image
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-nutrition-recipe-ingredients
      path: /v2/nutrition/recipe/ingredients
      operations:
      - name: recipeingredients
        method: POST
        description: Retrieve ingredients for a confirmed intake
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-nutrition-recipe-nutritionalinfo
      path: /v2/nutrition/recipe/nutritionalInfo
      operations:
      - name: recipenutritionalinfo
        method: POST
        description: Retrieve nutritional information for a confirmed intake
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-history-getintakeslist
      path: /v2/history/getIntakesList
      operations:
      - name: getintakeslist
        method: GET
        description: List user food intakes
        inputParameters:
        - name: startDate
          in: query
          type: string
          description: Start of the time window (ISO 8601 date).
        - name: endDate
          in: query
          type: string
          description: End of the time window (ISO 8601 date).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: logmeal-rest
    description: REST adapter for LogMeal Food Recognition API.
    resources:
    - path: /v2/image/segmentation/complete
      name: segmentationcomplete
      operations:
      - method: POST
        name: segmentationcomplete
        description: Segment and recognize foods in an image
        call: logmeal.segmentationcomplete
        outputParameters:
        - type: object
          mapping: $.
    - path: /v2/nutrition/recipe/ingredients
      name: recipeingredients
      operations:
      - method: POST
        name: recipeingredients
        description: Retrieve ingredients for a confirmed intake
        call: logmeal.recipeingredients
        outputParameters:
        - type: object
          mapping: $.
    - path: /v2/nutrition/recipe/nutritionalInfo
      name: recipenutritionalinfo
      operations:
      - method: POST
        name: recipenutritionalinfo
        description: Retrieve nutritional information for a confirmed intake
        call: logmeal.recipenutritionalinfo
        outputParameters:
        - type: object
          mapping: $.
    - path: /v2/history/getIntakesList
      name: getintakeslist
      operations:
      - method: GET
        name: getintakeslist
        description: List user food intakes
        call: logmeal.getintakeslist
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: logmeal-mcp
    transport: http
    description: MCP adapter for LogMeal Food Recognition API for AI agent use.
    tools:
    - name: segmentationcomplete
      description: Segment and recognize foods in an image
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: logmeal.segmentationcomplete
      outputParameters:
      - type: object
        mapping: $.
    - name: recipeingredients
      description: Retrieve ingredients for a confirmed intake
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: logmeal.recipeingredients
      outputParameters:
      - type: object
        mapping: $.
    - name: recipenutritionalinfo
      description: Retrieve nutritional information for a confirmed intake
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: logmeal.recipenutritionalinfo
      outputParameters:
      - type: object
        mapping: $.
    - name: getintakeslist
      description: List user food intakes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: logmeal.getintakeslist
      with:
        startDate: tools.startDate
        endDate: tools.endDate
      inputParameters:
      - name: startDate
        type: string
        description: Start of the time window (ISO 8601 date).
      - name: endDate
        type: string
        description: End of the time window (ISO 8601 date).
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    LOGMEAL_TOKEN: LOGMEAL_TOKEN