Calculate nutrition declaration
calculate_nutritionUse this when the user wants calories, macros or a nutrition table or label for a recipe or dish from its ingredients (Romanian: valori nutriționale, declarație nutrițională, calorii, la 100 g, per porție). Computes an EU Regulation 1169/2011-style nutrition declaration (energy kJ/kcal, fat, saturates, carbohydrate, sugars, protein, salt) per 100 g and per portion for a recipe, using the Nutrimeniu food database (Romanian and European foods, names in English or Romanian). Each ingredient is a name or food_id with its weight in grams, raw or cooked to match the food. When an ingredient matches several foods or none, the result has no totals and lists the candidate foods, if any, for that ingredient. A complete result also carries the allergens tagged on the matched foods, with a note that tags can be incomplete, an ingredient list sorted by weight with allergens in bold, the five values per portion that Romanian Order ANPC 201/2022 requires on menus (menu_declaration), values rounded for labels (label_rounded), the data source of each ingredient and a disclaimer. purpose is menu for a restaurant menu and label for a product label. Not for packaged products looked up by barcode or brand, for a daily food diary or diet plan, or for the user's own Nutrimeniu recipes. The values are estimates calculated from ingredient data, not laboratory analysis. Completed calculations are limited per conversation. Incomplete results are not counted toward that limit; they share a budget of 50 food lookups per conversation with food searches.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ingredients": "<ingredients>"
},
"name": "calculate_nutrition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language for food names and table labels: en or ro. Default en. | |
| purpose | No | menu: a restaurant menu (Order ANPC 201/2022), shows the five mandatory values per portion first; label: a product label, uses label rounding. Default general. | |
| servings | No | Number of portions the recipe makes. Default 1. | |
| ingredients | Yes | The recipe ingredients, 1 to 30, each with a name or food_id and its weight in grams. | |
| recipe_name | No | Name of the dish, e.g. "Ciorbă de perișoare". Used as the recipe name when the user saves it in Nutrimeniu. | |
| cooked_weight_grams | No | Final weight of the dish after cooking, in grams, when it differs from the sum of the raw ingredients. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | ||
| sources | No | ||
| complete | No | False when an ingredient is ambiguous or unknown: then there are no totals yet. | |
| per_100g | No | ||
| allergens | No | Allergens tagged on the matched foods. Tags can be missing: the note says so and unchecked_ingredients lists the foods whose allergen data is not checked. | |
| unmatched | No | ||
| disclaimer | No | ||
| ingredients | No | ||
| per_portion | No | ||
| save_recipe | No | Present on a complete result: a link that opens this recipe in Nutrimeniu, to keep it as a draft. | |
| label_rounded | No | The declaration rounded per the European Commission guidance (December 2012), as strings such as "<0.5". | |
| limit_reached | No | Present only when a limit was reached: no search or calculation was made. message explains the limit; register_url, when present, opens the Nutrimeniu sign-up page. | |
| ingredients_text | No | Ingredient list sorted by weight, per portion, with allergens in bold (text uses **, html uses <b>). | |
| menu_declaration | No | Energy, fat, saturates, sugars and salt per portion, rounded for a menu, with the portion weight (Order ANPC 201/2022). | |
| total_weight_grams | No | ||
| portion_weight_grams | No | ||
| free_calculations_left | No | Free completed calculations left in this conversation. |