Adaptive TDEE
Tool id: adaptive-tdee · Methods: regression, endpoints
Formula TDEE (the tdee tool) estimates; this tool measures. Given 2+ weeks of daily
weight and intake logs it computes the TDEE that actually explains your weight change,
using the energy-balance identity TDEE = mean intake − stored energy
(Wishnofsky: 7700 kcal per kg of body-mass change).
| Field | Type | Notes |
|---|---|---|
entries | array (10–400) | one per day: { date, weight, kcal } |
entries[].date | string | YYYY-MM-DD; gaps are fine, duplicates are an error |
entries[].weight | { value, unit } | kg or lb |
entries[].kcal | number | calories logged for that date |
window_days | integer | 3–14, default 7 — smoothing window for endpoints |
methods | string[] | "all" | defaults to "all" |
Methods
Section titled “Methods”- regression — OLS slope of weight over the whole series; robust to gaps.
- endpoints — compares the mean of the first and last
window_daysof weights; requires a date span of at least2 × window_days, otherwise it is skipped.
Data sources: on the Claude iOS app, the native Apple Health integration supplies weight and dietary energy directly; elsewhere, paste an export from your logging app.
Example
Section titled “Example”import { REGISTRY } from "@almostjacked/fitness-tools";const at = REGISTRY.get("adaptive-tdee")!;at.compute(at.input.parse({ entries: [ { date: "2026-01-01", weight: { value: 80, unit: "kg" }, kcal: 2500 }, // ... one entry per day, 10+ total ],}));curl -s localhost:8080/v1/tools/adaptive-tdee \ -X POST -H 'content-type: application/json' \ -d '{ "entries": [ {"date":"2026-01-01","weight":{"value":80,"unit":"kg"},"kcal":2500}, {"date":"2026-01-02","weight":{"value":79.95,"unit":"kg"},"kcal":2500}, {"date":"2026-01-03","weight":{"value":79.9,"unit":"kg"},"kcal":2500}, {"date":"2026-01-04","weight":{"value":79.85,"unit":"kg"},"kcal":2500}, {"date":"2026-01-05","weight":{"value":79.8,"unit":"kg"},"kcal":2500}, {"date":"2026-01-06","weight":{"value":79.75,"unit":"kg"},"kcal":2500}, {"date":"2026-01-07","weight":{"value":79.7,"unit":"kg"},"kcal":2500}, {"date":"2026-01-08","weight":{"value":79.65,"unit":"kg"},"kcal":2500}, {"date":"2026-01-09","weight":{"value":79.6,"unit":"kg"},"kcal":2500}, {"date":"2026-01-10","weight":{"value":79.55,"unit":"kg"},"kcal":2500}, {"date":"2026-01-11","weight":{"value":79.5,"unit":"kg"},"kcal":2500}, {"date":"2026-01-12","weight":{"value":79.45,"unit":"kg"},"kcal":2500}, {"date":"2026-01-13","weight":{"value":79.4,"unit":"kg"},"kcal":2500}, {"date":"2026-01-14","weight":{"value":79.35,"unit":"kg"},"kcal":2500} ] }'Call the adaptive-tdee tool with these arguments:
{ "entries": [ {"date":"2026-01-01","weight":{"value":80,"unit":"kg"},"kcal":2500}, {"date":"2026-01-02","weight":{"value":79.95,"unit":"kg"},"kcal":2500}, {"date":"2026-01-03","weight":{"value":79.9,"unit":"kg"},"kcal":2500}, {"date":"2026-01-04","weight":{"value":79.85,"unit":"kg"},"kcal":2500}, {"date":"2026-01-05","weight":{"value":79.8,"unit":"kg"},"kcal":2500}, {"date":"2026-01-06","weight":{"value":79.75,"unit":"kg"},"kcal":2500}, {"date":"2026-01-07","weight":{"value":79.7,"unit":"kg"},"kcal":2500}, {"date":"2026-01-08","weight":{"value":79.65,"unit":"kg"},"kcal":2500}, {"date":"2026-01-09","weight":{"value":79.6,"unit":"kg"},"kcal":2500}, {"date":"2026-01-10","weight":{"value":79.55,"unit":"kg"},"kcal":2500}, {"date":"2026-01-11","weight":{"value":79.5,"unit":"kg"},"kcal":2500}, {"date":"2026-01-12","weight":{"value":79.45,"unit":"kg"},"kcal":2500}, {"date":"2026-01-13","weight":{"value":79.4,"unit":"kg"},"kcal":2500}, {"date":"2026-01-14","weight":{"value":79.35,"unit":"kg"},"kcal":2500} ]}{ "results": [ { "method": "regression", "value": 2885, "unit": "kcal/day", "detail": { "mean_intake_kcal": 2500, "weight_change_kg_per_week": -0.35, "span_days": 14, "n_entries": 14, "kcal_per_kg": 7700 } }, { "method": "endpoints", "value": 2885, "unit": "kcal/day", "detail": { "mean_intake_kcal": 2500, "weight_change_kg_per_week": -0.35, "span_days": 14, "n_entries": 14, "kcal_per_kg": 7700 } } ], "consensus": { "mean": 2885, "median": 2885, "min": 2885, "max": 2885, "n": 2 }, "skipped": []}Call it another way
Section titled “Call it another way”Full docs for the other protocols: HTTP API · MCP server.