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
| Name | Type | Required | Description |
|---|---|---|---|
barcode | string | yes | Product 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
| Field | Type | Description |
|---|---|---|
barcode | string | Product barcode (cleaned, digits only) |
name | string | null | Product name |
brand | string | null | Brand name |
quantity | string | null | Package quantity/size |
serving_size | string | null | Recommended serving size |
categories | string | null | Product categories |
ingredients | string | null | Ingredients list |
allergens | string | null | Allergens present in product |
nutriscore | string | null | Nutri-Score grade (A-E) |
nova_group | number | null | NOVA processing group (1-4) |
image_url | string | null | Product image URL |
nutrition_per_100g | object | null | Detailed 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.