Create Recipe
create_recipeCreate a recipe from catalog foods, as the user's own private food. Nutriely calculates its nutrition from the ingredients, the way the app does. Use when the user asks to make a recipe, and for any dish, sauce, cut or restaurant item the catalog doesn't have: build it from the closest catalog base foods, cooked versions first (see variant.group in a food search). A ribeye is grilled sirloin with beef tallow. A dish or sauce that search doesn't find isn't missing data: propose its ingredients and amounts and build it once the user agrees, or straight away when they asked to log or build the meal. A cooking method without its own version (roasted, grilled, pan-fried) is the base food, plus the added fat as its own ingredient when it matters. Each ingredient is a food_id from a food search and a food_measure_id from that food's measures: quantity counts that measure, so 3 of a "medium" measure is three medium potatoes. The recipe saves straight away, with no preview step, and the result has its id and measures for the diary.
For a drink, "oz" means fluid ounces: the fl oz measure, not ounces, which is weight. "A serving" is the serving measure: on a recipe, servings is one of the portions the whole recipe makes.
Send servings (how many portions the recipe makes) or total_weight_g (the finished recipe's weight in grams), never both. Use cooked ingredients for a cooked dish, rather than raw ones with a lower total_weight_g. The result shows the nutrition per serving, or per 100 g when total_weight_g was sent.
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": {
"name": "<name>",
"ingredients": "<ingredients>",
"request_id": "<request_id>"
},
"name": "create_recipe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The recipe name, in English. | |
| servings | No | How many servings the recipe makes, a whole number. Required unless total_weight_g is sent. | |
| request_id | Yes | A new unique string for this action. Reuse it only when retrying the same action. | |
| ingredients | Yes | The ingredients, up to 100. | |
| total_weight_g | No | The finished recipe's weight in grams. Send this or servings, not both. |