Skip to main content

Nutrition

Meal log, recipes, plans, pantry, and shopping list. nutrition section.
2 min read

19 tools in four files (nutrition.ts, nutrition_meals.ts, nutrition_recipes.ts, nutrition_plans.ts), gated on nutrition.

Meal log#

ToolR/WEndpoint
list_meal_logsRGET .../meal-logs
create_meal_logWPOST .../meal-logs
update_meal_logWPATCH .../meal-logs/{logId}
soft_delete_meal_logW · approvalDELETE .../meal-logs/{logId}

mealType: breakfast, lunch, dinner, snack. One call per meal (writeOnce). update_meal_log only changes mealType / title / dateKey.

Recipes#

ToolR/WEndpoint
list_recipesRGET .../recipes
get_recipeRGET .../recipes/{recipeId}
create_recipeWPOST .../recipes
update_recipeWPATCH .../recipes/{recipeId} + POST of ingredients / steps / tools

A complete recipe is always saved in two phases within the same turn:

  1. create_recipe creates the header (name, description, and servings) and returns the ID.
  2. update_recipe takes that ID as recipeId and adds, in a single call, every ingredient, ordered step, and tool.

The update_recipe arrays are additive: they keep existing rows. When creating a new recipe, send the full list after create_recipe; Eve must not stop after creating the header or send the user to manual editing.

Meal plans#

ToolR/WEndpoint
get_meal_plan_weekRGET .../meal-plans/by-week + slots
plan_mealWcreates a plan if needed + POST .../slots

Shopping and pantry#

ToolR/WNotes
list_shopping_items / create_shopping_item / update_shopping_itemR/WBasic CRUD
toggle_shopping_itemWPreferred for marking done / pending
list_inventory / create_inventory_item / update_inventory_itemR/WPantry
adjust_inventory_quantityWDelta (±); does not go below 0

Dispatcher manage_nutrition#

resource ∈ recipes | mealPlans | mealPlanSlots; operation ∈ list | get | create | update | activate | complete | delete.

mealPlanSlots.delete requires approval. Prefer narrow tools for recipes and plan_meal.

Note

Meal log, pantry, and shopping list are different things. "What did I eat today?" → meal logs. "Add milk" → shopping list.

Bulk create — nutrition_bulk.ts#

ToolR/WEndpoint
bulk_create_meal_logsWPOST .../meal-logs/bulk-create
bulk_create_recipesWPOST .../recipes/bulk-create
bulk_create_shopping_itemsWPOST .../shopping/items/bulk-create
bulk_create_inventory_itemsWPOST .../inventory/bulk-create
bulk_create_meal_plansWPOST .../meal-plans/bulk-create

Cap 50, partial success { ids, errors }.