Resolve ingredients
resolve_ingredientsMatches ingredient names to FoodData Central foods and converts portions to grams.
Portions such as 2 tbsp, 1/2 cup, or 1 medium are converted with each food's own measured portions, so 1 cup differs for spinach and olive oil. Repeated ingredients are looked up once. method says how each portion was converted. Ingredients that could not be converted are listed under unresolved with the portions that food supports, and alternatives lists runner-up matches with their fdc_id. Bare names such as rice or beans match many records; names with the cooked state, such as cooked white rice, match more precisely. About a fifth of USDA foods have a portion table.
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": {
"items": "<items>"
},
"name": "resolve_ingredients"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Ingredients, each with a food name or fdc_id and a portion or grams, e.g. {"food": "eggplant", "portion": "2 medium"}. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||