Skip to main content
Glama

Nutrimeniu Nutrition Calculator

Calculate nutrition declaration

calculate_nutrition
Read-onlyIdempotent

Use 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

NameRequiredDescriptionDefault
langNoLanguage for food names and table labels: en or ro. Default en.
purposeNomenu: a restaurant menu (Order ANPC 201/2022), shows the five mandatory values per portion first; label: a product label, uses label rounding. Default general.
servingsNoNumber of portions the recipe makes. Default 1.
ingredientsYesThe recipe ingredients, 1 to 30, each with a name or food_id and its weight in grams.
recipe_nameNoName of the dish, e.g. "Ciorbă de perișoare". Used as the recipe name when the user saves it in Nutrimeniu.
cooked_weight_gramsNoFinal weight of the dish after cooking, in grams, when it differs from the sum of the raw ingredients.

Output Schema

NameRequiredDescriptionDefault
formatNo
sourcesNo
completeNoFalse when an ingredient is ambiguous or unknown: then there are no totals yet.
per_100gNo
allergensNoAllergens 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.
unmatchedNo
disclaimerNo
ingredientsNo
per_portionNo
save_recipeNoPresent on a complete result: a link that opens this recipe in Nutrimeniu, to keep it as a draft.
label_roundedNoThe declaration rounded per the European Commission guidance (December 2012), as strings such as "<0.5".
limit_reachedNoPresent 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_textNoIngredient list sorted by weight, per portion, with allergens in bold (text uses **, html uses <b>).
menu_declarationNoEnergy, fat, saturates, sugars and salt per portion, rounded for a menu, with the portion weight (Order ANPC 201/2022).
total_weight_gramsNo
portion_weight_gramsNo
free_calculations_leftNoFree completed calculations left in this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover safety (readOnly, idempotent, non-destructive), yet the description adds genuinely new behavior: unresolvable or ambiguous ingredients produce a result with no totals plus candidate foods, allergens come with a caveat that tags may be incomplete, values are estimates rather than lab analysis, and there are per-conversation limits with a shared 50-lookup budget that incomplete results do not consume. These are rate-limit and failure-mode disclosures not derivable from any structured field.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the trigger sentence and organized from what it produces, to input shape, to failure behavior, to exclusions, to limits, with no filler. It is dense and long (a single paragraph enumerating outputs and caveats), which costs a bit of scanability, but nearly every clause carries decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return-value detail is unnecessary, and the description still covers what an agent needs to call correctly: input shape (name/food_id + grams), partial-failure semantics, quota consumption, and disambiguation from neighboring tools. Nothing material is missing for a read-only computation tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description earns more by explaining the resolution mechanics behind the ingredient parameters: each ingredient is a name or food_id with grams, raw or cooked to match the food, and the candidate-list behavior explains why food_id exists. It partly restates the schema for purpose/lang, and cooked_weight_grams is left to the schema, so it is not fully additive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Computes an EU Regulation 1169/2011-style nutrition declaration ... per 100 g and per portion for a recipe') and explicitly separates itself from adjacent capabilities: barcode/brand product lookup, food diary/diet plan, and the user's own saved Nutrimeniu recipes. It also names the data source (Nutrimeniu food database) and the exact nutrients returned, so an agent can identify the tool without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Opens with an explicit trigger ('Use this when the user wants calories, macros or a nutrition table or label for a recipe or dish from its ingredients'), reinforced with Romanian user phrasings (valori nutriționale, calorii, la 100 g, per porție). It then gives concrete exclusions and routes them elsewhere, which is what a sibling tool like search_foods otherwise leaves ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources