Find recipes by ingredients on hand
find_by_ingredientsWhat can I make with X and Y: find recipes that use ingredients the user already has, for leftovers, a full fridge, a pantry to use up, an ingredient about to turn. Ranks by how many of those ingredients a recipe uses and how few extra ones it needs. The user's pantry counts as on hand too, so a recipe that only needs pantry staples on top of what was passed ranks as nearly complete; with no ingredients passed it cooks from the pantry alone, for "what can I make with what I have"; when the pantry is empty too, ask_user carries the question to put to the user. Takes the same diet, nutrition and exclude_ingredients filters as search_recipes. Each result links to its source. The user's profile, once saved with update_profile, excludes allergens and dislikes, keeps its diets on unless ignore_profile_diets is passed, and supplies the default time budget; pass max_total_minutes=-1 to lift it. who names the people eating, by name or role, when not everyone is. check, present when the profile has allergens, says to read a recipe's ingredients with get_recipe before recommending it, because a product name can hide an excluded ingredient.
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": "find_by_ingredients"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| who | No | who is eating, by the names or roles saved as people on the profile, e.g. ['Dad','Ana'] or ['adults'] when the kids are out, ['kids'] when only they eat; only those people's allergens and dislikes apply on top of the household's; leave empty for everyone | |
| limit | No | ||
| query | No | optional free-text to narrow results, e.g. 'breakfast pancakes' | |
| vegan | No | only vegan recipes: vegetarian and no eggs, dairy or honey | |
| feeding | No | how many people are eating, e.g. 10 for a dinner party; from six up, dishes cooked in one vessel (stews, braises, tray bakes, casseroles, soups, roasts) rank ahead of dishes cooked per portion (steaks, burgers, pancakes, stir-fries); nothing is excluded | |
| nut_free | No | only recipes without tree nuts or peanuts; coconut counts as nut-free | |
| max_fat_g | No | maximum grams of fat per serving | |
| dairy_free | No | only recipes without milk, butter, cheese, cream or yogurt | |
| min_rating | No | only recipes rated at least this many stars, source ratings and ask.recipes stars averaged together; recipes nobody has rated yet and private uploads stay in; off unless passed | |
| vegetarian | No | only vegetarian recipes: no meat, poultry, fish, seafood or gelatin in the ingredients | |
| gluten_free | No | only recipes without wheat, barley, rye, oats or products made from them | |
| ingredients | No | ingredients to cook with, e.g. ['oats','milk','eggs','skyr','berries']; leave empty to cook from the pantry alone | |
| max_carbs_g | No | maximum grams of carbohydrates per serving | |
| max_sugar_g | No | maximum grams of sugar per serving | |
| min_fiber_g | No | minimum grams of fiber per serving | |
| min_reviews | No | only recipes with at least this many ratings, source and ask.recipes together; recipes with no rating at all and private uploads stay in; off unless passed | |
| main_protein | No | only recipes whose main protein is one of these: chicken, turkey, duck, goose, quail, pheasant, guinea_fowl, beef (with veal), pork (with ham, bacon and sausage), lamb (with mutton), goat, venison, bison, rabbit, fish, shrimp (with prawns), seafood (other shellfish, squid, octopus), egg, legume (beans, lentils, chickpeas, tofu), none; e.g. ['beef','pork','lamb'] for red meat or ['fish','shrimp','seafood']; judged from the ingredients, so chicken stock alone does not make a chicken dish | |
| max_calories | No | only recipes with at most this many calories per serving, e.g. 300 | |
| min_calories | No | only recipes with at least this many calories per serving | |
| ignore_pantry | No | true to match only the ingredients passed and not count the pantry, for 'using just these' | |
| min_protein_g | No | minimum grams of protein per serving, e.g. 10 | |
| batch_friendly | No | true to leave out dishes cooked per portion, for a crowd; recipes not yet classified stay in | |
| max_total_minutes | No | ||
| exclude_ingredients | No | ingredients to leave out for this search, whole-word match on the ingredient list, e.g. ['chicken','brussels sprouts'] to avoid repeating what the week already has; nuts, gluten and dairy as a word apply the matching diet filter; the profile's allergens and dislikes stay excluded on top | |
| ignore_profile_diets | No | true to switch off the diets saved on the profile for this search only, for cooking for a guest or when the user asks for something outside their usual diet; allergens and dislikes stay excluded |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| check | No | ||
| matches | Yes | ||
| ask_user | No | ||
| from_pantry | No | ||
| ingredients | Yes | ||
| pantry_ingredients | No |