copy_food_entries
ChatGPTCopy previously logged food entries to another day, preserving the exact foods, amounts, and nutrition. Use this instead of re-searching and re-logging. Pass entry_ids from get_food_log: a whole day, one meal type, or any subset. Each copy keeps its source entry's meal type and time of day, in the source entry's own timezone unless you pass timezone. Copying to the same day the entries are on creates duplicates, so confirm with the user first. Entries that cannot be copied (Apple Health imports, deleted entries) are listed in skipped with the reason, and the rest are still copied. To log a past item again today at the current meal type, use log_food with an entry_id instead. The response's undo removes the copies.
create_meal
ChatGPTSave a new meal (foods logged together as a group) to the user's saved meals (the Library tab in current app versions). Each item is one of: food_id from search, saved_food_id for the user's saved copy of a food, entry_id to copy a portion the user logged, or recipe_id to add a saved recipe. Amounts resolve like log_food's quantity and unit. Returns the meal with its meal_id, edit_id, and item ids, and an undo that removes it. It syncs to the user's devices. For a food search can't find, save it first with create_saved_food and add it by the saved_food_id that returns.
create_recipe
ChatGPTSave a new recipe to the user's saved recipes (the Library tab in current app versions). Each ingredient is one of: food_id from search, saved_food_id for the user's saved copy of a food, entry_id to copy a portion the user logged, or recipe_id to use a saved recipe as an ingredient. Amounts resolve like log_food's quantity and unit. Returns the recipe with its recipe_id, edit_id, and ingredient ids, and an undo that removes it. It syncs to the user's devices. For an ingredient search can't find, save it first with create_saved_food and add it by the saved_food_id that returns.
create_saved_food
ChatGPTSave a new custom food to the user's saved foods (the Library tab in current app versions), with its serving and nutrition, so it can be logged again later with log_food. Nutrients are {value, unit} amounts in the units printed or said, per serving by default; a label per 100 g or per 30 g can be sent as printed with nutrients_per. The nutrients map that get_saved_item returns can be copied here unchanged (leave out netCarbs and carbsFiberExcluded). To log something once without saving it, use log_food's quick_entry instead. Returns the new saved_food_id, and an undo that removes the food. It syncs to the user's devices.
delete_food_entry
ChatGPTDelete a food entry from the user's log. Pass the entry_id from get_food_log. The response echoes the deleted entry, and for 90 days the response's undo puts it back with the same entry_id.
delete_saved_item
ChatGPTDelete one of the user's saved foods, recipes, or meals (the Library tab in current app versions). Before calling, confirm the item with the user by name: the deletion syncs to all their devices and cannot be undone in the app. Food already logged is not affected. At most 10 saved items can be deleted through assistants in 24 hours. Delete one item per call, one call at a time; parallel calls are refused as busy. The response echoes the item, and the response's undo recreates it with its original ids and contents, for 90 days.
get_body_metrics
ChatGPTThe user's body data: profile (sex, age) and the latest weight and height as of a day, with optional weight history over a date range. Every reading is in the user's preferred units, with the app's text in display.
get_food_log
ChatGPTList the food entries the user logged on a given day, in the order the Foodnoms app shows them: grouped by meal in the user's meal order (meal_types), each meal by time of day when entries have one, otherwise in the order they were logged. Each entry has its meal type, amount (as the app writes it), and nutrients as {value, unit} amounts (carbs also name their basis): energy, carbs, protein and fat, plus any other nutrient the user shows in the app's log. meals and day_totals give the totals the app shows under each meal and for the day. Entries imported from Apple Health are merged the way the app shows them and can't be changed here. Also lists the user's meal types (meal_types), including custom ones like Dessert. Write the app's name as Foodnoms, with a lowercase n.
get_goal_progress
ChatGPTGet the user's progress against their nutrition goals: per goal and per day, the target and acceptable range, the amount logged, and the amount remaining, and whether the day met the goal (status). Defaults to today; pass a date range for past performance. Targets come back even for days with nothing logged, so this also answers "what are my targets?". A user with no goals gets empty goals; get_nutrition still reports what they ate. Requests are bounded by the volume of logged data AND by a goals-times-days budget (evaluation costs per goal per day): a single call covers at most a year, less when many goals are evaluated over a long range. Over-large requests return the most recent portion plus an exact call in coverage.continuation.next_call. Invoke it exactly, repeat from every partial response, and do not present the requested range as complete until coverage.complete is true.
get_nutrition
ChatGPTHow much of one or more nutrients the user consumed, from their food log: a day-by-day (or month-by-month) series plus range totals and per-day averages. Defaults to energy, carbs, protein and fat over the last 7 days. Works whether or not the user has goals. Requests are bounded by the volume of logged data, not by a fixed day count: an over-large request returns the most recent portion plus an exact call in coverage.continuation.next_call. Invoke it exactly, repeat from every partial response, and do not present the requested range as complete until coverage.complete is true. A single call also covers at most a year of daily buckets (about ten years at month resolution). At month resolution, coverage expands the requested start outward to the 1st of its month so each response serves whole calendar months: covered_start_day may then be EARLIER than the requested start. carbs follows the user's Carbohydrates setting; pass carbs_basis includes_fiber for total carbohydrates or excludes_fiber for carbs minus fiber.
get_saved_item
ChatGPTGet the full details of one saved item by id (from search or list_saved_items): a saved food (every nutrient, loggable units, barcode), a recipe (servings, ingredients, per-serving nutrition), or a saved meal (member foods and totals). Saved items are the user's saved foods, recipes, and meals (the Library tab in current app versions). Every item includes edit_id, which update_saved_food, update_recipe and update_meal take; recipes and meals also list each member's id.
get_top_foods
ChatGPTList the foods that contributed the most of a given nutrient over a date range, e.g. "what were my biggest sources of sodium last week?", with each food's total contribution and how many times it was logged. Requests are bounded by the volume of logged data: an over-large request returns the most recent portion plus an exact call in coverage.continuation.next_call. Invoke it exactly, repeat from every partial response, and do not present the requested range as complete until coverage.complete is true. A single call also covers at most about ten years. carbs follows the user's Carbohydrates setting; pass carbs_basis includes_fiber for total carbohydrates or excludes_fiber for carbs minus fiber.
list_saved_items
ChatGPTList the user's saved foods, recipes, or meals (the Library tab in current app versions), one kind per call, sorted by date edited (the default), date created, or name. Returns one page of up to limit items (default 50) plus total_count, the size of the whole list; a page of recipes or meals with many ingredients can end sooner. When coverage.complete is false, invoke coverage.continuation.next_call exactly and repeat until complete is true; never present one page as the whole list. To find one specific item, use search instead. Each item carries the id for get_saved_item and log_food (saved_food_id, recipe_id, or meal_id). Favorites are not included.
log_food
ChatGPTLog to the user's Foodnoms food log. Search first, then pass exactly one item: - entry_id: a past entry from search's previously_logged results, logged again at the portion the user chose (best when search lists one). {"entry_id": "…"} - saved_food_id: the user's saved food. {"saved_food_id": "…", "quantity": 2, "unit": "slice"} - recipe_id: a saved recipe, as one entry; quantity is servings. {"recipe_id": "…", "quantity": 1.5} - meal_id: a saved meal; each item is logged as its own entry at its saved amount (no quantity or unit). {"meal_id": "…", "meal_type": "Breakfast"} - food_id: a food from search. {"food_id": "foodnoms:169910", "quantity": 1, "unit": "cup"} - quick_entry: one-off nutrition for something search can't find; saves no food. {"quick_entry": {"name": "Street Taco", "serving": "1 taco", "nutrients": {"energy": {"value": 210, "unit": "kilocalorie"}}}} To log a recipe with changes ("I skipped the beans"), add recipe with the edit_id from get_saved_item: it changes this log's copy only, and the saved recipe is not changed (use update_recipe for that). Entries sync to the user's devices. The response's undo removes what this call logged. Write the app's name as Foodnoms, with a lowercase n.
log_weight
ChatGPTRecord the user's body weight for a day. The app keeps one weight entry per day, so logging a day that already has one REPLACES it (replaced gives the old reading, in the unit you logged in). Logging the weight the day already has saves nothing (unchanged: true). Pass unit to be explicit, otherwise the user's preferred unit applies. The response's undo puts the day's previous weight back, or removes the new entry when the day had none.
search
ChatGPTSearch everywhere the user can log from, in one call: their previously logged foods (food-log history, with the portion they last used), their saved foods, recipes, and meals (the Library tab in current app versions), and the public Foodnoms food database. Results come back in sections: previously_logged, saved_foods, saved_recipes, saved_meals, and database. Each result carries the id to log it with log_food (entry_id, saved_food_id, recipe_id, meal_id, or food_id) or read it in full (get_saved_item). When logging, prefer sources in this order: (1) previously_logged, re-logged by entry_id, which keeps the exact food and portion the user chose; (2) saved items; (3) database. Omit query to list recent items. To browse every saved item of one kind, use list_saved_items.
undo_change
ChatGPTPut back what one earlier assistant change did, using the change_id from that write's undo field: an edit returns to its previous version, a deletion comes back with its original ids, and anything the change created is removed. It works for 90 days, and only while nothing it touched has changed since; otherwise nothing is changed and the reason is returned. Tell the user what will be undone before calling it, and call it one change at a time, newest first. Its own response has an undo that redoes the change.
update_food_entry
ChatGPTEdit a food entry on the user's log: change the amount (quantity/unit), its accuracy, or move it to a different meal type, day, or time. Pass the entry_id from get_food_log. All other entry data is preserved, and the edit syncs to the user's devices automatically. For a logged recipe, recipe changes this entry's copy of its ingredients, servings or total; the saved recipe is not changed (use update_recipe for that). Returns the entry as it is now (after), with changes: changes lists only what changed; the item shows the new values. The response's undo puts the previous version back.
update_meal
ChatGPTEdit one of the user's saved meals. Pass meal_id and the edit_id from get_saved_item or the response that last saved it. To change items, pass the complete new list: keep ones by item_id, add new ones by food_id, saved_food_id, entry_id, or recipe_id, and leave out ones to remove. Returns the meal as get_saved_item shows it, with changes: changes lists only what changed; the item shows the new values. The response's undo puts the previous version back exactly. Meals the user already logged keep what they were logged with. A meal holds at most 100 items; one with more (made before that limit) is edited in the Foodnoms app. For a food search can't find, save it first with create_saved_food and add it by the saved_food_id that returns.
update_recipe
ChatGPTEdit one of the user's saved recipes. Pass recipe_id and the edit_id from get_saved_item or the response that last saved it. To change ingredients, pass the complete new list: keep ones by ingredient_id, add new ones by food_id, saved_food_id, entry_id, or recipe_id, and leave out ones to remove. Returns the recipe as get_saved_item shows it, with changes: changes lists only what changed; the item shows the new values. The response's undo puts the previous version back exactly. Recipes the user already logged keep what they were logged with; to change what one logged entry was made of, use update_food_entry's recipe. A recipe holds at most 100 ingredients; one with more (made before that limit) is edited in the Foodnoms app. For an ingredient search can't find, save it first with create_saved_food and add it by the saved_food_id that returns.
update_saved_food
ChatGPTEdit one of the user's saved foods: name, brand, barcode, serving, or nutrients (send only what changes; null clears a nutrient). Pass edit_id from get_saved_item so an edit made since in the app is not overwritten. Amounts are per serving by default, as get_saved_item shows them; a label per 100 g can be sent as printed with nutrients_per. Recipes and logged entries that already contain this food keep their own copy and do not change. Returns the food as get_saved_item shows it, with changes: changes lists only what changed; the item shows the new values. The response's undo puts the previous version back exactly.