create_diet_plan
Create a diet plan for a client (confirm-gated). To check whether one was already created — for example if asked "is it done?" — call list_diet_plans instead of calling this again; re-running this with confirm: true a second time for the same client and title returns the plan already on file rather than writing a duplicate. Prefer meals like { name, scheduledTime: 'HH:mm', order, days: [MONDAY..SUNDAY], section, calories, macros, description, ingredients }. description: one short sentence explaining why this meal is included — shown to the client under the meal. ingredients: REQUIRED on every meal — break each meal into its raw materials with real quantities — e.g. [{ name: 'Paneer', quantity: 60, unit: 'g', calories: 159, protein: 11, carbs: 2, fat: 13 }, { name: 'Cooking oil', quantity: 10, unit: 'ml', isCookingAddition: true, calories: 88, fat: 10 }]. A meal with only calories/macros and no ingredients is rejected. Always include the cooking fat (oil/ghee/butter) as its own ingredient — it is easy to forget and adds real calories. Use get_ingredient_nutrition for the numbers, and make the ingredient calories/macros sum roughly to the meal's calories/macros. Whatever itemised breakdown you show the coach in chat MUST be sent here as the ingredients array, or the client's saved plan will lose every quantity. Legacy slot values like BREAKFAST/LUNCH/DINNER/SNACK are accepted and auto-mapped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meals | Yes | ||
| title | Yes | ||
| confirm | No | Must be true to actually execute. If false/omitted, returns a preview only. | |
| endDate | No | ||
| clientId | Yes | ||
| startDate | Yes | YYYY-MM-DD |