Parse ingredient
parse_ingredientParse a free-form ingredient line into amount, unit, food, note, and matched IDs while creating any missing Tandoor food or unit records for recipe ingredient creation.
Instructions
Parse a free-form ingredient string (e.g. "2 cups flour") into amount, unit, unit_id, food, food_id, note. Writes to the database: Tandoor creates any Food or Unit row it does not already have. unit and food are the matched row names, so "cups" can come back as "cup". With no unit, unit is "" and unit_id is omitted. food_id and unit_id pass straight to create_ingredient. Blank text returns Tandoor's 400. Tandoor's parser is heuristic and can misfire on compound descriptions, brand names, or non-English units.
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": {
"text": "<text>"
},
"name": "parse_ingredient"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | One ingredient line, e.g. "2 cups flour". |