Search saved foods
metri_search_foodsSearch the user's private metri library of saved foods and cooked batches. It reads only metri state, not the public web.
Pass at most one field:
foodId: read that one food in full; a batch includes its components.
query: search food names. Returns up to 20 matches in relevance order.
cursor: fetch the next 20 results of the previous search or browse.
nothing: browse the whole library, most recently changed first, 20 at a time.
Search and browse results omit batch components and include nextCursor when more results exist.
Search when the user refers to something personal or saved, such as their usual dish, a cooked batch or a specific product, and log with its foodId when it is the same food. Generic foods can be logged inline without a search.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "metri_search_foods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Key words from the food's name in the user's language, such as "chicken curry". Foods containing any of the words come back, best matches first; the last word also matches as a prefix. | |
| cursor | No | nextCursor from the previous response, to get the next page. It already carries that search, so send it without query. | |
| foodId | No | ID of one saved food from an earlier metri result. Returns only that food, in full, including a batch's components. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| foods | Yes | ||
| nextCursor | No |