Calculate nutrition for a whole recipe and per serving
calculate_recipe_nutritionParses ingredient lines ("2 cups flour", "1 stick butter" as 8 tbsp, "3 large eggs", "1 lb ground beef"), converts cups, spoons and counted items to grams with USDA household measure weights for that specific food, and sums USDA FoodData Central nutrients. Returns per-line grams and matches, recipe totals, per-serving values, and the per-serving values rounded by the FDA Nutrition Facts rules (21 CFR 101.9) with percent Daily Value. Lines it cannot match are listed, never guessed.
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": {
"lines": "<lines>"
},
"name": "calculate_recipe_nutrition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | Ingredient lines, one per item, amount first: "2 cups all-purpose flour", "1/2 cup butter", "2 large eggs", "200 g chicken breast", "1 tsp salt". | |
| servings | No | Number of servings the recipe makes. Default 1. |