Skip to main content
Glama
Loopback Training Server

Loopback Training Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoHost to bind when MCP_TRANSPORT=http.
MCP_PORTNoPort to bind when MCP_TRANSPORT=http (default 8590).8590
MCP_TRANSPORTNoTransport to use. Default is stdio; set to http to serve streamable HTTP at /mcp instead.
TRAINING_API_KEYYesA token for the account the MCP acts as when the caller sends no Authorization header (always the case over stdio).
TRAINING_API_URLYesURL of the Training API the MCP server calls (set in mcp/config/.env).
REQUIRE_AUTH_HEADERNoWhen serving HTTP, set to true to disable the TRAINING_API_KEY fallback and require each caller's own Authorization header.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Today's date is 2026-11-30.

Provides access to workout tracking data and a training queue for planning workouts.
Data is scoped to the authenticated user — no user discovery step is needed.

CONTINUITY (read this first):
The user discusses their training across MANY separate conversations. To make
each one feel like a continuation rather than a cold start:
  1. At the START of any training-related conversation, call `get_plan_context`
     BEFORE answering. It returns the active plan, recent decisions/preferences/
     constraints/life-context, and a `continuity_hint` directive. Read the hint.
  2. DURING the conversation, call `append_plan_note` without being asked when
     the user reveals: a preference ("I prefer", "from now on"), a decision
     ("let's drop", "I've decided"), life context (travel, illness, sleep
     debt, work stress), a hard constraint, or a non-obvious insight.
     Err on the side of saving — short notes are cheap.
  3. Use a stable `conversation_id` for all notes saved in one conversation
     so future-you can see what was discussed together.

Available tools:

Read tools (workout history):
- get_recent_runs: List recent workouts with optional filters (activity type, date range, limit)
- get_workout_detail: Get full details for a specific workout by ID
- get_workout_splits: Get per-split breakdown for a workout (e.g. per-km pace)
- get_workout_heartrate: Get heart rate samples recorded during a workout
- get_workout_activities: Get the interval/segment breakdown (warmup, work, rest periods)
- get_training_summary: Get aggregated stats grouped by week/month/year

Shoe tools (the athlete's running shoes):
- get_shoes: List the pairs with the distance on each
- add_shoe: Add a pair
- update_shoe: Rename a pair, correct its distances, make it the default, retire it or bring it back
- assign_shoe: Put a pair on a workout, or take it off

Write tools (training queue → Apple Watch):
- get_pending_workouts: See what workouts are queued up (pending only)
- list_queued_workouts: List all queued workouts (any status) — use this to find the UUID of a synced workout for edit/delete actions
- create_workout: Create a structured workout composition and queue it for Apple Watch
- batch_create_workouts: Queue multiple workouts in one call (for full training plans)
- update_workout_status: Change a queue item's status (pending/fetched/completed)

Action tools (edit/delete workouts already on Apple Watch):
- get_device_workouts: List all workouts currently on the user's Apple Watch (use to find UUIDs for edit/delete)
- get_pending_actions: See what edit/delete actions are pending
- delete_scheduled_workout: Delete a workout already synced to Apple Watch
- edit_scheduled_workout: Replace a workout already synced to Apple Watch with an updated version
- batch_actions: Create multiple edit/delete actions in one call (for bulk plan updates)

Workflow for querying workout history:
1. Determine the date range from the user's question:
   - "last week" → start_after = 7 days ago, start_before = today
   - "this month" → start_after = first of month, start_before = today
   - No time specified → default to last 2 weeks
2. Call get_recent_runs with appropriate filters
3. For deeper detail on a specific workout, use get_workout_detail, get_workout_splits,
   get_workout_heartrate, or get_workout_activities with the workout's ID
4. Use get_workout_activities to see the interval structure (warmup/work/rest segments)
   — this is especially useful for interval runs and structured workouts

Workflow for editing/deleting workouts already on Apple Watch:
1. First call get_device_workouts to see what's on the watch and find the UUID.
2. To delete: use delete_scheduled_workout with the workout's UUID.
3. To edit: use edit_scheduled_workout with the workout's UUID and the full updated composition.
   The composition.id must match the workout_id.
4. Actions are applied the next time the user taps "Check for New Workouts" in the iPhone app.
5. Use get_pending_actions to see what actions are pending.

Coaching methodology:
- get_coaching_playbook: REQUIRED before creating a training plan, materially
  revising one, or advising on training structure/load. Returns the coaching
  methodology this system follows (evidence-based principles + a module for
  the athlete's goal and experience level). Pass goal/experience when known.
  Skip it for simple data questions.

Pace arithmetic:
- calculate_pace: Distance, time and pace: give two, get the third, plus the split
  times and the speed for a pace alert. Use it for every target pace, finish time
  or split you quote instead of working the numbers out yourself.

Plan tools (training plan management):
- create_plan: Create a new training plan with metadata (goals, guardrails, phases)
- get_plan: Get a plan by ID with full metadata
- list_plans: List plans (filter by status, activity_type)
- update_plan: Update plan fields (name, status, metadata, end_date)
- get_plan_workouts: Get all queued workouts belonging to a plan
- validate_plan: Deterministic soundness check of the upcoming schedule
  (ramp vs real 4-week baseline, down weeks, long-run share, hard-day
  spacing, taper, guardrails). Run after queueing/reshuffling a plan;
  resolve critical warnings before presenting the plan as final.
  create_workout / batch_create_workouts also return these warnings
  inline as `validation` — always read them.

Plan continuity tools (cross-conversation memory — see CONTINUITY note above):
- get_plan_context: Active plan + recent notes + continuity hint. Call FIRST.
- append_plan_note: Save a decision/preference/constraint/life_context/observation/blocker.
  Call without being asked when the user reveals plan-relevant info.
- list_plan_notes: Targeted retrieval (filter by kind, conversation, etc.)
- update_plan_note: Correct or refine an existing note.
- delete_plan_note: Remove an incorrect/duplicate note (prefer update or expires_at).

Workflow for creating a training plan:
1. Use create_plan to store the plan entity with goals, guardrails, phases, and
   athlete context in the metadata blob. Get back the plan_id.
2. Use batch_create_workouts (or create_workout) with plan_id set on each workout
   to link them to the plan. Read the `validation` warnings in the response;
   fix critical ones (or get the athlete's sign-off) before calling the plan done.
3. When querying progress, use get_plan to load context, then get_plan_workouts
   to see scheduled workouts, then cross-reference with recorded workouts via
   plan_workout_id to compute completion rates and planned-vs-actual.
   A completed session is not always the session as prescribed: the athlete
   can count any workout for it afterwards (plan_link_manual on the workout),
   including an easier run or another activity done in its place.

Workflow for creating workouts:
1. Use create_workout to build a structured workout composition. This queues it
   for the iPhone app, which syncs it to the Apple Watch via WorkoutKit.
2. Structure: warmup (optional) → interval blocks (work/recovery steps with
   iterations) → cooldown (optional). Each step has a goal (distance/time/open)
   and optional alerts (pace, heart rate zone, cadence, power).
3. Use get_pending_workouts to review what's queued and waiting to sync.
4. Always pass plan_id when creating workouts that belong to a plan.

Feedback tools (missed workout feedback and plan changes from iOS app):
- get_workout_feedback: Retrieve feedback entries for missed workouts and runs moved or skipped
  ahead of time (filter by date, action type)
- get_missed_workouts: Get past-due incomplete workouts not yet checked in for their current day

Workflow for missed workout feedback:
- Query get_workout_feedback with action="adjust" to find workouts flagged for plan adjustment.
  When found, proactively raise with the user: "Looks like you missed X and flagged it for
  adjustment — want to figure out how to handle it?"
- The athlete can also move or skip a run before it lapses. Those entries are acknowledged on
  or before the scheduled day (a missed-run check-in always comes on a later day). Treat them
  as plan changes the athlete made deliberately, not as misses.
- action="move" means the user already rescheduled — no action needed, just note for patterns.
- action="skip" means the user chose to skip — only surface if a pattern emerges (e.g. 3+ skips
  with reason "tired" → suggest reducing volume).
- dismissed=true means the user closed the prompt without responding — treat like skip with less signal.
- Use get_missed_workouts to find workouts that are overdue and haven't been addressed yet.
- reason "sick" or "injured" is not a scheduling problem. Ask how they are before talking
  about the run, and do not suggest making the session up. `get_plan_context` may list the
  illness or injury itself under `setbacks`; if it does, follow its `setback_hint`.
- During weekly reviews, look for patterns: multiple "tired" → reduce volume, multiple "busy" →
  shift workout days, multiple "weather" → suggest indoor alternatives.

Common activity types: running, cycling, swimming, walking, hiking
Distance is in meters, duration in seconds, energy in kcal.
Speed alerts use metersPerSecond (e.g., 4:00/km pace ≈ 4.17 m/s, 5:00/km ≈ 3.33 m/s).
The data is always metric, but the athlete may read miles: `get_plan_context` returns
their `units` and a `units_hint`. Follow the hint when talking and when authoring workouts.
You cannot change that setting. The athlete can, under Settings in the app (Training → Units)
or in the dashboard (Settings → Units), and the change reaches you in the next conversation.
If they ask to switch units, tell them where; do not promise to remember it for them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_coaching_playbookA

Load the coaching methodology to follow when acting as a running coach.

ALWAYS call this before creating a training plan, materially revising one, or advising on training structure/load. It returns the evidence-based playbook this system follows — pace zones from actual data, intensity distribution, progression and recovery rules, readiness gating, and how to map methodology onto this API's plans/queue/calendar — plus a module tailored to the athlete's goal.

Not needed for simple data questions ("what did I run last week?").

Args: goal: The athlete's training goal. Use "first_5k" for someone who has never run or is starting from zero (couch-to-5K style walk/run progression); "general_fitness" when there is no target race. Omit if the goal isn't known yet — the core playbook still applies, and its intake section helps establish the goal. experience: The athlete's experience level, judged from their actual training history (get_recent_runs / get_training_summary), not self-report alone. Omit to get guidance for all levels.

Returns: Object with: - playbook: the methodology as markdown (core principles + goal module when a goal was given) - goal / experience: what the content was tailored to (null = generic) - available_goals: valid goal values - warning: present if the requested goal was unknown

calculate_paceA

Work out a pace, a finish time or a distance from the other two, with the split times along the way.

USE THIS FOR EVERY SUCH NUMBER YOU QUOTE: a target pace for a goal time, the finish time a pace gives, the clock at each kilometer of a race, the speed for a pace alert. Do not do this arithmetic yourself; it is where slips happen (a half marathon is 21.0975 km, not 21).

Give exactly two of the three: a distance (race or distance_m), a time, a pace. The third is worked out.

This converts between numbers. It does not say whether a pace is realistic for the athlete; judge that from their training (get_recent_runs, get_training_summary) and the coaching playbook.

Returns: - solved_for: "pace", "time" or "distance", whichever was left out. - distance_m, and distance in the athlete's unit ("21.1 km"). - time ("1:45:00") and time_s. - pace_per_km and pace_per_mile ("4:59", "8:01"), each rounded to the second, with pace_per_km_s and pace_per_mile_s to one decimal. Quote the one matching the athlete's units. - speed_mps: the same pace as meters per second, the form a workout's speed alert takes (create_workout). - splits: one row per mark in running order, mark ("5 km", "Half", "Finish") and the time on the clock there at an even pace. A whole km or mile that is also a named checkpoint carries checkpoint ("5K"); one that is the finish carries finish: true. Marks between two whole units carry distance_m. Split times are computed from the exact pace, so they add up to the finish time even where the rounded pace would not. On bad input: {"error": "..."} saying what to change.

get_recent_runsA

List recent workouts, optionally filtered by activity type, date range and the pair of shoes they were done in.

Args: activity_type: Filter by activity type (e.g. "running", "cycling", "swimming"). If omitted, returns all activity types. limit: Maximum number of workouts to return (default 10, max 200). start_after: Only return workouts starting after this datetime (ISO 8601). Example: "2026-03-01T00:00:00" start_before: Only return workouts starting before this datetime (ISO 8601). Example: "2026-03-15T23:59:59" shoe_id: Only return workouts done in this pair of shoes (an id from get_shoes).

Returns: List of workout objects with fields: id, activity_type, start_date, end_date, duration, total_distance, total_energy_burned, source, plan_workout_id, shoe_id, shoe_confirmed, effort_score, estimated_effort_score, end_heart_rate, heart_rate_after_1min, heart_rate_after_2min, vo2_max, created_at.

- shoe_id: the pair of shoes the athlete has on this workout; look it
  up in get_shoes. Null means no pair was recorded, not barefoot.
- shoe_confirmed: false means nobody has checked the pair — the run
  still has whatever it got automatically (the default pair, or none).
  See get_shoes for when that is worth asking the athlete about.

- source: the HealthKit bundle id of the recording app —
  "com.apple.health.<UUID>" means recorded directly on the Apple Watch
  (the UUID is the device, not an app); others name the app, e.g.
  com.hevyapp.hevy (Hevy strength), com.strava.stravaride (Strava),
  com.garmin.connect.mobile (Garmin), com.bowery-digital.bend (Bend
  stretching).
- effort_score: User-rated post-workout RPE (1–10) from the Apple Watch
  effort prompt. The user's perception of the workout — trust it as the
  primary signal. May be null when the workout predates iOS 18 / watchOS 11
  or the user dismissed the prompt.
- estimated_effort_score: Apple's algorithmic RPE estimate (1–10) computed
  from heart rate / activity. Useful for cross-referencing against
  effort_score; a large gap (e.g. user 8 vs. estimate 5) can indicate
  non-cardiovascular load (heat, sleep debt, dehydration, illness, life
  stress) that HR-based estimates miss — worth surfacing during weekly
  review when it appears repeatedly. May be null when no estimate exists.

Treat null as "no signal," not "low effort."

- end_heart_rate, heart_rate_after_1min, heart_rate_after_2min: heart
  rate (bpm) as the workout ended and one and two minutes later. The
  recovery drop is end_heart_rate minus the later reading. How the
  athlete stopped decides most of it: a hard effort ended abruptly
  gives a large drop, an easy run or a jogged cooldown a small one, so
  compare only like with like (intervals with intervals, races with
  races) and read a trend over several such sessions, never one run.
  A falling drop across comparable hard sessions can point to fatigue;
  resting heart rate and HRV are the stronger signals for that. Null
  when the watch recorded nothing usable after the end, or the workout
  was paused well before it was ended.
- vo2_max: the VO2 max estimate (mL/kg/min) Apple Health recorded for
  this workout. Only some outdoor runs, walks and hikes produce one,
  and a single reading moves with heat, hills and pacing; the trend
  is what counts. Null means none was recorded for this workout, or
  the athlete does not share body data with the coach. Do not ask
  them to start tracking it.
get_workout_detailA

Get full details for a single workout by ID.

Args: workout_id: UUID of the workout.

Returns: Workout object with all fields including the nested data object (splits, structured activities, events, metadata). The raw per-second sample arrays (GPS route, cadence, heart rate — several hundred kB) are replaced by data.samplesSummary: per-series count plus avg/min/max, and elevation gain/loss for the route. Use get_workout_heartrate for the heart rate series and get_workout_splits for splits.

data.events contains only meaningful events (pause/resume); HealthKit
segment events are pruned — they duplicate the interval structure that
activities and splits already encode.

Includes effort_score (user-rated RPE 1–10 from Apple Watch effort prompt;
primary signal of perceived effort) and estimated_effort_score (Apple's
algorithmic RPE estimate 1–10). A large gap between the two can indicate
non-cardiovascular load (heat, sleep debt, illness, stress) that HR-based
estimates miss. Treat null as "no signal," not "low effort."

shoe_id is the pair of shoes on this workout (see get_shoes), or null
when none was recorded. shoe_confirmed false means that pair was
assigned automatically and nobody has checked it.

end_heart_rate, heart_rate_after_1min and heart_rate_after_2min give
the heart rate recovery after the workout, and vo2_max the estimate
Health recorded for it; see get_recent_runs for how to read them.
get_workout_contextA

Get the server-held plan linkage for a recorded workout: the queued session it fulfilled, the training plan behind that session, and any missed-workout feedback filed against it.

Args: workout_id: UUID of the workout (same id as get_recent_runs / get_workout_detail return).

Returns: Object with workout_id, plan_workout_id, plan_link_manual, and three nullable keys: - queue_item: title, description, activity_type, live status (e.g. "completed", "skipped"), scheduled_date, plan_id, the workout_data composition that was planned, completed_at. - plan: id, name, activity_type, status, start_date, end_date. - feedback: reason, reason_note, action (move/adjust/skip), new_date, scheduled_date, dismissed, created_at. Survives queue-item deletion.

All three null (with plan_workout_id null) means an unplanned run —
that's normal, not an error.

plan_link_manual true means the athlete linked this workout to the
session by hand afterwards (or unlinked it). They are saying it counts
for that session, not that they followed it: it may be from another
day, another activity, or a different kind of run than prescribed.
The session is completed either way; read the workout itself for what
was actually done.

Useful when reviewing a completed workout: compare what was planned (queue_item.workout_data) against what happened, and see what the athlete said about the session.

get_workout_splitsB

Get per-split data for a workout (e.g. per-km or per-mile splits).

Args: workout_id: UUID of the workout.

Returns: List of split objects extracted from the workout's data.splits field.

get_workout_heartrateA

Get the heart rate series recorded during a workout.

Args: workout_id: UUID of the workout. max_samples: Cap on series length (default 500, max 5000; null for the raw series). Longer series are downsampled by averaging over evenly-sized time buckets, so shape and peaks survive — raw counts grow with workout duration (a 3 h run is ~2000 samples).

Returns: List of {timestamp, value} heart rate samples in workout order.

get_workout_activitiesA

Get the interval/segment breakdown of a workout (warmup, work, rest periods).

This extracts the 'activities' array from a workout, which describes the structured program that was followed — one entry per step the watch ran (warmup, work, rest, cooldown), each with distance, duration, heart rate, and timing.

Args: workout_id: UUID of the workout.

Returns: List of activity segment objects, each with: activityType, startDate, endDate, duration, totalDistance, totalEnergyBurned, averageHeartRate, and metadata — metadata.WOIntervalStepKeyPath encodes the position in the composed structure as "block.iteration.step" (e.g. "1.2.0" = 2nd block, 3rd iteration, 1st step; map it to the queue item's blocks to know whether a segment was work or recovery), with WOIntervalStepSuccessful/HKElevationAscended alongside. Returns an empty list if the workout has no structured activities.

delete_workoutA

Delete a recorded workout by ID.

This permanently removes a HealthKit workout record from the database. The workout can be re-synced from the iPhone if needed.

Args: workout_id: UUID of the workout to delete.

Returns: Confirmation with the deleted workout ID.

get_training_summaryA

Get aggregated training summary grouped by time period, newest first.

Args: activity_type: Filter by activity type (e.g. "running"). Omit for all types. period: Grouping period - one of "week", "month", or "year" (default "month"). start_after: Only aggregate workouts starting after this datetime (ISO 8601). start_before: Only aggregate workouts starting before this datetime (ISO 8601). limit: Max rows returned (default 52, max 500). One row per period × activity_type, newest first — without activity_type a period spans multiple rows. History past the limit stays reachable by paging back with start_before.

Returns: List of summary objects, each with: period, activity_type, count, total_distance, total_duration, avg_distance, avg_duration, total_energy_burned.

get_shoesA

List the athlete's pairs of running shoes and the distance on each.

CHECKING THE PAIR ON RECENT RUNS. A new run is put on the default pair automatically, and the athlete often forgets to correct it when they wore something else. Workouts carry shoe_confirmed: false means the pair was never checked. When the athlete has MORE THAN ONE pair in rotation and a run from the last two weeks has shoe_confirmed: false, ask which pair they wore — once per conversation, all such runs in one question, naming each run's day, distance and current pair. Then call assign_shoe for every run they answer, including the ones where the current pair was right: that is what marks it checked and stops the question coming back. Skip the question when only one pair is in rotation, for older runs, and for anything that is not a run.

Args: include_retired: Include pairs the athlete has put away (default true). Pass false for only the pairs in rotation.

Returns: List of pairs, in use first (newest first), then retired. Keys are camelCase and every distance is in METERS:

- id: matches `shoe_id` on a workout (get_recent_runs,
  get_workout_detail). Pass it to get_recent_runs as `shoe_id` to list
  the runs done in this pair.
- name: what the athlete called the pair.
- distance: total on the pair — `startDistance` plus every workout
  assigned to it.
- startDistance: what the pair had on it when it was added. That part
  is the athlete's own figure, not recorded runs.
- targetDistance: where the athlete plans to replace the pair, or null
  when they set none. Their choice, not a wear measurement.
- workoutCount / lastUsedAt: assigned workouts and the latest one's
  start. Zero and null for a pair with no runs on it yet.
- isDefault: new runs land on this pair automatically. At most one.
- retiredAt: when the pair was put away, null while in rotation.
- createdAt: when the pair was added to the app, not when it was bought.

A run with `shoe_id: null` has no pair recorded, which is common: runs
from before the athlete added a pair are never assigned, and walks,
rides and strength sessions never get one automatically. Null does not
mean barefoot, and a pair's `distance` only counts what was assigned.
add_shoeA

Add a pair of running shoes for the athlete.

Only on the athlete's say-so: they tell you about a new pair, you add it. Check get_shoes first so the same pair is not added twice.

Args: name: What to call the pair, in the athlete's words (e.g. "Pegasus 41"). start_distance_meters: Distance already on the pair, in METERS (250 km is 250000). Zero for a new pair. Runs from before the pair is added are never assigned to it, so this figure is where that earlier distance belongs. target_distance_meters: Where the athlete plans to replace the pair, in METERS. Leave out unless they named one — do not pick a figure for them. is_default: Put new runs on this pair automatically. Replaces the current default.

Returns: The new pair, in the shape get_shoes lists.

update_shoeA

Change a pair of shoes: rename it, correct its distances, make it the default, retire it or bring it back. Only what you pass changes.

There is no tool to delete a pair; that stays in the app. Retire a pair the athlete has stopped using — its runs and distance are kept.

Args: shoe_id: The pair's id from get_shoes. name: New name. start_distance_meters: Distance the pair had before it was added, in METERS. This is not the pair's total: the total is this plus its assigned runs, so to correct a total, work out the difference. target_distance_meters: New replacement distance, in METERS. clear_target: True removes the replacement distance. Do not combine with target_distance_meters. is_default: True makes this the pair new runs land on (replacing the current default); false leaves the athlete with no default. A retired pair cannot be the default. retired: True puts the pair away (it also stops being the default); false brings it back into rotation.

Returns: The updated pair, in the shape get_shoes lists.

assign_shoeA

Put a pair of shoes on a workout, or take the pair off.

Use it when the athlete says which pair they wore. It also marks the workout's pair as checked (shoe_confirmed: true), so call it even when the athlete confirms the pair already on the run. Never guess a pair from the kind of session: ask.

Args: workout_id: UUID of the recorded workout (from get_recent_runs). shoe_id: The pair's id from get_shoes. A retired pair is fine, for correcting an older run. Leave out to take the pair off the workout, for a run done in shoes the athlete does not track.

Returns: The workout as get_recent_runs lists it, with the new shoe_id.

get_setbacksA

List the athlete's illnesses and injuries, with how they felt day by day.

get_plan_context already hands you the open ones and the ones that ended in the last three weeks, so you rarely need this at the start of a conversation. Use it for the history: how often the athlete is set back, how long each one lasted, and how past ones compare with the current one.

READING ONE AGAINST THE DATA. A setback gives you the dates; the effect is in the other tools. To see what an illness did, compare the days from startDate on with the two to four weeks before it: resting heart rate, HRV, respiratory rate, sleeping wrist temperature and sleep from get_health_metrics, and for the runs after it the heart rate at a given easy pace and the heart rate recovery from get_recent_runs and get_workout_detail. Raised resting heart rate and lowered HRV that have come back to the earlier range for a few days in a row, together with the athlete saying they feel fine, is what recovered looks like. For an injury the numbers say little: go by the daily status and by runs completed without pain. Say what you see and how sure you are; this is not a diagnosis.

Args: active_only: Only setbacks that are still going on. since: Only setbacks still going on or ended on or after this day (YYYY-MM-DD).

Returns: List of setbacks, open ones first, then the most recently started. Keys are camelCase:

- id: pass to update_setback and log_setback_status.
- kind: "illness" or "injury".
- severity: "mild", "moderate" or "severe", the athlete's own call.
- startDate / endDate: first and last day (YYYY-MM-DD, the athlete's
  local days). endDate is null while it is still going on.
- active: true while there is no end date.
- days: length in days, both ends counted; for an open one, through
  today.
- bodyPart: injuries only, free text; may be null.
- note: the athlete's description; may be null.
- checkins: one entry per day the athlete (or you) recorded a status,
  oldest first: date, status ("worse", "same", "better", "fine"),
  note. Days without an entry were simply not recorded.
- recovery: open setbacks only, else null. The server's own read of
  whether it looks over. `status` is "looks_recovered", "not_yet" or
  "insufficient_data"; `summary` says why in a sentence; `metrics`
  lists resting heart rate, HRV, breathing rate and sleeping wrist
  temperature (those the athlete has data for) with the
  athlete's `usual` (median of the four weeks before), the
  `tolerance` around it, the `latest` reading and its `state`
  ("normal", "off", "no_recent_data"). `basis` is "metrics" or
  "status" (the athlete said "fine" two days running, or a fresh
  "worse"/"same" is holding it back). It is a prompt to ask the
  athlete, never grounds to close a setback yourself. Injuries get
  no metrics: the numbers say little about them.
log_setbackA

Record that the athlete is, or was, ill or injured.

Call this WITHOUT BEING ASKED when the athlete tells you they are sick or hurt, or that they were on days you had no setback for ("I had the flu last weekend", "my calf has been sore since Tuesday's intervals"). This is what makes the next conversation start out knowing it. Check the setbacks in get_plan_context first: if the same one is already open, use update_setback or log_setback_status on it. The server refuses a second open illness, and a second open injury to the same body part.

Ordinary training soreness that fades within two days is not a setback. Tell the athlete you have logged it, in one short sentence.

Args: kind: "illness" (cold, flu, stomach bug, covid) or "injury". start_date: First day affected, YYYY-MM-DD. Ask if it is unclear; it is the anchor every before/after comparison uses. severity: "mild" (could have trained easy), "moderate" (no training) or "severe" (in bed, or cannot walk without pain). Ask rather than guess when the athlete's words do not settle it. end_date: Last day affected, YYYY-MM-DD. Leave out while it is still going on, and while the athlete is "better but not right yet". body_part: Injuries only, in the athlete's words ("left calf"). note: Symptoms and anything that explains it, in a line or two.

Returns: The setback, in the shape get_setbacks lists.

update_setbackA

Change a setback: close it, reopen it, or correct what was recorded. Only what you pass changes.

CLOSING. Set end_date when the athlete says they are recovered. Their word decides it, not the numbers: if the metrics look normal but they still feel off, it stays open, and if they say they are fine while resting heart rate is still raised, close it and say what you see. After closing, the plan still needs a gradual build back (coaching playbook, return to running).

Args: setback_id: The setback's id, from get_plan_context or get_setbacks. end_date: Last day affected, YYYY-MM-DD. Closes the setback. reopen: True to clear the end date, when it came back. severity: "mild", "moderate" or "severe". start_date: Corrected first day, YYYY-MM-DD. kind: "illness" or "injury". body_part: Injuries only. note: Replaces the note. Include what was there if it still holds.

Returns: The setback after the change.

log_setback_statusA

Record how the athlete felt on one day of a setback.

While a setback is open, ask how they are today when the conversation starts and record the answer here, unless today already has an entry. One entry per day; logging the same day again replaces it. These entries are the subjective side of the recovery curve, and for an injury they are most of it.

"fine" does not close the setback. When the athlete says "fine", ask whether they consider themselves recovered, and close it with update_setback if they do.

Args: setback_id: The setback's id. status: "worse", "same" or "better" compared with the day before, or "fine" when they feel normal again. date: The day it describes, YYYY-MM-DD. Defaults to today; pass it when the athlete is describing an earlier day. note: Their words, shortened ("fever gone, still coughing").

Returns: The setback with its check-ins.

get_pending_workoutsA

Get all pending workout queue items waiting to be processed.

Returns: List of pending queue items, each with: id, activity_type, title, description, workout_data, status, created_at, fetched_at, completed_at.

list_queued_workoutsA

List all queued workouts, including ones already synced to Apple Watch.

Use this to find the UUID of a workout that has been synced, so you can issue edit or delete actions against it.

Args: status: Optional filter — "pending", "fetched", "synced", "completed", or "skipped". Omit to return all items. limit: Max number of items to return (default 50, max 200).

Returns: List of queue items sorted by creation date (newest first), each with: id, activity_type, title, description, workout_data, status, created_at, fetched_at, completed_at.

create_workoutA

Create a structured workout and queue it for the user's Apple Watch.

Full WorkoutKit support: repeatable interval blocks, warmup/cooldown steps, goals (distance / time / energy / open), and an optional per-step ALERT that coaches effort on the watch — pace/speed range, heart-rate range (BPM), heart-rate ZONE (1-5), cadence, or running power. E.g. a Zone 2 base run is a single time- or distance-goal step with alert {"type": "heartRateZone", "zone": 2}. WorkoutKit allows one alert per step.

The exact structure of blocks/steps/goals/alerts is defined in this tool's input schema. The workout appears on the watch after the iPhone app syncs.

Args: activity_type: Sport for the WorkoutKit session. display_name: Name shown on Apple Watch (e.g. "6x400m Intervals", "Tempo Run"). location: Where the workout happens (affects GPS). scheduled_date: When the workout should appear, ISO 8601 (e.g. "2026-03-18T07:00:00Z"). blocks: Interval blocks, each repeated iterations times. warmup: Optional warmup step (goal + optional alert). cooldown: Optional cooldown step (goal + optional alert). description: Optional text description of the workout. plan_id: Optional UUID of the training plan this workout belongs to.

Returns: The created queue item object, plus a validation list of schedule-soundness warnings (ramp rate vs the athlete's actual 4-week baseline, back-to-back hard days, guardrail breaches, …) covering the athlete's whole upcoming schedule. ALWAYS review it: resolve critical warnings (adjust and re-queue, or get the athlete's explicit sign-off); mention warn items to the athlete. Warnings never block creation.

Example — 6x400m intervals with 800m warmup and cooldown: activity_type: "running" display_name: "6x400m Intervals" location: "outdoor" scheduled_date: "2026-03-18T07:00:00Z" warmup: {"goal": {"type": "distance", "value": 800, "unit": "meters"}} blocks: [ { "iterations": 6, "steps": [ { "purpose": "work", "goal": {"type": "distance", "value": 400, "unit": "meters"}, "alert": {"type": "speed", "min": 4.5, "max": 5.0, "unit": "metersPerSecond"} }, { "purpose": "recovery", "goal": {"type": "distance", "value": 400, "unit": "meters"} } ] } ] cooldown: {"goal": {"type": "distance", "value": 800, "unit": "meters"}}

Example — 20-minute tempo run: activity_type: "running" display_name: "20min Tempo" location: "outdoor" scheduled_date: "2026-03-19T07:00:00Z" warmup: {"goal": {"type": "distance", "value": 1600, "unit": "meters"}} blocks: [ { "iterations": 1, "steps": [ { "purpose": "work", "goal": {"type": "time", "value": 20, "unit": "minutes"}, "alert": {"type": "heartRateZone", "zone": 4} } ] } ] cooldown: {"goal": {"type": "distance", "value": 1600, "unit": "meters"}}

update_queued_workoutA

Update an existing queued workout. Only provided fields are changed.

Use this to reschedule a workout, change the interval structure, rename it, or modify any part of the composition before it syncs to Apple Watch. Steps support the same goals and alerts (incl. heart-rate zones) as create_workout — see that tool's input schema.

Args: item_id: UUID of the queue item (from get_pending_workouts). display_name: New name shown on Apple Watch. activity_type: New activity type (running, cycling, etc.). location: New location ("outdoor" or "indoor"). scheduled_date: New scheduled date (ISO 8601). blocks: New interval blocks (replaces all existing blocks). warmup: New warmup step (omit to leave unchanged). cooldown: New cooldown step (omit to leave unchanged). clear_warmup: Set true to remove the existing warmup. clear_cooldown: Set true to remove the existing cooldown. description: New text description. plan_id: UUID of the training plan to assign this workout to.

Returns: The updated queue item object.

update_workout_statusA

Update the status of a queue item.

Lifecycle: pending -> fetched -> synced -> completed. "skipped" retires the item (the watch endpoints stop serving it and it no longer counts as a schedule collision) — normally set via missed-workout feedback with action "skip", but it can be set directly here too.

Args: item_id: UUID of the queue item. status: New status. Setting "fetched" records the fetch timestamp; "completed" records the completion timestamp.

Returns: The updated queue item object.

batch_create_workoutsA

Queue multiple workouts for Apple Watch in a single call.

Use this instead of calling create_workout repeatedly when you need to schedule an entire training plan (e.g. 4 weeks of workouts). Each workout supports the same full composition as create_workout: interval blocks, warmup/cooldown, goals (distance/time/energy/open), and per-step alerts — pace/speed range, heart-rate range, heart-rate zone (1-5), cadence, power.

Args: workouts: Workouts to queue — see the input schema for the full structure. Omit workoutData.id to have a UUID generated per workout. Set planId to link a workout to a training plan.

Example: workouts: [ { "activityType": "running", "title": "Easy Z2 5K", "workoutData": { "displayName": "Easy Z2 5K", "activityType": "running", "location": "outdoor", "scheduledDate": "2026-03-20T07:00:00Z", "blocks": [{"iterations": 1, "steps": [{"purpose": "work", "goal": {"type": "distance", "value": 5000, "unit": "meters"}, "alert": {"type": "heartRateZone", "zone": 2}}]}] } } ]

Returns: Object with items (the created queue items) and validation — a list of schedule-soundness warnings (ramp rate vs the athlete's actual 4-week baseline, missing down weeks, long-run share, back-to-back hard days, taper shape, guardrail breaches, …) covering the athlete's whole upcoming schedule. ALWAYS review it after queueing a plan: resolve critical warnings (adjust and re-queue, or get the athlete's explicit sign-off); mention warn items. Warnings never block creation.

get_device_workoutsA

Get the inventory of workouts currently scheduled on the user's Apple Watch.

This is synced from the iOS app each time the user taps "Check for New Workouts". Use this to discover workout UUIDs when the user asks to edit or delete a workout.

Returns: List of on-device workouts, each with: id, display_name, year, month, day, hour, minute, complete (whether the workout has been done), synced_at.

get_pending_actionsA

Get all pending workout actions (edits and deletes) waiting to be synced to Apple Watch.

Returns: List of pending actions, each with: id, workoutId, action ("edit" or "delete"), composition (full workout composition for edits, null for deletes), created_at.

delete_scheduled_workoutA

Delete a workout that has already been synced to the user's Apple Watch.

Creates a pending delete action. The next time the iPhone app syncs, it will remove this workout from WorkoutKit on the Apple Watch.

Args: workout_id: UUID of the workout to delete. This is the id from the original queue item that was synced to the watch.

Returns: The created action object.

edit_scheduled_workoutA

Edit a workout that has already been synced to the user's Apple Watch.

Creates a pending edit action with the full updated composition. The next time the iPhone app syncs, it will replace the old workout with this updated version in WorkoutKit on the Apple Watch. Steps support the same goals and alerts as create_workout — pace/speed range, heart-rate range, heart-rate zone (1-5), cadence, power — see the input schema.

Args: workout_id: UUID of the workout to edit. Must match the id from the original queue item that was synced to the watch. display_name: Updated name shown on Apple Watch. activity_type: Sport for the WorkoutKit session. location: Either "outdoor" or "indoor". scheduled_date: Updated scheduled date, ISO 8601 (e.g. "2026-03-25T07:00:00Z"). blocks: Updated interval blocks (replaces the whole structure). warmup: Optional updated warmup step. cooldown: Optional updated cooldown step.

Returns: The created action object.

batch_actionsA

Create multiple edit/delete actions in a single call.

Use this instead of calling delete_scheduled_workout or edit_scheduled_workout repeatedly when you need to modify or remove multiple workouts at once. Edit compositions support the same goals and per-step alerts as create_workout (incl. heart-rate zones) — see the input schema.

Args: actions: Action objects. For "edit", composition is the full replacement workout (composition.id may be omitted — it is filled from workoutId). For "delete", omit composition.

Example: actions: [ {"workoutId": "aaa-...", "action": "delete"}, {"workoutId": "bbb-...", "action": "edit", "composition": { "displayName": "Updated Run", "activityType": "running", "location": "outdoor", "scheduledDate": "2026-03-25T07:00:00Z", "blocks": [{"iterations": 1, "steps": [{"purpose": "work", "goal": {"type": "time", "value": 1800, "unit": "seconds"}, "alert": {"type": "heartRateZone", "zone": 3}}]}] }} ]

Returns: List of created action objects.

get_workout_feedbackA

Retrieve the athlete's check-ins on runs they missed or changed ahead of time.

Use this to understand patterns in missed workouts and inform coaching decisions. Query action="adjust" to find workouts the user flagged for plan adjustment.

An entry acknowledged on or before its scheduled day (acknowledgedAt's date not after scheduledDate's) was filed ahead of time: the athlete moved or skipped the run before it lapsed. That is a plan change, not a miss. A missed-run check-in is always filed on a later day. A skip with reason "other" and a note like "Made room for " was cleared off the day another run moved onto.

Args: since: Only return entries with scheduledDate on or after this date (ISO 8601, e.g. "2026-03-01"). limit: Max entries to return (default 20). action: Filter by action type: "move", "adjust", or "skip".

Returns: List of feedback entries, each with: id, workoutId, workoutName, scheduledDate, detectedAt, acknowledgedAt, reason, reasonNote, action, newDate, dismissed.

get_missed_workoutsA

Get currently past-due, incomplete workouts not yet checked in for their current day.

This is a convenience tool that cross-references the on-device workout inventory with existing feedback to find workouts that are overdue and haven't been addressed. A run that was moved and then also went past its new day counts as missed again.

Returns: List of missed workouts, each with: workoutId, displayName, scheduledDate, daysMissed.

get_health_metricsA

Get daily health metrics synced from HealthKit.

One row per day. Which metrics a row carries varies by athlete — sleep, resting HR, HRV, respiratory rate, SpO2, sleeping wrist temperature, weight, body composition, VO2Max, steps and energy are all possible. Read the fields that are present rather than assuming a fixed set; a field that isn't there is not a zero, and not something to ask the athlete to start recording.

wrist_temperature is the Apple Watch's sleeping wrist temperature in °C, filed on the day the athlete woke up. The absolute figure means little and differs between people; what matters is the change against the athlete's own recent nights. A rise of about half a degree or more that lasts several nights often goes with illness (also with alcohol, a warm room, and the menstrual cycle), so read it alongside resting HR and HRV.

Where energy is present: active_energy_burned is movement + exercise (it already includes workout calories); basal_energy_burned is resting burn, and may be null on older app builds. Their sum is total daily expenditure. For anything comparing expenditure against intake, prefer get_nutrition_summary — it aligns both sides on the same periods and excludes days still in progress, which these raw rows do not.

Use these to correlate recovery/readiness with training patterns:

  • Low HRV + poor sleep → suggest an easier workout or a rest day

  • Declining resting HR trend → improving cardiovascular fitness

  • Weight/body composition trends alongside training volume

  • Steps and active energy alongside training load: how much of the day's movement was the session, and how much was the rest of life

Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD), defaults to today

get_nutritionA

Get daily nutrition totals synced from HealthKit (food logging apps).

Returns one row per day that has logged food: energy (kcal), carbs, protein, fat, saturated fat, fiber, sugar, sodium, potassium, cholesterol, water, caffeine, plus any extra micronutrients under micros, the number of logged entries and which apps wrote them.

Days with no logging have NO row — absence means "not tracked", not "ate nothing". A row with partial: true was synced while the day was still in progress, so its totals are incomplete; exclude those from any average.

ONLY energy_kcal, carbs_g, protein_g and fat_g are daily totals. sodium_mg, fiber_g, sugar_g, saturated_fat_g, cholesterol_mg, potassium_mg and every key in micros are LOWER BOUNDS — food databases record them on only a fraction of entries, so the day sums whichever foods happened to carry the field. Nothing in the payload marks them, and a plausible-looking value is not evidence of completeness. Never infer a deficiency or an excess from one (observed: ~200 mg potassium on a 2,600 kcal day). Null water_ml/caffeine_mg means unreported, not zero.

For trends over more than a couple of weeks, prefer get_nutrition_summary — it aggregates per week or month and aligns intake with weight and training load, at a fraction of the tokens.

Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD), defaults to today limit: Max days returned, newest first (default 60)

get_nutrition_summaryA

Diet, body weight and training load aligned on the same periods.

This is the tool for "is my nutrition supporting my training?". Each period carries:

  • nutrition: average intake per LOGGED day (partial days excluded)

  • days_logged / days_in_period: how much of the period that average actually covers — 2 of 7 days is an anecdote, not a weekly average

  • protein_g_per_kg: protein against the period's average body weight

  • body: weight start/end/avg and the change across the period

  • training: workouts, distance, duration and energy burned

  • expenditure: energy OUT — active_kcal_avg (movement + exercise), basal_kcal_avg (resting), tdee_kcal_avg (their sum), and balance_kcal_avg (intake minus TDEE), each with its own day count

Not every block is in every response: body and expenditure depend on what this athlete's data covers. Work with the blocks you get rather than asking after the ones you don't.

Active energy already includes workout burn: TDEE is active + basal, and adding training.energy_kcal on top double-counts every session. Basal is null until the athlete's app build syncs it, in which case TDEE and balance are null too and active alone is what you have. Today is excluded from expenditure — health metrics have no partial-day flag, so a day in progress holds only the hours elapsed.

Balance is a direction with a magnitude, not a measurement: intake is self-reported and skews low, which biases the computed deficit larger, and basal is HealthKit's estimate — the two errors compound rather than cancel. body carries the unmodelled cross-check: weight_change (a least-squares fit across the readings' span, not last-minus-first), weight_sd (the scatter it sits in) and weigh_ins (how many readings back both).

Averages cover energy, macros and the rest of the nutrient columns — but only energy_kcal, carbs_g, protein_g and fat_g are true totals. The averages of sodium_mg, fiber_g, sugar_g, saturated_fat_g, cholesterol_mg and potassium_mg are averages OF LOWER BOUNDS, because food databases record those on only some entries. Never read one as a deficiency or an excess; their trends track logging detail as much as diet.

Read days_logged before drawing any conclusion, and remember intake is self-reported: food logging typically under-reports, so treat the trend and the macro split as the signal rather than absolute calorie totals. Weight change over a single week is mostly glycogen and hydration; look across 3-4 weeks before calling it a trend.

Coaching stance:

  • Under-fuelling matters more than over-fuelling for an endurance athlete. A persistent deficit alongside hard training is worth flagging even when the athlete asked about weight loss — cross-check how sessions have been going, and recovery metrics if you have them, before saying it's working.

  • Endurance-relevant anchors: carbohydrate availability around hard/long sessions, protein ~1.6-2.0 g/kg for an athlete in training, and fiber timing before key sessions.

  • If the athlete wants real micronutrient or sodium status, the answer is a blood test or a dietitian, not this data. Say that plainly.

  • You are not a dietitian. Flag patterns worth a professional's attention (persistent large deficits, very low intake, an athlete asking about restriction) rather than prescribing an intake plan.

Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD), defaults to today period: "week" (default) or "month" timezone: IANA zone (e.g. "Europe/Amsterdam") used to attribute workouts to a local day; defaults to UTC

get_fuel_productsA

List what the athlete has saved to drink and eat on runs: their gels, drink mixes and so on.

Call this before writing a fuelling plan, so the plan names what the athlete actually carries and its figures are the label's, not yours.

Returns: List of products (camelCase), drinks first: id (pass as product_id in an entry), name, kind, carbsG and caffeineMg (per piece; for a drink, per serving of volumeMl), volumeMl (a drink's serving, null otherwise). Null carbsG or caffeineMg means the athlete did not state it, not zero.

add_fuel_productA

Save something the athlete drinks or eats on runs, so it can be picked when logging or planning.

Only on the athlete's say-so, with figures they gave you or read off the label. Do not fill in carbohydrates or caffeine from memory of a brand; leave a figure out when the athlete does not know it. Check get_fuel_products first so nothing is saved twice.

Args: name: What the athlete calls it ("Maurten Gel 100 Caf", "Water"). kind: "drink", "gel" or "other" (chews, a bar, a salt tablet). carbs_g: Carbohydrates in g, per piece, or per serving of a drink. caffeine_mg: Caffeine in mg, per piece, or per serving of a drink. volume_ml: For a drink only: the serving the two figures are for, in ml (500 for a 500 ml bottle).

Returns: The saved product, in the shape get_fuel_products lists.

get_fuel_historyA

The athlete's most recent workouts that have a fuelling log, newest first, each with what was taken and what had been planned for it.

Read this before planning the fuelling for a long run or a race: it shows what the athlete has actually been taking, how much per hour, and whether they kept to earlier plans. To see how a run went against its fuelling, look the workout up with get_workout_detail or get_workout_splits (a fade late in the run next to few carbohydrates per hour is the pattern to look for). A workout that is not listed has no log, which usually means the athlete did not write it down, not that they took nothing.

Args: limit: How many workouts (default 10, at most 50).

Returns: List (camelCase) of: workoutId, activityType, startDate, duration (seconds), totalDistance (METERS), entries and summary (taken), planned and plannedSummary (the plan on the session the workout counted for; empty and null when there was none), plannedSessionId. Entries and summaries are as get_workout_fuel describes them.

get_workout_fuelA

What the athlete drank and ate on one workout, next to what was planned for it.

Use it when reviewing a long run or a race, and whenever the athlete brings up fuelling, a fade, stomach trouble or cramping on a run. An empty entries usually means nothing was written down, not that nothing was taken: ask before concluding anything from it.

Args: workout_id: UUID of the workout (from get_recent_runs).

Returns: Object (camelCase) with entries and summary (what was taken), planned and plannedSummary (the plan on the session this workout counted for; empty and null when there was none), plannedSessionId.

Each entry (camelCase): id, productId (null when typed in by hand or
the product was deleted since), name, kind ("drink", "gel", "other"),
volumeMl (a drink's total), carbsG and caffeineMg (in the entry as a
whole; null means not stated, NOT zero), atDistance (METERS into the
workout, null for a drink or when not placed). Drinks come first, then
the rest in the order taken.

A summary (camelCase): volumeMl, carbsG, caffeineMg, and
carbsPerHourG / fluidPerHourMl over the workout's duration. An entry
without a figure counts as zero, so treat a total as a floor when an
entry has null carbsG. The hourly rates are null for a workout under
20 minutes and for a plan on its own.
log_workout_fuelA

Write down what the athlete drank and ate on a workout, on their say-so.

The athlete can log this in the app themselves; use this when they tell you in conversation instead ("I had two gels and a bottle of water on Sunday's long run"). Log what they say, not what was planned, and ask rather than guess when they are vague about an amount. A drink is ONE entry with the total volume; each gel is its own entry, with at_distance_m when they remember where they took it.

Args: workout_id: UUID of the workout (from get_recent_runs). entries: What to log. Prefer product_id (get_fuel_products) so the figures are the athlete's own. replace: False (default) adds to what is already logged. True replaces the whole log with entries; use it to correct a log, after reading it with get_workout_fuel.

Returns: The workout's fuelling afterwards, in the shape get_workout_fuel returns.

get_fuel_planA

The fuelling plan on a planned session: what to drink and eat, and where in the run.

Args: session_id: UUID of the planned session, the queue item's id (from get_plan_workouts, get_pending_workouts or list_queued_workouts).

Returns: Object (camelCase) with entries and summary, as get_workout_fuel describes them. Empty entries means no plan has been written for this session.

set_fuel_planA

Write the fuelling plan for a planned session. It replaces any plan the session already has; an empty list removes it.

The athlete sees the plan on the session in the app, and after the run next to what they logged, where one tap logs it as planned. So write the plan you would want them to follow, item by item, not a general remark: that belongs in the conversation or the session's description.

BEFORE WRITING ONE: get_fuel_products for what the athlete carries, and get_fuel_history for what they have taken on earlier long runs and how much per hour. Build on that; a plan far above what they are used to is one their stomach has not practised. Say in the conversation what the plan adds up to per hour and why.

One entry per drink with the total to drink over the run (volume_ml), and one entry per gel or other item with where to take it (at_distance_m, METERS). Use product_id wherever the athlete has the product saved.

This is not medical advice, and caffeine and sodium tolerance are personal: where the athlete has not used something before, say so and suggest trying it in training first.

Args: session_id: UUID of the planned session, the queue item's id (from get_plan_workouts, get_pending_workouts or list_queued_workouts). entries: The whole plan.

Returns: The session's plan afterwards, in the shape get_fuel_plan returns.

create_planA

Create a new training plan.

Call this before batch_create_workouts to get a plan_id that links all queued workouts together.

Args: name: Plan name (e.g. "Slow Burn 8-Week Return"). activity_type: Primary activity (e.g. "running", "cycling"). start_date: Plan start date (YYYY-MM-DD). end_date: Plan end date (YYYY-MM-DD), or null if open-ended. description: High-level what and why. metadata: Flexible JSON object for goals, guardrails, phases, athlete context, etc. No required keys. Example: { "goals": [{"type": "weekly_volume", "target": 32, "unit": "km", "by_week": 8}], "guardrails": ["Miss a run: don't make it up"], "phases": [{"name": "Base", "weeks": [1, 2], "volume_target_km": 18}], "athlete_context": {"fitness_level": "Detrained"} } status: Defaults to "active" — the block being run right now. Pass "upcoming" for a plan built ahead of its start date: it stays out of "which plan am I on" answers, while its sessions still appear in the calendar and schedule checks so the new block can be validated before it starts. Only one plan per activity should be active at a time; if one is already running, the next block is "upcoming" until the athlete starts it.

Returns: The created plan with its id.

get_planA

Get a training plan by ID, including its metadata.

Args: plan_id: UUID of the plan.

Returns: Plan object with name, activity_type, status, dates, description, metadata, plus two computed fields: - progress: session counts (total/completed/skipped/remaining) — queued Apple Watch runs, plus scheduled strength sessions for plans with a recurring schedule. A strength session counts as completed when a synced Hevy workout landed on its date, skipped when the date passed with no match, remaining otherwise. (The runs_* field names predate strength support; they count sessions of either kind.) - finishable: true when an active plan looks done (window passed, or every session retired with ≥1 completed and no end date still ahead — a plan queued a week at a time is not done each time its queue runs empty). Nothing auto-completes; if true, offer the athlete a wrap-up (complete_plan on the dashboard or update_plan status="completed").

list_plansB

List training plans.

Args: status: Filter by status — "active", "upcoming", "completed", "archived" or "abandoned". "upcoming" is a block built ahead of its start date: its sessions still show in the calendar and schedule checks, but it is not the plan the athlete is on. activity_type: Filter by activity type (e.g. "running").

Returns: List of plans, newest first. Each carries computed progress and finishable — see get_plan for their semantics (progress counts queued runs and scheduled strength sessions alike; finishable=true means offer a wrap-up).

update_planA

Update a training plan.

Common uses: mark as completed/abandoned, start an upcoming block, update metadata, adjust dates.

Args: plan_id: UUID of the plan. name: New plan name. status: New status — "active", "upcoming", "completed", "archived" or "abandoned". Nothing promotes a plan on its start date, so starting an upcoming block is an explicit update_plan(status="active"). description: Updated description. metadata: Replacement metadata object (replaces entire metadata, not merged). end_date: New end date (YYYY-MM-DD).

Returns: The updated plan.

get_plan_workoutsB

Get all queued workouts belonging to a plan.

Args: plan_id: UUID of the plan.

Returns: List of queued workouts for this plan.

set_strength_scheduleA

Set a recurring weekly schedule on a plan — which routine runs on which weekday, for a number of weeks.

Only for an athlete who lifts on fixed weekdays. One who fits strength around the rest of the week has no "every Tuesday": give them individual sessions with add_strength_session instead, and skip this tool. The two also combine: a weekly pattern, with move_strength_session or remove_strength_session for the weeks that differ.

Use this for strength / Hevy cycles: the schedule references Hevy routines by id + title (get them from the hevy-mcp first). These sessions are plan markers only — they are NOT pushed to the Apple Watch (that's for running interval workouts). Completed strength sessions auto-match by date via the HealthKit traditionalStrength workouts that Hevy already syncs in.

IMPORTANT — avoid conflicts: call get_training_calendar first to see scheduled runs, and place strength days on free weekdays. The response also returns a warnings list flagging any day where a strength session lands on the same date as a scheduled run (surfaced, not blocked — you decide).

Args: plan_id: UUID of the plan this cycle belongs to (create one first via create_plan with activity_type "strength"). start_date: First week's anchor date (YYYY-MM-DD). weeks: How many weeks the cycle runs (1–52). days: Which weekday gets which routine — set only the days that have a session. Example: { "mon": {"title": "Lower", "routineId": "hevy-abc"}, "wed": {"title": "Upper Push", "routineId": "hevy-def"}, "fri": {"title": "Deadlifts + Pull", "routineId": "hevy-ghi"} } time: Optional default time of day "HH:MM". timezone: Optional IANA timezone (e.g. "Europe/Lisbon").

Returns: The resolved schedule: concrete dated sessions (each with a conflict flag) and a warnings list for run collisions.

add_strength_sessionA

Put one strength session on one date, leaving the rest of the plan's schedule as it is.

This is how to schedule strength for an athlete without fixed gym days: look at the week's runs with get_training_calendar, then add each session on the day it fits. It also adds an extra session next to a weekly pattern. A plan needs no weekly pattern at all; the first session added starts its schedule.

Like every strength session it is a plan marker, not a watch workout, and it counts as done when a Hevy workout syncs in on that date. Adding the same title on the same date again replaces it.

Args: plan_id: UUID of the strength plan (create_plan with activity_type "strength"). date: The day of the session (YYYY-MM-DD). title: What the session is, e.g. "Lower body + core". routine_id: Optional Hevy routine id (from the hevy-mcp).

Returns: The resolved schedule: dated sessions (recurring is false for individual ones, each with a conflict flag) and warnings for run collisions.

move_strength_sessionA

Move the strength session on one date to another date, keeping its title and routine.

Works for an individual session and for one occurrence of a weekly pattern; the pattern's other weeks stay where they are. Use it when the athlete says a session doesn't fit that day this week.

Args: plan_id: UUID of the strength plan. date: The day the session is on now (YYYY-MM-DD). to_date: The day to move it to (YYYY-MM-DD).

Returns: The resolved schedule after the move. An error when nothing is scheduled on date.

remove_strength_sessionA

Take the strength session on one date off the plan.

An individual session is removed. One occurrence of a weekly pattern is skipped for that date only and the pattern carries on. To drop the whole schedule use clear_plan_schedule.

Args: plan_id: UUID of the strength plan. date: The day of the session to remove (YYYY-MM-DD).

Returns: The resolved schedule after the removal. An error when nothing is scheduled on date.

get_plan_scheduleA

Get a plan's schedule (weekly pattern and individual sessions) expanded into concrete dated sessions.

Args: plan_id: UUID of the plan.

Returns: {plan_id, schedule, sessions[], warnings[]} — sessions carry a conflict flag where they collide with a queued run.

clear_plan_scheduleA

Remove a plan's whole schedule: the weekly pattern and every individual session. For a single session use remove_strength_session.

Args: plan_id: UUID of the plan.

Returns: The plan's now-empty schedule response.

validate_planA

Deterministically check the athlete's upcoming schedule for soundness, using this plan's context (guardrails, race date from metadata).

Run this after queueing or reshuffling a plan's workouts, and before presenting a plan to the athlete as final. It is pure arithmetic over the queue + the athlete's real workout history — no LLM judgment — checking the coaching playbook's numeric invariants: weekly ramp vs the actual 4-week baseline, missing down weeks, long-run share, back-to-back hard days, taper shape before race_date, and the plan's own declared guardrails.

Interpreting results: critical warnings should be resolved (adjust the schedule and re-queue) or explicitly signed off by the athlete; warn items should at least be mentioned; info is context. estimated: true means the numbers rest on a pace assumption (time-based steps without a pace alert). Warnings never block anything.

Note strength_collision (info) fires for a hard run the day after a strength session — an interference heads-up, deliberately broader than the calendar's conflict flag, which only marks two sessions sharing a date. A day-after warning here with conflict=false on the calendar is consistent, not contradictory.

Args: plan_id: UUID of the plan whose context (guardrails, race date) frames the check. The schedule itself is always the athlete's full upcoming queue — runs from other plans count too.

Returns: {plan_id, warnings[], weeks[]} — warnings have {code, severity, message, week, data, estimated}; weeks summarize each planned week (planned_km, actual_km, total_km, run_days, hard_days, longest_km, baseline_km, ratio).

get_training_calendarA

Get the unified training calendar: scheduled runs (Apple Watch queue) merged with recurring strength sessions (from active plan schedules), with same-day conflicts flagged.

Call this before scheduling strength days so you can place them on days that don't already have a run.

Args: date_from: Window start (YYYY-MM-DD). Defaults to today. date_to: Window end (YYYY-MM-DD). Defaults to today + 28 days.

Returns: {from, to, entries[]} where each entry has: date, kind ("run" or "strength"), title, activityType, status, planId, planName, routineId, completed, conflict. conflict marks same-day double-bookings only; adjacent-day concerns (hard run right after a strength day) surface through validate_plan instead.

get_plan_contextA

Load continuity context for the active training plan.

ALWAYS call this FIRST in any training-related conversation, before answering the user. It returns the active plan plus recent notes (decisions, preferences, constraints, life context, blockers, observations) ranked by importance and recency. This is how you maintain continuity across conversations.

The response includes a continuity_hint string — read it. It tells you whether continuity is fresh or stale and may instruct you to write notes aggressively this conversation.

Args: plan_id: UUID of a specific plan. Omit to use the active plan. since_days: Only return notes created within this window (default 60). limit: Maximum number of notes to return (default 40, max 200).

Returns: Object with: - plan: the resolved plan (or null if none active) - notes: list of PlanNote objects (id, kind, summary, body, importance, conversation_id, expires_at, created_at), ordered by importance desc then created_at desc - last_note_age_days: age of the most recent note (or null) - continuity_hint: a directive for how aggressively to save notes this conversation - units: "metric", "imperial" or null (the athlete has not chosen) - units_hint: how to talk and author workouts for this athlete's units. Follow it: an athlete on miles should never be handed kilometers. - setbacks: the athlete's open illnesses and injuries, plus those that ended in the last three weeks (kind, severity, startDate, endDate, days, checkins, and for open ones recovery: whether the recent data says it looks over). Empty when there are none or when the athlete does not share them. - setback_hint: what to do about them. Follow it when it is not empty: an open setback comes before the plan.

append_plan_noteA

Save a continuity note about the user's training.

Call this WITHOUT BEING ASKED whenever ANY of the following happens during a conversation:

• User states a preference. Trigger phrases: "I prefer", "I like", "I hate", "from now on", "going forward", "always", "never". • User makes a plan decision. Trigger phrases: "let's drop", "let's switch", "let's add", "I've decided", "I'm going to", "this week I'll", "starting Monday". • User reveals life context that affects training. Examples: travel, illness, injury, sleep debt, work stress, life events, weather constraints, schedule shifts. • User commits to a change in approach. • A non-obvious insight emerges that future-you would want to know but couldn't infer from workout data alone.

DO save short, partial notes — they are cheap. DO NOT save: chitchat, things derivable from workout/health-metrics data, code-level details, or one-off acknowledgments.

Tip: if a note is temporal (e.g. "traveling Mar 1–5"), set expires_at so it auto-fades from future context.

Args: kind: One of: - "decision" — the user committed to a plan-level change - "preference" — a stable preference about how training works - "constraint" — a hard limit (schedule, equipment, injury) - "life_context" — temporary life situation affecting training - "observation" — non-obvious insight worth remembering - "blocker" — something preventing planned training - "feedback" — the athlete's own review of a plan or block (the dashboard's plan wrap-up flow writes these too) summary: One-line summary, ≤280 chars. Lead with the fact, not "the user said". Example: "Prefers morning runs, never evenings." body: Optional longer body — the why, edge cases, exceptions. Future-you reads this when the summary alone is ambiguous. importance: 1=low, 2=med (default), 3=high. Use 3 sparingly for hard constraints and committed decisions. expires_at: Optional ISO 8601 datetime. After this, the note is excluded from get_plan_context results. Use for temporal life_context notes (travel, short-term illness, etc.). plan_id: Optional plan UUID. Omit for global notes that apply across all plans (e.g. stable preferences). conversation_id: Optional opaque string to group all notes from one conversation. Use a stable id throughout the conversation so future-you can replay what was discussed together.

Returns: The created PlanNote object.

list_plan_notesA

List plan notes with filters. Use this for targeted retrieval (e.g. only "decision" notes, or all notes from a specific conversation_id).

For the standard conversation-start fetch, use get_plan_context instead — it returns plan + notes + a continuity hint in one call.

Args: plan_id: Filter by plan UUID. kind: Filter by kind (decision, preference, constraint, life_context, observation, blocker, feedback). conversation_id: Filter by conversation grouping id. since_days: Only notes created within this window. include_expired: If true, include notes past their expires_at. limit: Max notes to return (default 50, max 200).

Returns: List of PlanNote objects ordered by importance desc, created_at desc.

update_plan_noteA

Update a plan note. Use when a previous note was wrong, became obsolete, or needs a tighter summary. Prefer updating over deleting + re-creating so the note's history is preserved.

Args: note_id: UUID of the note. kind: New kind, if changing categorization. summary: New one-line summary (≤280 chars). body: New body text. importance: New importance (1–3). expires_at: New expiry, or pass to add expiry to a note that didn't have one.

Returns: The updated PlanNote.

delete_plan_noteA

Delete a plan note. Use only when the note was incorrect or duplicated. Prefer update_plan_note (or setting expires_at for temporal notes) over deletion — deleted notes lose history.

Args: note_id: UUID of the note to delete.

Returns: Confirmation with the deleted note id.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 59 tools

Disambiguation3/5

Several tools overlap in purpose: get_pending_workouts vs list_queued_workouts, get_pending_actions vs get_pending_workouts, edit_scheduled_workout vs update_queued_workout, and delete_scheduled_workout vs delete_workout. Descriptions do clarify the distinctions (queue vs on-device vs recorded, pending actions vs pending workouts), but an agent can still misselect without reading carefully. The large surface makes some confusion likely, though most domains remain separable.

Naming Consistency4/5

The overwhelming majority of tools follow snake_case verb_noun naming (get_recent_runs, create_plan, update_shoe, log_workout_fuel). A few outliers exist, such as batch_actions and batch_create_workouts, which are still understandable. The set is predictable enough for reliable tool selection.

Tool Count2/5

With 59 tools, the surface is far above the typical well-scoped range and includes many CRUD variants across workouts, plans, strength scheduling, fuel, shoes, notes, health, and setbacks. While the coaching domain is broad, this many tools creates maintenance and selection overhead. Several overlapping pairs suggest the count could be reduced through consolidation.

Completeness4/5

The server covers the domain thoroughly: workout queue and recorded-workout lifecycle, plans, strength schedule management, fuelling, shoes, notes, health metrics, setbacks, feedback, calendar, validation, and coaching context. Minor gaps exist, such as no update/delete for fuel products (only add/list), but core workflows are well supported. Agents are unlikely to hit dead ends in normal training-coaching use.

Maintenance

ActivityActive
ResponsivenessLimited data