Simulate a candidate plan: CTL/ATL/TSB, ramp, risk days, your own response (read-only, model-based)
simulate_planPreview a candidate training plan day by day to see projected fitness, fatigue, and form before committing, and compare alternative plans.
Instructions
A WHAT-IF for a candidate week or multi-week plan: what it does to Fitness (CTL), Fatigue (ATL) and Form (TSB), day by day, before the user commits to it. READ-ONLY, writes nothing, keeps no state. Give sessions: [{ date, tss? , title?, guide? }], each after asOf (default today; at most 120 days ahead), several on one date add up. A session's TSS is the given tss, else the median TSS of the user's own sessions with the same title (or guide.title) in the last 90 days, needing at least 2 of them; with no estimate the call is REFUSED and asks for tss (never a guess). propose_next_week's sessions fit as they are. Optional goalDate (a race or test day) and compare ({ sessions, label? }: a second candidate over the same days from the same start). Starts from today's values with forecast_training_load's own math (the 42-day / 7-day model; CTL can be about 1 point off the watch) and runs to the Sunday of the last session's week or goalDate, whichever is later. Output: { modelBased: true, asOf, start: { ctl, atl, tsb }, from, to, totalTss, sessions: [{ date, title, tss, tssSource ('given' | 'history'), historySessions }], series: [{ date, tss, ctl, atl, tsb }] (the values at the end of each day), weeks: [{ weekStart (Monday), days, complete, tss, ctlStart, ctlEnd, rampRate (CTL gained over the week), previous4wAvgTss, jumpPct }], goal: { date, ctl, atl, tsb, band ('below' | 'fresh' | 'above'), freshBand: { min: 5, max: 25 } } | null (TSB on goalDate against the stated fresh band, inclusive), lowestTsb: { date, tsb }, end, risks: [{ rule, scope ('day' | 'week'), date | weekStart, value, threshold, detail }] (the days and full weeks where the stated risk rules trip: a day with TSB below -30; a full Monday-to-Sunday week whose CTL rises by more than 8; a full week whose TSS is more than 30% over the average week of the 28 days before it; compared as printed; a part of a week is no weekly rate and is not checked; heuristics with contested evidence, not safe/unsafe lines), responseToPlan, compare: { label, ...the same fields for the second plan, difference: { totalTss, endCtl, endTsb, lowestTsb, goalTsb, risks } (second minus first) } | null, personalResponse, thresholds, notes, errors }. personalResponse is the user's OWN history, shown only when it can be: for each of the last 90 days, the next night's HRV and recovery on waking after a HIGH-load day (TSS at or above the median of the user's training days) against after the other days (rest days included), by get_tag_effects' own rule (at least 15 nights of each, and a median gap larger than 3 standard errors of the difference of two medians, the spread from the other days' nights); status 'ok' when at least one metric can be judged, else 'insufficient' with missing saying what (nights counted against the 15 needed); each metric's verdict ('insufficient' | 'within-noise' | 'tagged-higher' (higher after high-load days) | 'tagged-lower'). responseToPlan counts the plan's high-load days and gives the expected shift of the next night ONLY for a metric whose history showed a difference beyond the noise (null otherwise: no effect is claimed). An association in the user's own data, not a cause. EVERY number is MODEL-BASED: a projection of a simple model, never a prediction of how the user will feel or respond. Reads workouts, sleep and recovery; a section that cannot be read is named in errors / personalResponse.missing instead of failing the call. Read-only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessions": "<sessions>"
},
"name": "simulate_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | No | The last local day whose workouts are counted as done (default today; not in the future). The simulation starts the day after; to include today in the plan pass yesterday. | |
| compare | No | Optional: a second candidate plan to compare, simulated over the same days from the same start. | |
| goalDate | No | Optional: a race or test day, YYYY-MM-DD, after asOf: the result gives TSB that day against the fresh band (TSB 5 to 25) and the series runs to it. | |
| sessions | Yes | The candidate plan: one entry per session (several may share a date). |