Find their foods
search_foodsUse this when the person tells you a food they ate without a photo, before log_foods. Find the person's own foods before anything else, by name or by kind: the words they used ("protein powder", "milk", "my usual bread"), not a brand you guess. mine is their saved foods that fit, each with an id, macros per 100 g, their usual grams (lastGrams), match (name: its name holds the words; kind: it is that kind of food, so "protein powder" finds their whey; word: only the last of their words, the one that says what it is, fits, so it is a different food of that sort, never theirs unless they say so) and lastEatenAt. When none fits by name, recent lists the saved foods they logged lately: read it too, because their food is often named by brand (a protein powder called Impact Lean Whey, a milk called Light Start). list is at most three plain foods from the food list, each with a foodKey; logging one saves it as a new food of theirs. Use their own food (mine or recent) when it is the same thing, or the kind of food they named (their milk for "milk", their whey for "protein powder"); a food that only sounds alike or shares a word is not it (corn flour is not corn, dark soy sauce is not dark chocolate). "My most recent" or "my usual" means the one they ate latest. Use list, an estimate or create_food only when none of theirs is it, and say it's new. Search before estimating, and log what it finds by grams. A meal of several foods is one search: put them in one query separated by semicolons ("egg pasta; halloumi; butter; olive oil") and foods comes back with one result for each, so you can log the whole meal in your next step. A recipe has recipe set: its foods and their grams, serves, cookedGrams and gramsLeft, what's left of the pot. Do not use to read a photo; use read_meal_photo.
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": {
"query": "<query>"
},
"name": "search_foods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The words they used for the food, such as "protein powder" or "my usual bread"; several foods separated by semicolons ("oats; milk; whey") come back as foods, one result each. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |