Skip to main content
Glama

Find recipes by ingredients on hand

find_by_ingredients
Read-onlyIdempotent

What 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

NameRequiredDescriptionDefault
whoNowho 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
limitNo
queryNooptional free-text to narrow results, e.g. 'breakfast pancakes'
veganNoonly vegan recipes: vegetarian and no eggs, dairy or honey
feedingNohow 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_freeNoonly recipes without tree nuts or peanuts; coconut counts as nut-free
max_fat_gNomaximum grams of fat per serving
dairy_freeNoonly recipes without milk, butter, cheese, cream or yogurt
min_ratingNoonly 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
vegetarianNoonly vegetarian recipes: no meat, poultry, fish, seafood or gelatin in the ingredients
gluten_freeNoonly recipes without wheat, barley, rye, oats or products made from them
ingredientsNoingredients to cook with, e.g. ['oats','milk','eggs','skyr','berries']; leave empty to cook from the pantry alone
max_carbs_gNomaximum grams of carbohydrates per serving
max_sugar_gNomaximum grams of sugar per serving
min_fiber_gNominimum grams of fiber per serving
min_reviewsNoonly 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_proteinNoonly 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_caloriesNoonly recipes with at most this many calories per serving, e.g. 300
min_caloriesNoonly recipes with at least this many calories per serving
ignore_pantryNotrue to match only the ingredients passed and not count the pantry, for 'using just these'
min_protein_gNominimum grams of protein per serving, e.g. 10
batch_friendlyNotrue to leave out dishes cooked per portion, for a crowd; recipes not yet classified stay in
max_total_minutesNo
exclude_ingredientsNoingredients 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_dietsNotrue 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

NameRequiredDescriptionDefault
checkNo
matchesYes
ask_userNo
from_pantryNo
ingredientsYes
pantry_ingredientsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / matches / items / properties / based_on_recipe_id
      Added value: +{
      +  "minimum": 0,
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / ignore_profile_diets
      Added value: +{
      +  "description": "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",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / main_protein / description
      Previous value: -"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, seafood (shellfish, squid, octopus), egg, legume (beans, lentils, chickpeas, tofu), none; e.g. ['beef','pork','lamb'] for red meat or ['fish','seafood']; judged from the ingredients, so chicken stock alone does not make a chicken dish"New value: +"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"
  4. Changed2 schema fields changed
    • changedInput schema / properties / min_rating / description
      Previous value: -"only recipes rated at least this many stars, source ratings and ask.recipes stars averaged together; off unless passed"New value: +"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"
    • changedInput schema / properties / min_reviews / description
      Previous value: -"only recipes with at least this many ratings, source and ask.recipes together; off unless passed"New value: +"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"
  5. Changed1 schema field changed
    • addedOutput schema / properties / check
      Added value: +{
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • addedInput schema / properties / who
      Added value: +{
      +  "description": "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",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  7. Changed4 schema fields changed
    • changedInput schema / properties / min_rating / description
      Previous value: -"only recipes the source rates at least this many stars; off unless passed"New value: +"only recipes rated at least this many stars, source ratings and ask.recipes stars averaged together; off unless passed"
    • changedInput schema / properties / min_reviews / description
      Previous value: -"only recipes with at least this many source ratings; off unless passed"New value: +"only recipes with at least this many ratings, source and ask.recipes together; off unless passed"
    • addedOutput schema / properties / matches / items / properties / askrecipes_ratings
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / matches / items / properties / my_rating
      Added value: +{
      +  "properties": {
      +    "note": {
      +      "type": "string"
      +    },
      +    "stars": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "stars"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
  8. Changed2 schema fields changed
    • addedInput schema / properties / main_protein
      Added value: +{
      +  "description": "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, seafood (shellfish, squid, octopus), egg, legume (beans, lentils, chickpeas, tofu), none; e.g. ['beef','pork','lamb'] for red meat or ['fish','seafood']; judged from the ingredients, so chicken stock alone does not make a chicken dish",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / matches / items / properties / main_protein
      Added value: +{
      +  "type": "string"
      +}
  9. Changed1 schema field changed
    • addedOutput schema / properties / ask_user
      Added value: +{
      +  "type": "string"
      +}
  10. Changed2 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / matches / items / additionalProperties
      Removed value: -false
  11. Changed3 schema fields changed
    • addedInput schema / properties / batch_friendly
      Added value: +{
      +  "description": "true to leave out dishes cooked per portion, for a crowd; recipes not yet classified stay in",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / feeding
      Added value: +{
      +  "description": "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",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / matches / items / properties / scale_class
      Added value: +{
      +  "type": "string"
      +}
  12. Changed9 schema fields changed
    • addedInput schema / properties / exclude_ingredients
      Added value: +{
      +  "description": "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",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedInput schema / properties / ignore_pantry
      Added value: +{
      +  "description": "true to match only the ingredients passed and not count the pantry, for 'using just these'",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / ingredients / description
      Previous value: -"ingredients on hand, e.g. ['oats','milk','eggs','skyr','berries']"New value: +"ingredients to cook with, e.g. ['oats','milk','eggs','skyr','berries']; leave empty to cook from the pantry alone"
    • removedInput schema / required
      Removed value: -[
      -  "ingredients"
      -]
    • addedOutput schema / properties / from_pantry
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / ingredients
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / matches / items / properties / matched_requested
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / pantry_ingredients
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "matches"
      -]New value: +[
      +  "matches",
      +  "ingredients"
      +]
  13. Changed8 schema fields changed
    • addedInput schema / properties / dairy_free
      Added value: +{
      +  "description": "only recipes without milk, butter, cheese, cream or yogurt",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / gluten_free
      Added value: +{
      +  "description": "only recipes without wheat, barley, rye, oats or products made from them",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / min_rating / description
      Previous value: -"minimum source star rating, default 4.2"New value: +"only recipes the source rates at least this many stars; off unless passed"
    • changedInput schema / properties / min_reviews / description
      Previous value: -"minimum number of source ratings, default 25"New value: +"only recipes with at least this many source ratings; off unless passed"
    • addedInput schema / properties / nut_free
      Added value: +{
      +  "description": "only recipes without tree nuts or peanuts; coconut counts as nut-free",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / vegan
      Added value: +{
      +  "description": "only vegan recipes: vegetarian and no eggs, dairy or honey",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / vegetarian
      Added value: +{
      +  "description": "only vegetarian recipes: no meat, poultry, fish, seafood or gelatin in the ingredients",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / matches / items / properties / diets
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  14. Changed2 schema fields changed
    • addedOutput schema / properties / matches / items / properties / nutrition_for
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / matches / items / properties / servings
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
  15. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare a safe, idempotent, closed-world read; the description adds substantial behavior beyond that: a two-factor ranking rule, pantry ingredients counting as on hand, profile-driven allergen/dislike exclusion and diet persistence, the profile-supplied default time budget with max_total_minutes=-1 as the escape hatch, and the conditional 'check' instruction to verify ingredients with get_recipe before recommending.

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?

Purpose is front-loaded and no sentence is pure filler, but the prose is dense and hops between ranking, pantry, profile, ask_user fallback and tool-calling instructions without paragraph breaks or ordering. Some sentences are syntactically awkward, notably 'who names the people eating, by name or role, when not everyone is,' which reads as a truncated note.

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 25-parameter tool with an output schema and full annotations, the description covers the hard parts: ranking logic, pantry interplay, profile defaults and per-person scoping. Gaps are minor — limit and pagination behavior are never described, and the interaction order between profile diets and ignore_profile_diets relies on the schema text.

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

Parameters5/5

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

Schema coverage is already 92%, yet the description still adds meaning the schema does not carry — how pantry inclusion changes ranking, that max_total_minutes defaults from the profile and -1 lifts it, and how the who list scopes allergens per person. It also explains the reasoning behind the check flag (product names can hide an excluded ingredient), which no parameter schema states.

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?

Opens with a concrete verb+resource framing: 'find recipes that use ingredients the user already has,' and adds the ranking dimension ('how many of those ingredients a recipe uses and how few extra ones it needs'), which makes it clearly not a keyword search. It references search_recipes only for filter parity, so the boundary with that sibling is implied rather than stated.

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

Usage Guidelines4/5

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

Gives rich situational triggers — leftovers, a full fridge, a pantry to use up, an ingredient about to turn, 'what can I make with what I have' — plus fallbacks (cook from pantry alone; route to ask_user when the pantry is empty). It never names when to prefer a different sibling (e.g. search_recipes for a dish by name), so alternatives remain implicit.

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.