create_meal
ChatGPTSave a meal the person asked to log or plan. Find each food with list_foods first and pass a match as food (its library and key); use newFood only when nothing matches, never for a product the catalogue has. If the food or portion is unclear, ask one short question first (for example: chicken or bean burrito, and one or two?), without asking again for what the person already said. Use state logged for food eaten, and planned only for a plan the person asked to save, since suggestions alone are not a request. To log a meal that was planned, use update_meal instead of creating another. For planning, read get_targets first and respect the diet, dislikes and allergies the person mentions. Pass photos the person attached as photos. Say the meal is saved only after this returns its id; after an error or timeout, check list_meals for that day before trying again.
delete_food
ChatGPTRemove a food from the person's My foods. Meals and recipes that used it keep showing it.
delete_meal
ChatGPTDelete one of the person's meals, with its earlier versions and its photos unless another meal or food uses them.
get_meal
ChatGPTRead one of the person's meals and its items by id.
get_photos
ChatGPTLook at photos saved with the person’s own foods and meals. Images in meals and foods whose path starts with food-photos/ are these; pass up to six of those paths. Returns each photo and a link that expires after ten minutes; never present the link as permanent.
get_profile
ChatGPTRead the name and email of the Splot account this conversation is connected to, when the person asks which account is connected or how Splot knows them.
get_targets
ChatGPTRead the person's daily calorie and macro targets and unit system before planning meals or judging a day, unless already read in this conversation. Each period applies from startsOn until the next; values null means no targets from that day, so judge a past day by its own period, and by list_days, since a partly logged day's totals are only a lower bound. Targets are always kilocalories and grams. units (metric, imperial for US customary, or uk; null when unknown) is how to talk to the person about portions and weights; meal items still use each food's own units. Diet, allergies, likes and dislikes are not saved: use what the person says in the conversation, treat stated allergies as constraints, and never infer allergy safety from missing product data.
list_days
ChatGPTRead which days the person marked as fully or partly logged, from and to being inclusive local dates. A partial day is missing meals the person ate, so its totals are only a lower bound: leave it out of averages and trends, and never call it a low day. A day not listed is unmarked. Read this before judging or averaging past days, unless already read in this conversation.
list_foods
ChatGPTFind foods to log or cook with: the person's own foods (library mine, the default; search it before making a new food), generic ingredients such as eggs, broccoli or rice (library composition, three characters or more), and packaged products by name, brand or barcode (libraries splot and off). This only searches. Pass a result's library and key exactly as food in create_meal, update_meal or a recipe ingredient. Use a short, specific query; if nothing matches, try a simpler query or another library, then ask for the label or offer a clearly marked estimate rather than searching again. A missing match says nothing about ingredients, nutrition or allergy safety.
list_meals
ChatGPTRead the person's saved meals, newest first. Filter by day, by fromDay and toDay (inclusive local dates) for a range such as a week, or by from and to timestamps, and optionally by state to see plans or eaten meals. Only meals in a result exist; never claim others do. A day list_days marks partial is missing meals, so leave it out of averages and never call it a low day.
save_food
ChatGPTSave a food or recipe to My foods, or with id update one of the person's foods. Search list_foods first and save a new food only when nothing matches, never for a product the catalogue already has. Each recipe ingredient is a food from list_foods or, only when nothing matches, a newFood, with a portion; the server adds up the nutrition. When changing a shared or saved food, pass copyFrom so its origin is kept: a product change goes to review and does not change the shared catalogue directly. Meals and recipes keep the version they were saved with. Pass photos the person attached as photos.
set_day
ChatGPTMark a day partial when the person says they ate things that day they did not log, or complete when they confirm everything was logged; logging null clears the mark. Never mark a day only because its total looks low: ask first. Meals are not changed. Confirm the change only after success.
set_targets
ChatGPTChange the person's daily calorie and macro targets when they ask. from is the local date the change starts, usually today; earlier days keep theirs. Add through (inclusive) only to limit the change to certain days, such as through equal to from for one day. values needs all four of caloriesKcal, proteinG, carbsG and fatG; ask for any not given rather than inventing them, or pass values null to stop targets from that day. Nothing else can be saved, such as diet, allergies or an iron target: say so and use it only in this conversation. Confirm the change only after success.
update_meal
ChatGPTChange a saved meal; only what you pass changes. Mark a planned meal as eaten with state logged (and eatenAt if the time differs) rather than creating it again; move, rename or annotate a meal the same way. A field left out keeps its value, and null clears name or notes. Items change one at a time by the item ids the meal returned: items.change sets a portion, items.remove drops items, and items.add adds foods as in create_meal; to swap a food, remove it and add the other. Ask one short question first if a food or portion is unclear. Pass photos the person attached as photos to add them; images replaces the saved photos, and a saved photo left out is deleted. Confirm the change only after success.