Skip to main content
Glama

Simulate a candidate plan: CTL/ATL/TSB, ramp, risk days, your own response (read-only, model-based)

simulate_plan
Read-only

Preview 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

NameRequiredDescriptionDefault
asOfNoThe 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.
compareNoOptional: a second candidate plan to compare, simulated over the same days from the same start.
goalDateNoOptional: 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.
sessionsYesThe candidate plan: one entry per session (several may share a date).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden for this multi-parameter simulation tool. It does disclose model behavior (42-day/7-day model, 'CTL can be about 1 point off the watch'), output shape (start/end values, series, weeks, risks, goal, compare, personalResponse), and error handling (unreadable sections reported in `errors`/`missing` rather than failing the call). What remains opaque is determinism and cost: the description says nothing about whether repeated calls with the same input return identical output, whether per-call latency differs, or how much history the 90-day lookback reads. For a read-only simulation tool those gaps matter less, but a 3 reflects that the description adds useful behavioral context while still leaving some behavior unexplained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single dense paragraph with no headings or line breaks, which hurts scanability for a schema this large. It could be split into usage, inputs, and return sections. Still, the content is front-loaded (what-it-is, then READ-ONLY) and nearly every clause carries information, so it is efficient rather than padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a 4-parameter tool with a nested 200-item array, no output schema, and cross-tool dependencies, the description covers what an agent needs: input construction, TSS estimation fallback and refusal, asOf semantics, risk rule thresholds, comparison semantics, and partial-failure behavior. Nothing essential to correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents all 3 parameters (100% coverage) with formats, bounds, and nested shapes. The description adds model-level meaning: that CTL and ATL are the 42-day and 7-day fitted values rather than raw inputs, that the simulation starts on asOf's following day, and that the run continues through goalDate. But it doesn't go beyond what the schema provides for individual parameter semantics, so a 3 fits.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific framing: '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'. That is a concrete verb-plus-resource that distinguishes it from forecast_training_load (actual projection) and propose_next_week (plan generation), both of which it explicitly references.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear: run it before the user commits to a plan, and 'propose_next_week's `sessions` fit as they are', which tells the agent exactly how to feed it from the sibling. It also states the refusal path when TSS cannot be estimated. It stops short of explicit when-not-to-use guidance (e.g. for reviewing completed history rather than a candidate plan).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.