Skip to main content
Glama

Recipes: nutrition, allergens and a shopping list

plan_recipe

Returns source-linked food chemistry explanations for a small set of recognized ingredient combinations, when present, and a page with nutrition per serving and per day (USDA FoodData Central), allergen flags from ingredient names, any active FDA recall on a named brand, the recipe scaled to the requested servings, and one shopping list that merges the same ingredient across the week and rounds up to amounts shops sell, with price links. Inputs are one recipe or up to a week of days (each meal has servings cooked and servings one person eats). Amounts are a number plus a unit (g, kg, oz, lb, ml, l, tsp, tbsp, cup, or a count); grams may be supplied for a can or a branded item. A brand is recorded only when one is supplied. Optional household details (adults, children's ages, allergies, foods to avoid) scale portions and flag conflicts; a weekly budget with a price estimate on each ingredient totals the list. Divux saves the result on a page at a Divux link, up to 25 plans a day per connection. Allergen and diet flags are based on ingredient names; the package label remains the reference. The numbers are nutrition data, not a statement that a meal is healthy or suits a medical condition. Not medical or diet advice. Applies to questions about the nutrition, allergens and shopping list for a recipe or a week of meals.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "plan_recipe"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoA week of meals, up to 21 recipes in all. Omitted when one recipe is set.
dietNoDiets to check the ingredients against
goalsNoThe person's own targets per day; the page's bars are drawn against them instead of FDA Daily Values
titleNoName for a week plan, e.g. 'High-protein week'. A single recipe uses its own title.
budgetNoWeekly food budget in USD. With price_estimate on ingredients, Divux totals the shopping list and warns when it's over.
recipeNoOne recipe. Omitted when days is set.
householdNoFamily meals: who eats. Divux scales portions per person, and flags or rejects ingredients that break an allergy or avoid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / $defs / Recipe / properties / ingredients / items / properties / amount / description
      Previous value: -"The exact amount as a number: 1.5, or '1 1/2'. Not 'a handful' or 'to taste'."New value: +"Amount as a number, for example 1.5 or 1 1/2."
    • changedInput schema / $defs / Recipe / properties / ingredients / items / properties / grams / description
      Previous value: -"The weight in grams of this whole amount, when you know it (best for a can, a cup of something unusual, or a branded item). It beats any conversion."New value: +"Weight in grams of this whole amount. When present, it overrides unit conversion."
    • changedInput schema / $defs / Recipe / properties / ingredients / items / properties / name / description
      Previous value: -"The ingredient, e.g. 'rolled oats', 'chicken breast', 'olive oil'. Put preparation in note, not here."New value: +"Ingredient name, e.g. 'rolled oats', 'chicken breast', 'olive oil'. Preparation goes in note."
    • changedInput schema / $defs / Recipe / properties / ingredients / items / properties / per_100g / description
      Previous value: -"Nutrition per 100 g from the package, only if you have it; skips the lookup"New value: +"Nutrition per 100 g from the package. When present, the nutrition lookup is skipped."
    • changedInput schema / $defs / Recipe / properties / ingredients / items / properties / price_estimate / description
      Previous value: -"Your estimate in USD for this amount of the ingredient, when the person gave a budget. Divux doesn't look up prices here."New value: +"Price estimate in USD for this amount of the ingredient. This tool does not look up prices."
    • changedInput schema / $defs / Recipe / properties / ingredients / items / properties / unit / description
      Previous value: -"g, kg, oz, lb, ml, l, tsp, tbsp, cup, fl oz, or a count word (clove, slice, piece). Leave out for whole items like eggs."New value: +"g, kg, oz, lb, ml, l, tsp, tbsp, cup, fl oz, or a count word (clove, slice, piece). Omitted for whole items such as eggs."
    • changedInput schema / properties / days / description
      Previous value: -"A week of meals, up to 21 recipes in all. Leave out when sending one recipe."New value: +"A week of meals, up to 21 recipes in all. Omitted when one recipe is set."
    • changedInput schema / properties / recipe / description
      Previous value: -"One recipe. Leave out when sending days."New value: +"One recipe. Omitted when days is set."
  2. Changed9 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "Recipe": {
      +    "properties": {
      +      "ingredients": {
      +        "items": {
      +          "properties": {
      +            "amount": {
      +              "description": "The exact amount as a number: 1.5, or '1 1/2'. Not 'a handful' or 'to taste'.",
      +              "exclusiveMinimum": 0,
      +              "maximum": 100000,
      +              "type": "number"
      +            },
      +            "brand": {
      +              "description": "Only when the person named a brand, e.g. 'Cheerios': Divux then checks recent FDA recalls for it",
      +              "maxLength": 60,
      +              "type": "string"
      +            },
      +            "grams": {
      +              "description": "The weight in grams of this whole amount, when you know it (best for a can, a cup of something unusual, or a branded item). It beats any conversion.",
      +              "exclusiveMinimum": 0,
      +              "maximum": 100000,
      +              "type": "number"
      +            },
      +            "name": {
      +              "description": "The ingredient, e.g. 'rolled oats', 'chicken breast', 'olive oil'. Put preparation in note, not here.",
      +              "maxLength": 100,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "note": {
      +              "description": "Preparation, e.g. 'finely chopped'",
      +              "maxLength": 100,
      +              "type": "string"
      +            },
      +            "per_100g": {
      +              "description": "Nutrition per 100 g from the package, only if you have it; skips the lookup",
      +              "properties": {
      +                "added_sugars_g": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "carbs_g": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "fat_g": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "fiber_g": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "kcal": {
      +                  "maximum": 1000,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "protein_g": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "sat_fat_g": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "sodium_mg": {
      +                  "maximum": 40000,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "sugars_g": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "number"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "price_estimate": {
      +              "description": "Your estimate in USD for this amount of the ingredient, when the person gave a budget. Divux doesn't look up prices here.",
      +              "maximum": 10000,
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            "query": {
      +              "description": "What to look up for nutrition when name is not enough, e.g. 'chicken breast raw' or 'cheddar cheese'",
      +              "maxLength": 100,
      +              "type": "string"
      +            },
      +            "unit": {
      +              "description": "g, kg, oz, lb, ml, l, tsp, tbsp, cup, fl oz, or a count word (clove, slice, piece). Leave out for whole items like eggs.",
      +              "maxLength": 30,
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "amount"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 40,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "note": {
      +        "description": "A short tip or description for the top of the page",
      +        "maxLength": 300,
      +        "type": "string"
      +      },
      +      "servings": {
      +        "description": "How many servings the recipe as written makes",
      +        "exclusiveMinimum": 0,
      +        "maximum": 100,
      +        "type": "number"
      +      },
      +      "steps": {
      +        "description": "The method, one step per entry, in order",
      +        "items": {
      +          "maxLength": 500,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 40,
      +        "type": "array"
      +      },
      +      "title": {
      +        "description": "Recipe name",
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title",
      +      "servings",
      +      "ingredients"
      +    ],
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / days / items / properties / meals / items / properties / recipe / $ref
      Added value: +"#/$defs/Recipe"
    • removedInput schema / properties / days / items / properties / meals / items / properties / recipe / properties
      Removed value: -{
      -  "ingredients": {
      -    "items": {
      -      "properties": {
      -        "amount": {
      -          "description": "The exact amount as a number: 1.5, or '1 1/2'. Not 'a handful' or 'to taste'.",
      -          "exclusiveMinimum": 0,
      -          "maximum": 100000,
      -          "type": "number"
      -        },
      -        "brand": {
      -          "description": "Only when the person named a brand, e.g. 'Cheerios': Divux then checks recent FDA recalls for it",
      -          "maxLength": 60,
      -          "type": "string"
      -        },
      -        "grams": {
      -          "description": "The weight in grams of this whole amount, when you know it (best for a can, a cup of something unusual, or a branded item). It beats any conversion.",
      -          "exclusiveMinimum": 0,
      -          "maximum": 100000,
      -          "type": "number"
      -        },
      -        "name": {
      -          "description": "The ingredient, e.g. 'rolled oats', 'chicken breast', 'olive oil'. Put preparation in note, not here.",
      -          "maxLength": 100,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "note": {
      -          "description": "Preparation, e.g. 'finely chopped'",
      -          "maxLength": 100,
      -          "type": "string"
      -        },
      -        "per_100g": {
      -          "description": "Nutrition per 100 g from the package, only if you have it; skips the lookup",
      -          "properties": {
      -            "added_sugars_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "carbs_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "fat_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "fiber_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "kcal": {
      -              "maximum": 1000,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "protein_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "sat_fat_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "sodium_mg": {
      -              "maximum": 40000,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "sugars_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            }
      -          },
      -          "type": "object"
      -        },
      -        "price_estimate": {
      -          "description": "Your estimate in USD for this amount of the ingredient, when the person gave a budget. Divux doesn't look up prices here.",
      -          "maximum": 10000,
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        "query": {
      -          "description": "What to look up for nutrition when name is not enough, e.g. 'chicken breast raw' or 'cheddar cheese'",
      -          "maxLength": 100,
      -          "type": "string"
      -        },
      -        "unit": {
      -          "description": "g, kg, oz, lb, ml, l, tsp, tbsp, cup, fl oz, or a count word (clove, slice, piece). Leave out for whole items like eggs.",
      -          "maxLength": 30,
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "name",
      -        "amount"
      -      ],
      -      "type": "object"
      -    },
      -    "maxItems": 40,
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  "note": {
      -    "description": "A short tip or description for the top of the page",
      -    "maxLength": 300,
      -    "type": "string"
      -  },
      -  "servings": {
      -    "description": "How many servings the recipe as written makes",
      -    "exclusiveMinimum": 0,
      -    "maximum": 100,
      -    "type": "number"
      -  },
      -  "steps": {
      -    "description": "The method, one step per entry, in order",
      -    "items": {
      -      "maxLength": 500,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "maxItems": 40,
      -    "type": "array"
      -  },
      -  "title": {
      -    "description": "Recipe name",
      -    "maxLength": 100,
      -    "minLength": 1,
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / days / items / properties / meals / items / properties / recipe / required
      Removed value: -[
      -  "title",
      -  "servings",
      -  "ingredients"
      -]
    • removedInput schema / properties / days / items / properties / meals / items / properties / recipe / type
      Removed value: -"object"
    • addedInput schema / properties / recipe / $ref
      Added value: +"#/$defs/Recipe"
    • removedInput schema / properties / recipe / properties
      Removed value: -{
      -  "ingredients": {
      -    "items": {
      -      "properties": {
      -        "amount": {
      -          "description": "The exact amount as a number: 1.5, or '1 1/2'. Not 'a handful' or 'to taste'.",
      -          "exclusiveMinimum": 0,
      -          "maximum": 100000,
      -          "type": "number"
      -        },
      -        "brand": {
      -          "description": "Only when the person named a brand, e.g. 'Cheerios': Divux then checks recent FDA recalls for it",
      -          "maxLength": 60,
      -          "type": "string"
      -        },
      -        "grams": {
      -          "description": "The weight in grams of this whole amount, when you know it (best for a can, a cup of something unusual, or a branded item). It beats any conversion.",
      -          "exclusiveMinimum": 0,
      -          "maximum": 100000,
      -          "type": "number"
      -        },
      -        "name": {
      -          "description": "The ingredient, e.g. 'rolled oats', 'chicken breast', 'olive oil'. Put preparation in note, not here.",
      -          "maxLength": 100,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "note": {
      -          "description": "Preparation, e.g. 'finely chopped'",
      -          "maxLength": 100,
      -          "type": "string"
      -        },
      -        "per_100g": {
      -          "description": "Nutrition per 100 g from the package, only if you have it; skips the lookup",
      -          "properties": {
      -            "added_sugars_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "carbs_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "fat_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "fiber_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "kcal": {
      -              "maximum": 1000,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "protein_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "sat_fat_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "sodium_mg": {
      -              "maximum": 40000,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "sugars_g": {
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "number"
      -            }
      -          },
      -          "type": "object"
      -        },
      -        "price_estimate": {
      -          "description": "Your estimate in USD for this amount of the ingredient, when the person gave a budget. Divux doesn't look up prices here.",
      -          "maximum": 10000,
      -          "minimum": 0,
      -          "type": "number"
      -        },
      -        "query": {
      -          "description": "What to look up for nutrition when name is not enough, e.g. 'chicken breast raw' or 'cheddar cheese'",
      -          "maxLength": 100,
      -          "type": "string"
      -        },
      -        "unit": {
      -          "description": "g, kg, oz, lb, ml, l, tsp, tbsp, cup, fl oz, or a count word (clove, slice, piece). Leave out for whole items like eggs.",
      -          "maxLength": 30,
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "name",
      -        "amount"
      -      ],
      -      "type": "object"
      -    },
      -    "maxItems": 40,
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  "note": {
      -    "description": "A short tip or description for the top of the page",
      -    "maxLength": 300,
      -    "type": "string"
      -  },
      -  "servings": {
      -    "description": "How many servings the recipe as written makes",
      -    "exclusiveMinimum": 0,
      -    "maximum": 100,
      -    "type": "number"
      -  },
      -  "steps": {
      -    "description": "The method, one step per entry, in order",
      -    "items": {
      -      "maxLength": 500,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "maxItems": 40,
      -    "type": "array"
      -  },
      -  "title": {
      -    "description": "Recipe name",
      -    "maxLength": 100,
      -    "minLength": 1,
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / recipe / required
      Removed value: -[
      -  "title",
      -  "servings",
      -  "ingredients"
      -]
    • removedInput schema / properties / recipe / type
      Removed value: -"object"
  3. Added

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the write side effect ('Divux saves the result on a page at a Divux link'), a concrete rate limit ('up to 25 plans a day per connection'), upstream data sources (USDA FoodData Central, FDA recalls), and important caveats (flags derive from ingredient names, package label governs, not medical advice). This is exactly the kind of context annotations cannot carry, and nothing contradicts readOnlyHint=false or destructiveHint=false.

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

Conciseness3/5

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

The content is dense and nearly every clause carries information, but it is delivered as one ~200-word run-on paragraph that opens with the least decision-relevant material ('source-linked food chemistry explanations for a small set of recognized ingredient combinations'). Inputs, outputs, limits, and disclaimers are interleaved rather than ordered, so the agent must read the whole block to find the invocation-relevant parts.

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

Completeness4/5

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

For a complex tool with seven top-level parameters, deep nesting, and no output schema, the description does cover what the returned page contains, how inputs are shaped, the weekly-vs-single-recipe mode, household scaling behavior, and the saving/rate-limit behavior. Missing pieces are modest: no mention of failure modes, of what happens when neither recipe nor days is supplied, or of how the chemistry explanations are triggered.

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 genuinely adds meaning: it explains that each meal has 'servings cooked and servings one person eats' (the make/eat distinction), that amounts are a number plus a unit from a fixed set, that grams may substitute for a can or branded item, that a brand is recorded only when supplied, and that household details scale portions and flag conflicts while budget plus price_estimate totals the list. Only the goals object and the per_100g override are left to the schema.

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

Purpose4/5

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

The description states concretely what the tool produces: nutrition per serving and per day from USDA FoodData Central, allergen flags from ingredient names, FDA recall checks on named brands, recipe scaling, and a merged shopping list with price links. That is far more specific than the title alone. It does not, however, name any sibling tool (check_food, check_recalls, compare_prices) to distinguish itself, so it stops short of a 5.

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

Usage Guidelines3/5

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

The closing sentence 'Applies to questions about the nutrition, allergens and shopping list for a recipe or a week of meals' plus 'Inputs are one recipe or up to a week of days' gives implied usage context. There are no explicit exclusions or alternatives — an agent is not told when to prefer check_food or check_recalls over this tool, which matters given the many overlapping food/recall siblings.

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