import_recipe
Convert free-text ingredients into a Cronometer recipe. Enter each ingredient on a new line; the server matches foods and converts amounts to grams.
Instructions
Create a recipe from a free-text ingredient list.
Cronometer's "Import Recipe" feature: pass ingredients as plain text, one per line, and the server matches each to a food and converts the amount to grams. No need to call search_foods first.
Prefer this when the user describes ingredients in their own words. Use add_recipe instead when you have exact food_ids and gram weights -- e.g. the user confirmed specific foods from search_foods results.
Matching is fuzzy, so report the returned matches back to the user for confirmation. Unresolved lines are listed under "unmatched" and excluded from the recipe. This saves to My Foods; use add_food_entry to log it.
Args: ingredients: Ingredient lines separated by newlines, e.g. "2 tbsp olive oil\n200g chicken". Include quantities where known, since bare names can match surprising amounts. name: Recipe name. Defaults to a server-generated one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| ingredients | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |