get_product

Pack: nutrition · Endpoint: https://gateway.pipeworx.io/nutrition/mcp

Get complete nutrition details for a food product by barcode (e.g., EAN-13 or UPC). Returns ingredients, allergens, and detailed macro/micronutrients.

Parameters

NameTypeRequiredDescription
barcodestringyesProduct barcode (EAN-13 or UPC-A)

Example call

Arguments

{
  "barcode": "5901234123457"
}

curl

curl -X POST https://gateway.pipeworx.io/nutrition/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_product","arguments":{"barcode":"5901234123457"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_product', {
  "barcode": "5901234123457"
});

More examples

{
  "barcode": "012000001625"
}

Response shape

Always returns: barcode

FieldTypeDescription
barcodestringProduct barcode (cleaned, digits only)
namestring | nullProduct name
brandstring | nullBrand name
quantitystring | nullPackage quantity/size
serving_sizestring | nullRecommended serving size
categoriesstring | nullProduct categories
ingredientsstring | nullIngredients list
allergensstring | nullAllergens present in product
nutriscorestring | nullNutri-Score grade (A-E)
nova_groupnumber | nullNOVA processing group (1-4)
image_urlstring | nullProduct image URL
nutrition_per_100gobject | nullDetailed nutrition facts per 100g
Full JSON Schema
{
  "type": "object",
  "properties": {
    "barcode": {
      "type": "string",
      "description": "Product barcode (cleaned, digits only)"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Product name"
    },
    "brand": {
      "type": [
        "string",
        "null"
      ],
      "description": "Brand name"
    },
    "quantity": {
      "type": [
        "string",
        "null"
      ],
      "description": "Package quantity/size"
    },
    "serving_size": {
      "type": [
        "string",
        "null"
      ],
      "description": "Recommended serving size"
    },
    "categories": {
      "type": [
        "string",
        "null"
      ],
      "description": "Product categories"
    },
    "ingredients": {
      "type": [
        "string",
        "null"
      ],
      "description": "Ingredients list"
    },
    "allergens": {
      "type": [
        "string",
        "null"
      ],
      "description": "Allergens present in product"
    },
    "nutriscore": {
      "type": [
        "string",
        "null"
      ],
      "description": "Nutri-Score grade (A-E)"
    },
    "nova_group": {
      "type": [
        "number",
        "null"
      ],
      "description": "NOVA processing group (1-4)"
    },
    "image_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Product image URL"
    },
    "nutrition_per_100g": {
      "type": [
        "object",
        "null"
      ],
      "description": "Detailed nutrition facts per 100g",
      "properties": {
        "calories_per_100g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Energy in kilocalories per 100g"
        },
        "fat_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Total fat in grams per 100g"
        },
        "saturated_fat_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Saturated fat in grams per 100g"
        },
        "carbohydrates_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Carbohydrates in grams per 100g"
        },
        "sugars_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Sugars in grams per 100g"
        },
        "fiber_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Dietary fiber in grams per 100g"
        },
        "protein_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Protein in grams per 100g"
        },
        "salt_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Salt in grams per 100g"
        },
        "sodium_g": {
          "type": [
            "number",
            "null"
          ],
          "description": "Sodium in grams per 100g"
        }
      }
    }
  },
  "required": [
    "barcode"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "nutrition": {
      "url": "https://gateway.pipeworx.io/nutrition/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026