Skip to content

Add get_recent_foods and get_frequent_foods tools - #98

Merged
rwestergren merged 1 commit into
mainfrom
feat/94-recent-frequent-foods
Nov 28, 2026
Merged

rwestergren merged 1 commit into
mainfrom
feat/94-recent-frequent-foods

Conversation

@rwestergren

Copy link
Copy Markdown
Owner

Closes #94.

For requests like “log my usual yogurt,” agents can now look up foods the account remembers and reuse the food ID, measure ID, translation ID, and amount with add_food_entry.

Both read-only tools use one request to Cronometer’s native get_recent_foods endpoint:

  • get_recent_foods reverses the response to match the app’s Most Recent order.
  • get_frequent_foods sorts the same foods by descending frequency counter, keeping recent order for ties.

Both accept an optional case-insensitive name filter and a limit of 1–50. The native list has no configurable history window. Its counter is a ranking signal, and its remembered serving can differ from the latest diary entry.

@rwestergren
rwestergren merged commit 8a1c442 into main Nov 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: a recent_foods tool, so an agent can pick "my usual X" from the user's own recent diary

1 participant