Total energy burned (TDEE)
get_total_energy_burnedCalculate TDEE from actual Apple Watch calorie measurements, returning daily basal/active breakdown and average to set accurate diet targets.
Instructions
TDEE (total daily energy expenditure) = basal + active per day, last N days.
The truthful daily calorie burn from Watch's actual measurements β not
a formula. Diet targets need to aim BELOW this to lose weight (e.g.
eating avg_tdee - 500 = ~0.5 kg/week loss). Returns per-day breakdown
{day, basal_kcal, active_kcal, total_kcal, basal_missing, partial,
basal_hours_covered, basal_hours_expected, basal_incomplete} + average
TDEE. Three kinds of day are excluded from the average and each is
listed with its reason in average_excluded_days: today (partial,
still accumulating), days with no basal data (basal_missing), and
days whose Watch coverage was short (basal_incomplete β e.g. 16 of 24
hours). A short day's kcal is low in proportion to the hours it missed,
so including it drags the average down and, since the error is
one-directional, never cancels out. Quote average_tdee_kcal for diet
targets, and if you quote a single day, check basal_incomplete first.
Use owner prefix to filter by person.
Carries a coverage block: quote coverage.days_covered (distinct days, not
the row count) and coverage.span_days beside any average or trend, and read
coverage.window_satisfied: false as a shorter history than asked, not as a
missing kind. π΄ Before saying how far back someone's data goes, read
coverage.more_available: true means this server can decrypt days OLDER
than first_day that your limit left behind β re-read with a larger
limit, or quote coverage.oldest_available as the real start of their
history. Never report a limit-shaped window as the extent of their data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| fresh | No | ||
| owner | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||