search_food
Find food IDs by name for use in other nutrition tools, including spelling variants and close-name suggestions when no match exists; verify the returned name or alias before using its ID.
Instructions
Find foods by name and get their ids. Call this first: the other food tools take ids from it. Spelling variants match (sambar, sambhar), but every word of the query has to match a word of one name, so a dish that is not in the data returns no results, a note saying so and up to 5 close names as suggestions. Check that a result's name or one of its aliases is the food asked for; when no result is, report the dish as missing instead of using a suggestion or another result in its place. Each result has its kind (dish or ingredient), regions, diet and units: the units get_nutrition and compute_meal accept for that food, with the grams in one of each. total counts every match before limit; when it is larger than the results shown, raise limit or narrow with region, diet or kind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diet | No | Keep foods suitable for this diet: veg includes vegan. | |
| kind | No | Keep only dishes or only ingredients. | |
| limit | No | ||
| query | Yes | A food name. | |
| region | No | Keep dishes from this region. Ingredients have none, so leave it out with kind=ingredient. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Set only when there are no results: says the food is not in the data and is to be reported as missing, not answered with a suggestion or another food, or, when a filter was given, to search again without it first. | |
| query | Yes | ||
| total | Yes | ||
| results | Yes | ||
| suggestions | Yes |