createWorkout
ChatGPTIMPORTANT: Before calling this tool, you MUST first call the user-profile tool to retrieve the user's IANA timezone. Use that timezone to construct all date-time values with the correct UTC offset. Never assume a timezone or pass date-only strings without time and offset. Create a new workout for the authenticated user, or as a coach for an athlete in a training center by providing trainingCenterUuid and connectionId. The athlete must have granted coaching MCP access. Workout shape: • Top-level metadata: scheduling (scheduled_at), workout_type, optional name, and optional completion flags when explicitly relevant. Notes and RPE are the athlete's post-workout self-summary in the app—do not set them via this tool; leave them for the athlete. • drills: ordered list of in-water / structured work. Omit drills entirely for schedule-only sessions (e.g. strength, sauna, stretching, recovery blocks) where the plan is just date, type, and title. How prescriptions are usually built: • One drill ≈ one block (e.g. a main set, a secondary set, or a depth line). Chain multiple drills when the session has distinct phases; use the workout name to summarize the whole day at a glance. • Optional drill name and drill/element notes are for coach-facing instructions (how to run the block, cues, equipment). Element notes explain each piece to the athlete. • Pace and duration bounds: call the user-profile tool for disciplineSpeeds—per-discipline speeds in m/s for low, normal, and high pace (user-defined where set, merged with defaults). Use them to estimate dive or swim time from distance/depth, reason about interval load, and set realistic bounds on overall workout duration when authoring or reviewing a plan. Each drill: • elements: ordered segments for a single repetition—pool lengths, depth targets, static holds, or an "other" step with notes (e.g. breath-up / protocol cues). Every rep runs the full list in order; use multiple elements when one "rep" is a composed sequence, not only a single lap or dive. • reps: how many times to repeat that full element sequence. Intervals between reps use rest_type (see below)—not gaps between individual elements inside one rep. Discipline fields (set what matches the discipline): • Pool dynamics: distance (m), pace. Variants: no fins, monofin, bifins. • Static apnea: time (seconds), pace, optional static_apnea_goal: only 1 = contractions and 4 = general. Omit or use 4 for a plain timed hold. Contractions set (two elements in one rep): first element goal 1 = hold until contractions (open-ended phase); second element goal 4 with a duration (e.g. 30 seconds)—“after contractions, continue 30s”. At most two elements when contractions is used; keep contractions first. • Depth: depth (m) and the correct depth discipline (e.g. constant weight, bifins, CNF, FIM, hang), pace. Rest between repetitions (same drill, after each rep except the last rep): • rest_type "fixed" — fixed_rest_time in seconds (typical for pool interval training). • rest_type "dynamic" — dynamic_rest_option: dive_time (1×), twice_dive_time (2×), three_dive_time (3×) vs dive/hold duration; common on depth sessions with repeated dives. • rest_type "free_text" — free_text_label for a custom label shown to the athlete. • rest_type null — no rest between reps. Rest between drills (after a drill, before the next): • break_time is the pause in seconds after that drill before starting the next block. Set it whenever the athlete should recover between sections (e.g. moving from a long single effort to a rep scheme, or between pool sets). The last drill does not need a following break—still set break_time on earlier drills when the plan calls for it.
getAthleteWorkouts
ChatGPTIMPORTANT: Before calling this tool, you MUST first call the user-profile tool to retrieve the user's IANA timezone. Use that timezone to construct all date-time values with the correct UTC offset. Never assume a timezone or pass date-only strings without time and offset. Get workouts for athletes in the coach's training centers. Only includes athletes who have granted coaching MCP access. Respects each athlete's workout sharing date preference. Returns workouts grouped by athlete connection ID. How to read the JSON (not just raw keys): • The payload is an array of { connection_id, workouts }. Each connection_id identifies an athlete in the training center; workouts is that athlete's list for the range (most recently scheduled first). • Each workout object: uuid, scheduled_at (ISO), workout_type, optional name, labels, completed, is_competition; optional notes and rpe are the athlete's post-workout log when filled in—not coach plan text. • pool_length_meters: the pool length used for this workout in metres (e.g. 25, 50). Always present. Use this to convert laps to distance when pool_length_meters is needed (e.g. total metres swum = laps × pool_length_meters). • drills lists prescription blocks in order; an empty array is normal for schedule-only sessions (e.g. strength, sauna, stretching) with no in-water structure. • total_distance is meters; total_apnea_time and total_workout_duration are seconds (derived estimates from the drill structure and pace/discipline assumptions—not a stopwatch recording). • workoutTypes filter (if provided): pool — pool-training and/or pool disciplines inside drills; depth — depth-training and/or depth disciplines; static — static-only sessions; supporting — stretching, strength, other, sauna. workout_state (present when the athlete has started or completed the session in the app): • flatWorkout: the workout unrolled into a flat sequence of items for execution. Each item is either an exercise (the drill object with repIndex) or a rest (kind: "rest" with optional seconds or label). Exercise items do not carry a "kind" field—absence of "kind" means it is an exercise. • states: a map of exercise key → array of lap times in elapsed seconds. Keys follow the pattern used by the app to identify each exercise step. Each lap time is the duration recorded by the athlete's stopwatch for that lap. For pool disciplines use pool_length_meters to convert laps to distance: speed (m/s) = pool_length_meters / lap_time_seconds. For depth or static disciplines, the lap time is the total dive or hold duration. • Only exercises with at least one recorded lap appear in states—absent keys mean the athlete has not started that step. raw_wearable_data (present when a wearable device synced data for this workout): • An array of raw session objects uploaded from the athlete's wearable (e.g. Apple Watch). Each entry is the full raw JSON payload from the device. Use this data to cross-reference heart rate, HRV, SpO₂, or other sensor readings against the structured workout data. Workout shape: • Top-level metadata: scheduling (scheduled_at), workout_type, optional name, and optional completion flags when explicitly relevant. Notes and RPE are the athlete's post-workout self-summary in the app—do not set them via this tool; leave them for the athlete. • drills: ordered list of in-water / structured work. Omit drills entirely for schedule-only sessions (e.g. strength, sauna, stretching, recovery blocks) where the plan is just date, type, and title. How prescriptions are usually built: • One drill ≈ one block (e.g. a main set, a secondary set, or a depth line). Chain multiple drills when the session has distinct phases; use the workout name to summarize the whole day at a glance. • Optional drill name and drill/element notes are for coach-facing instructions (how to run the block, cues, equipment). Element notes explain each piece to the athlete. • Pace and duration bounds: call the user-profile tool for disciplineSpeeds—per-discipline speeds in m/s for low, normal, and high pace (user-defined where set, merged with defaults). Use them to estimate dive or swim time from distance/depth, reason about interval load, and set realistic bounds on overall workout duration when authoring or reviewing a plan. Each drill: • elements: ordered segments for a single repetition—pool lengths, depth targets, static holds, or an "other" step with notes (e.g. breath-up / protocol cues). Every rep runs the full list in order; use multiple elements when one "rep" is a composed sequence, not only a single lap or dive. • reps: how many times to repeat that full element sequence. Intervals between reps use rest_type (see below)—not gaps between individual elements inside one rep. Discipline fields (set what matches the discipline): • Pool dynamics: distance (m), pace. Variants: no fins, monofin, bifins. • Static apnea: time (seconds), pace, optional static_apnea_goal: only 1 = contractions and 4 = general. Omit or use 4 for a plain timed hold. Contractions set (two elements in one rep): first element goal 1 = hold until contractions (open-ended phase); second element goal 4 with a duration (e.g. 30 seconds)—“after contractions, continue 30s”. At most two elements when contractions is used; keep contractions first. • Depth: depth (m) and the correct depth discipline (e.g. constant weight, bifins, CNF, FIM, hang), pace. Rest between repetitions (same drill, after each rep except the last rep): • rest_type "fixed" — fixed_rest_time in seconds (typical for pool interval training). • rest_type "dynamic" — dynamic_rest_option: dive_time (1×), twice_dive_time (2×), three_dive_time (3×) vs dive/hold duration; common on depth sessions with repeated dives. • rest_type "free_text" — free_text_label for a custom label shown to the athlete. • rest_type null — no rest between reps. Rest between drills (after a drill, before the next): • break_time is the pause in seconds after that drill before starting the next block. Set it whenever the athlete should recover between sections (e.g. moving from a long single effort to a rep scheme, or between pool sets). The last drill does not need a following break—still set break_time on earlier drills when the plan calls for it.
getDiveProfiles
ChatGPTGet the FULL dive profiles for one or more depth workouts. Use this after getWorkouts / getAthleteWorkouts (which list only a lightweight per-dive 'dives' summary) when you need the detailed shape of the dives — depth curve, phase timings, depth-alarm markers, or detected propulsion strokes. Access: the workout owner, or a coach/buddy with view access; for another athlete's workout the athlete must have granted coaching MCP access. UUIDs you cannot access, or that have no imported dives, are silently omitted. Input: workoutUUIDs — an array of workout uuids (1–20). Heavy per call: each dive carries a per-second sample series, so request only the specific workouts you intend to analyse, not a whole date range. How to read the JSON: • The payload is an array of { workout_uuid, dive_profiles }. dive_profiles is that workout's dives in order. • Each dive: dive_index, started_at, discipline, max_depth_m, dive_time_s, surface_interval_s, descent_time_s, ascent_time_s, avg_descent_speed_mps, avg_ascent_speed_mps, hang_time_s, water_temp_c. • profile: the normalised per-second series [{ t, depth, hr, temp, v }] — t seconds from the dive's first sample, depth in metres (positive down), hr bpm, temp °C, v raw signed vertical speed m/s (positive down, negative up; unsmoothed — smooth it yourself if needed). • phases: turn-point split { turn_time_s, descent_time_s, bottom_time_s, ascent_time_s, time_to_20m_s } (time_to_20m_s is null when the dive never reached 20 m). • alarms: fired depth-alarm markers [{ t, depth }], aligned to the profile timeline. • strokes: detected propulsion strokes split by phase — { descent: [{ t, depth, distance_m }], ascent: [...], descent_count, ascent_count, total }, aligned to the profile timeline. distance_m is the metres the stroke propelled the athlete (depth covered until the next stroke; the last stroke reaches the apex on descent / the surface on ascent — freefall after the last descent stroke is included in it, and the entry before the first stroke is unattributed). Detection is discipline-agnostic; label the events from the dive's discipline: pulls (free_immersion), strokes (constant_weight_no_fins), kicks (constant_weight / constant_weight_with_bifins). Empty arrays mean no propulsion peaks (e.g. pure freefall or hang), not missing data.
getSensorSeries
ChatGPTGet recorded sensor statistics for one or more workouts — heart rate, SpO2 and anything else a device streamed during the session. Use this after getWorkouts / getAthleteWorkouts (which list only which devices recorded, under 'sensors') when you need the actual numbers. Access: the workout owner, or a coach/buddy with view access; for another athlete's workout the athlete must have granted coaching MCP access. UUIDs you cannot access, or with no recorded series, are silently omitted. Input: workoutUUIDs — an array of workout uuids (1–20). How to read the JSON: • The payload is an array of { workout_uuid, series }. • Each series entry is one device-and-measurement pair: { origin, name, kind, points, from, to, duration_s, stats }. kind is what was measured (heartRate, spo2, …); points is the number of recorded samples; from/to are the first and last sample instants in epoch milliseconds (the same clock as workout_state lap_end_timestamp, so you can line a series up against the laps); duration_s is the recording span in seconds. • stats maps each recorded field to { min, max, avg } over its non-null values — e.g. { hr: { min: 52, max: 178, avg: 131 } } for heartRate, { spo2, pulse, pi } for an oximeter. Values are raw, in the device's own units (hr in bpm, spo2 in %); a field the device never filled in is absent. • The per-sample series itself is NOT available over MCP by design — it is thousands of points per session. Reason from the statistics and the session structure; the athlete's app renders the curve.
getSkillsGuide
ChatGPTReturns the full Freediver Club MCP skills guide as Markdown. Call ths tool in case the skills guide is not available in the host. Call at the start of a planning or coaching session so tool usage, workout structure, pace rules, safety, and workflows are available. Read-only reference text; does not access user data.
getTrainingCenters
ChatGPTGet all training centers the authenticated coach manages, along with the athletes in each center who have granted coaching MCP access. Athletes who have not enabled the ALLOW_COACHING_MCP_ACCESS setting are excluded.
getWorkouts
ChatGPTIMPORTANT: Before calling this tool, you MUST first call the user-profile tool to retrieve the user's IANA timezone. Use that timezone to construct all date-time values with the correct UTC offset. Never assume a timezone or pass date-only strings without time and offset. Get the authenticated user's workouts within a date range. Returns full workout details including drills, elements, and calculated totals (distance, apnea time, duration). How to read the JSON (not just raw keys): • The payload is an array of workout objects, most recently scheduled first. • Each workout object: uuid, scheduled_at (ISO), workout_type, optional name, labels, completed, is_competition; optional notes and rpe are the athlete's post-workout log when filled in—not coach plan text. • pool_length_meters: the pool length used for this workout in metres (e.g. 25, 50). Always present. Use this to convert laps to distance when pool_length_meters is needed (e.g. total metres swum = laps × pool_length_meters). • drills lists prescription blocks in order; an empty array is normal for schedule-only sessions (e.g. strength, sauna, stretching) with no in-water structure. • total_distance is meters; total_apnea_time and total_workout_duration are seconds (derived estimates from the drill structure and pace/discipline assumptions—not a stopwatch recording). • workoutTypes filter (if provided): pool — pool-training and/or pool disciplines inside drills; depth — depth-training and/or depth disciplines; static — static-only sessions; supporting — stretching, strength, other, sauna. workout_state (present when the athlete has started or completed the session in the app): • flatWorkout: the workout unrolled into a flat sequence of items for execution. Each item is either an exercise (the drill object with repIndex) or a rest (kind: "rest" with optional seconds or label). Exercise items do not carry a "kind" field—absence of "kind" means it is an exercise. • states: a map of exercise key → array of lap times in elapsed seconds. Keys follow the pattern used by the app to identify each exercise step. Each lap time is the duration recorded by the athlete's stopwatch for that lap. For pool disciplines use pool_length_meters to convert laps to distance: speed (m/s) = pool_length_meters / lap_time_seconds. For depth or static disciplines, the lap time is the total dive or hold duration. • Only exercises with at least one recorded lap appear in states—absent keys mean the athlete has not started that step. raw_wearable_data (present when a wearable device synced data for this workout): • An array of raw session objects uploaded from the athlete's wearable (e.g. Apple Watch). Each entry is the full raw JSON payload from the device. Use this data to cross-reference heart rate, HRV, SpO₂, or other sensor readings against the structured workout data. Workout shape: • Top-level metadata: scheduling (scheduled_at), workout_type, optional name, and optional completion flags when explicitly relevant. Notes and RPE are the athlete's post-workout self-summary in the app—do not set them via this tool; leave them for the athlete. • drills: ordered list of in-water / structured work. Omit drills entirely for schedule-only sessions (e.g. strength, sauna, stretching, recovery blocks) where the plan is just date, type, and title. How prescriptions are usually built: • One drill ≈ one block (e.g. a main set, a secondary set, or a depth line). Chain multiple drills when the session has distinct phases; use the workout name to summarize the whole day at a glance. • Optional drill name and drill/element notes are for coach-facing instructions (how to run the block, cues, equipment). Element notes explain each piece to the athlete. • Pace and duration bounds: call the user-profile tool for disciplineSpeeds—per-discipline speeds in m/s for low, normal, and high pace (user-defined where set, merged with defaults). Use them to estimate dive or swim time from distance/depth, reason about interval load, and set realistic bounds on overall workout duration when authoring or reviewing a plan. Each drill: • elements: ordered segments for a single repetition—pool lengths, depth targets, static holds, or an "other" step with notes (e.g. breath-up / protocol cues). Every rep runs the full list in order; use multiple elements when one "rep" is a composed sequence, not only a single lap or dive. • reps: how many times to repeat that full element sequence. Intervals between reps use rest_type (see below)—not gaps between individual elements inside one rep. Discipline fields (set what matches the discipline): • Pool dynamics: distance (m), pace. Variants: no fins, monofin, bifins. • Static apnea: time (seconds), pace, optional static_apnea_goal: only 1 = contractions and 4 = general. Omit or use 4 for a plain timed hold. Contractions set (two elements in one rep): first element goal 1 = hold until contractions (open-ended phase); second element goal 4 with a duration (e.g. 30 seconds)—“after contractions, continue 30s”. At most two elements when contractions is used; keep contractions first. • Depth: depth (m) and the correct depth discipline (e.g. constant weight, bifins, CNF, FIM, hang), pace. Rest between repetitions (same drill, after each rep except the last rep): • rest_type "fixed" — fixed_rest_time in seconds (typical for pool interval training). • rest_type "dynamic" — dynamic_rest_option: dive_time (1×), twice_dive_time (2×), three_dive_time (3×) vs dive/hold duration; common on depth sessions with repeated dives. • rest_type "free_text" — free_text_label for a custom label shown to the athlete. • rest_type null — no rest between reps. Rest between drills (after a drill, before the next): • break_time is the pause in seconds after that drill before starting the next block. Set it whenever the athlete should recover between sections (e.g. moving from a long single effort to a rep scheme, or between pool sets). The last drill does not need a following break—still set break_time on earlier drills when the plan calls for it.
updateTrainingSession
ChatGPTRecord what actually happened in a session (the executed training-session state) without touching the planned drills — to change the plan itself, use updateWorkout instead. Typical use: after reading wearable data (e.g. Garmin), write the actual depths/distances, rests, laps, and completion for a planned workout. The executed session is INDEPENDENT of the plan: the achieved depth/distance and the real breaks you send here override the plan values and never modify it. Never call updateWorkout to reflect what was performed. Access: the workout owner, or a coach/buddy with assist access. When writing another athlete's session, the athlete must have granted coaching MCP access. How the input works: • flatWorkout (optional): the executed sequence as a flat list. Rest items are written literally ({ kind: "rest", seconds and/or label }) — use them to record the actual breaks taken (they do NOT inherit the plan's rest). Exercise items are references ({ kind: "exercise", drillId, repIndex }): drillId is the 1-based position of the drill in the workout's plan, repIndex the 1-based repetition number; the server expands each reference into the full drill from the current plan. Add an optional distance on an exercise item to record the achieved measurement for that dive/rep — reached depth (m) for depth disciplines (CWT/CWTB/CNF/FIM/hang), swum distance (m) for pool disciplines (DYN/DYNb/DNF) — overriding the plan value for that item only; omit it to keep the plan value. distance cannot be set on static or "other" exercises. Omit flatWorkout to keep the existing executed sequence (or the plan's default flattening). • states (optional): a map of exercise key → { laps, completed? }. Keys are "ex-<index>" where index is the item's position in flatWorkout (the one you send in this call, or the effective one if you omit flatWorkout). laps are plain elapsed seconds per lap/dive/hold (on read they appear under states["ex-N"].laps[].elapsed). You send durations only — the server derives each lap's lap_end_timestamp from the workout's scheduled time plus the cumulative lap seconds within that exercise, so on read those instants mark lap ends but are not real wall-clock times and the gaps between them are not the real rests. completed defaults to true. Provided keys overwrite that exercise's recording; absent keys are preserved (per-key merge), so incremental writes are safe. • poolSizeMeters (optional): pool length in meters used for this session. • Checksums are handled automatically by the server — never construct or send one. Depth sessions with per-dive surface intervals: reps of the SAME drill render as one grouped "N reps" block sharing a single rest, so the real breaks between those dives disappear. Before recording such a session, reshape the plan with updateWorkout so every dive is its own 1-rep drill (reps: 1, rest_type: null, break_time = the real surface interval after that dive, no break_time on the last). Keep nominal depth targets rounded to whole meters — the reached depth goes on the executed distance override, which accepts decimals. Then every executed exercise uses repIndex 1 and its own drillId. Worked example — an executed depth session. Dives 29.5m (1:21), 60m (2:00), 60m (2:09), 64m (2:06); surface intervals 1317s, 2001s, 1269s. Plan reshaped via updateWorkout into 4 one-rep CWT drills (depths 20/60/60/60, break_time 1317/2001/1269/none). Then send: flatWorkout: [ { kind: "exercise", drillId: 1, repIndex: 1, distance: 30 }, { kind: "rest", seconds: 1317 }, { kind: "exercise", drillId: 2, repIndex: 1, distance: 60 }, { kind: "rest", seconds: 2001 }, { kind: "exercise", drillId: 3, repIndex: 1, distance: 60 }, { kind: "rest", seconds: 1269 }, { kind: "exercise", drillId: 4, repIndex: 1, distance: 64 } ], states: { "ex-0": { laps: [81] }, "ex-2": { laps: [120] }, "ex-4": { laps: [129] }, "ex-6": { laps: [126] } } This records CWT 30m/60m/60m/64m with the actual breaks and dive times, each dive rendering as its own block. Returns the merged training-session state in the same workout_state shape that getWorkouts returns.
updateWorkout
ChatGPTIMPORTANT: Before calling this tool, you MUST first call the user-profile tool to retrieve the user's IANA timezone. Use that timezone to construct all date-time values with the correct UTC offset. Never assume a timezone or pass date-only strings without time and offset. Update an existing workout. Only provided fields are changed. The user must be the workout owner or the coach who created it. When editing an athlete's workout, the athlete must have granted coaching MCP access. Workout shape: • Top-level metadata: scheduling (scheduled_at), workout_type, optional name, and optional completion flags when explicitly relevant. Notes and RPE are the athlete's post-workout self-summary in the app—do not set them via this tool; leave them for the athlete. • drills: ordered list of in-water / structured work. Omit drills entirely for schedule-only sessions (e.g. strength, sauna, stretching, recovery blocks) where the plan is just date, type, and title. How prescriptions are usually built: • One drill ≈ one block (e.g. a main set, a secondary set, or a depth line). Chain multiple drills when the session has distinct phases; use the workout name to summarize the whole day at a glance. • Optional drill name and drill/element notes are for coach-facing instructions (how to run the block, cues, equipment). Element notes explain each piece to the athlete. • Pace and duration bounds: call the user-profile tool for disciplineSpeeds—per-discipline speeds in m/s for low, normal, and high pace (user-defined where set, merged with defaults). Use them to estimate dive or swim time from distance/depth, reason about interval load, and set realistic bounds on overall workout duration when authoring or reviewing a plan. Each drill: • elements: ordered segments for a single repetition—pool lengths, depth targets, static holds, or an "other" step with notes (e.g. breath-up / protocol cues). Every rep runs the full list in order; use multiple elements when one "rep" is a composed sequence, not only a single lap or dive. • reps: how many times to repeat that full element sequence. Intervals between reps use rest_type (see below)—not gaps between individual elements inside one rep. Discipline fields (set what matches the discipline): • Pool dynamics: distance (m), pace. Variants: no fins, monofin, bifins. • Static apnea: time (seconds), pace, optional static_apnea_goal: only 1 = contractions and 4 = general. Omit or use 4 for a plain timed hold. Contractions set (two elements in one rep): first element goal 1 = hold until contractions (open-ended phase); second element goal 4 with a duration (e.g. 30 seconds)—“after contractions, continue 30s”. At most two elements when contractions is used; keep contractions first. • Depth: depth (m) and the correct depth discipline (e.g. constant weight, bifins, CNF, FIM, hang), pace. Rest between repetitions (same drill, after each rep except the last rep): • rest_type "fixed" — fixed_rest_time in seconds (typical for pool interval training). • rest_type "dynamic" — dynamic_rest_option: dive_time (1×), twice_dive_time (2×), three_dive_time (3×) vs dive/hold duration; common on depth sessions with repeated dives. • rest_type "free_text" — free_text_label for a custom label shown to the athlete. • rest_type null — no rest between reps. Rest between drills (after a drill, before the next): • break_time is the pause in seconds after that drill before starting the next block. Set it whenever the athlete should recover between sections (e.g. moving from a long single effort to a rep scheme, or between pool sets). The last drill does not need a following break—still set break_time on earlier drills when the plan calls for it.
user-profile
ChatGPTGet the authenticated user's profile preferences: IANA timezone, preferred UI language, and resolved discipline speeds. All speed values in disciplineSpeeds are in meters per second (m/s): low, normal, and high pace per freediving discipline (merged with defaults when the user has not customized a discipline). Use disciplineSpeeds when planning or estimating workout duration from distance, depth, and pace (same basis as app totals).