garmin-mcp

v0.8.0
io.github.endurancetools/garmin-mcp Checked 7 hours ago Published 9 days ago

Unofficial Garmin Connect server: training load, form, HRV readiness and workouts for your watch

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

garmin_sync Sync Garmin data

Download data from Garmin Connect into the local cache. Read tools already download missing data by themselves, so call this only when the user asks to sync/refresh or to pre-load a range, or when a tool returned meta.sync_hint (auto fetch turned off) and the user agreed; pass the hint's scope/from/to. Days already stored are skipped. Long ranges continue in the background: this waits at most 20 s and reports progress (also in garmin://sync-status).

ParameterTypeDescription
forcebooleanRe-download days that are already stored
fromstringStart date; default: 7 days before `to`
scopestringall | activities | health (daily summary, sleep, HRV, weight) | training (status, readiness, VO2max) | reference (profile, gear, devices, activity types, workouts, calendar months of from..to, also in…
tostringEnd date; default: today

get_activities List activities

List workouts/activities (runs, rides, swims, strength...) as dense summaries: id, date, type, name, duration, distance, pace or speed, GAP, HR, power, NP, cadence, training load and Training Effect, temperature (if weather downloaded), event_type when tagged (e.g. race). Use for "what did I do last week", finding an activity id, or comparing sessions. For one activity in depth use get_activity; for weekly/monthly totals use get_period_summary.

ParameterTypeDescription
cursorstringnext_cursor from the previous page
event_typestringOnly activities tagged with this event type, e.g. race
fromstringFirst day, inclusive; default no lower bound
limitintegerActivities per page
max_duration_minnumberAt most this many minutes long
min_duration_minnumberAt least this many minutes long
namestringPart of the activity name, any case, e.g. a route
pacestringAverage pace range per km, e.g. "4:45-5:30"
sortstringBy start time: desc newest first, asc oldest first
tostringLast day, inclusive; default today
typestringGarmin type key, e.g. running, trail_running, cycling, lap_swimming, strength_training; partial match. All keys: resource garmin://activity-types

get_activity Get one activity

Details of one activity by id. detail="summary" (default) for the overview incl. description, RPE, feel, GAP, running dynamics (cadence, GCT, balance, VO, VR, stride), breathing rate, stamina, Training Effect label, run/walk/stand time, HR source (strap or watch) and workout_id (for get_workout); "splits" adds laps with the same dynamics, intensity (warmup, active, rest...) and, for a workout, the step as get_workout numbers it (wkt_step) and its compliance, plus typed splits (run, walk, stand, ClimbPro climbs) with totals per type; "hr_zones" adds time in HR zones; "power_zones" adds time in…

ParameterTypeDescription
id *integerActivity id from get_activities
bucketstringFor detail="stream_summary"; "climbs": each climb with grade, VAM, W/kg
cursorstringFor detail="full": next_cursor of the previous page (same metrics and downsample_s)
detailstring
downsample_sintegerFor detail="full": at most one sample per this many seconds
metricsarrayFor detail="full": stream keys to keep, e.g. ["directHeartRate","directPower"]

update_activity Edit or add an activity

Change an activity in Garmin Connect: name, type, event_type (e.g. race), description (notes), rpe, feel, privacy, or the gear used: add_gear puts shoes or a bike on it, remove_gear takes one off (swap: both in one call). Without id it adds a manual activity (type, start, duration_min; optional distance_km, name, description, rpe, feel, privacy, default private): show the user these values and call after they agree. Only call when the user asked for the change. Returns the activity after the edit.

ParameterTypeDescription
add_gearstringGear name (or part of it) or uuid from get_gear
descriptionstringNotes; replaces the current ones
distance_kmnumber
duration_minnumber
event_typestringrace, training, recreation, special_event, fitness, touring, transportation, geocaching or uncategorized
feel0 very weak, 25 weak, 50 normal, 75 strong, 100 very strong
idintegerActivity id from get_activities; leave out to add an activity
namestringNew activity name
privacystring
remove_gearstringGear name or uuid from get_gear
rpenumberPerceived effort 0-10
startstringNew activity: local start, YYYY-MM-DDTHH:MM
typestringGarmin type key from garmin://activity-types, e.g. trail_running

download_activity_file Download activity file

Download one activity from Garmin Connect and save it as a file on this machine (fit, gpx, tcx, kml or csv), returning its path and size. Use it when the user wants the file itself, e.g. to import into another app; to read an activity's numbers, laps or streams in the answer use get_activity instead. Prefer fit, the original recording, unless the destination needs another format. The file is named <id>.<format> and replaces an earlier download of the same activity and format; every call fetches it from Garmin again.

ParameterTypeDescription
id *integerActivity id from get_activities
formatstringfit: original device file; gpx, tcx, kml: track; csv: laps
output_dirstringSubdirectory of the download directory (GARMIN_FIT_DOWNLOAD_DIR or <data dir>/downloads), e.g. "races"; default the download directory itself. Paths outside it are rejected

query_health Query daily health metrics

For "how did I sleep this week", "calories and intensity minutes this week", "steps yesterday" or any single health metric over days: a table per day or per ISO week plus summary with averages, totals, min/max and 7/28-day trend. steps also returns the daily distance in km, resting_hr the daily min/max HR, hrv the Garmin HRV status and baseline range, calories the kcal burned (total, active) and eaten (calories_consumed_kcal, absent without food log entries), hydration the ml drunk, goal and sweat loss (days without a water entry are left out). Ask for several metrics in one call (e.g. calorie…

ParameterTypeDescription
metrics *array
fromstringDefault: 7 days before `to`
granularitystring"week" for ranges longer than ~3 weeks, "hour" for up to 3 days
tostringDefault: today

get_sleep Get sleep

Sleep for one night with stages, score, SpO2, respiration, overnight HRV and a timeline (stage segments, awakenings, lowest HR, HRV and SpO2 with times), or for a range a per-night table with averages and trends. Use it for sleep stages and the detail of particular nights; for sleep hours next to other daily metrics, or months by week, use query_health. A night is named by the date of the morning it ended on: the night of 7 to 8 October is 2026-10-08. No arguments returns the last 7 nights; a range can span up to 3 years, one row per night. Nights not in the cache yet are downloaded from Garmi…

ParameterTypeDescription
datestringOne night, by the date of the morning; takes precedence over from/to
fromstringRange start; default 6 days before `to`
tostringRange end; default today

get_training_status Get training status

Fitness and fatigue: VO2max (running/cycling) with trend, training readiness, remaining recovery time, Garmin training status (productive, maintaining, ...), Garmin acute/chronic load and load focus (aerobic low/high, anaerobic vs. targets), and `garmin_load_model`: CTL/ATL/TSB from Garmin's daily training load (EPOC); the own TSS model (power, pace, HR) is get_load. `metrics` holds race predictions (5k to marathon), endurance and hill score, fitness age, personal records and heat/altitude acclimation as of the newest training sync on or before `to`. Set include_series for the daily load curve…

ParameterTypeDescription
fromstringDefault: 28 days before `to`
include_seriesbooleantrue: add the daily Garmin load and CTL/ATL/TSB from `from` to `to`
tostringDay the status is read on; default today

get_body_composition Get body composition

Weigh-ins (kg, body fat %, muscle mass, BMI) in a range, each with its time, plus change over the range and trend. Use it for weight and body composition questions; query_health and get_period_summary carry no weight. Days without a weigh-in are simply absent; an empty range returns no weigh-ins, not an error.

ParameterTypeDescription
fromstringFirst day, inclusive; default 89 days before `to`
tostringLast day, inclusive; default today

get_period_summary Summarise a week, month or range

Training week or month at a glance: sessions and volume per sport, time in the Garmin HR zones 1-5 (for the 3-zone Z1/Z2/Z3 split against LT1/LTHR, e.g. time below LT1 or polarisation, use get_load), active vs rest days, longest and hardest session, `garmin_load_model` at the end (CTL/ATL/TSB from Garmin's daily training load (EPOC); the own TSS model is get_load), and only avg/min/max of sleep, HRV, resting HR, steps, stress and body battery plus average daily kcal. Day-by-day values and other metrics (calorie totals, intensity minutes, floors, respiration, SpO2) come from query_health, weigh…

ParameterTypeDescription
anchor_datestringweek/month: any date inside the period; default today
fromstringrange only, required
periodstring
tostringrange only, required

list_workouts Workouts and calendar

List the saved workout library (`workouts`), the scheduled workouts (`upcoming_schedule`; Garmin Coach or other training plan ones have `source: "plan"`) and the races or events the user added or subscribed to (`upcoming_events`). Use it for "my next race", "what is planned this week", "what does my plan say for Saturday" or "which workouts do I have", and to find a workout id or schedule_id. For the steps of one workout use get_workout, to put a workout on the calendar or take it off schedule_workouts, for sessions already done get_activities. `sport` and `limit` narrow only the library; `fro…

ParameterTypeDescription
fromstringCalendar start; default today (or 60 days before `to` when `to` is in the past)
limitintegerMost saved workouts listed in `workouts`
sportstringOnly library workouts of this sport, e.g. running, cycling, strength_training
tostringCalendar end; default 60 days after `from`

get_workout Get a planned workout

Steps of one saved workout from the Garmin library in readable form: name, sport, description and one line per step (warm-up, repeats, duration or distance, target in pace/HR/power/cadence), plus estimated duration and distance. Use it to show what a planned session contains, or before changing it with create_workout; to find workouts or what is on the calendar use list_workouts. An id that no longer exists in Garmin Connect returns a NOT_FOUND error.

ParameterTypeDescription
id *integerWorkout id from list_workouts or workout_id from get_activity

create_workout Create a workout

Save a new structured workout to Garmin Connect (then use schedule_workouts to put it on the calendar so it syncs to the watch). Pass exactly one of: `preset` for a standard session from a few parameters (run_intervals, walk_run, easy_z2, strength_circuit); `definition` for anything else (typed steps with duration and target, nestable repeats); `garmin_json` only to copy an existing Garmin workout JSON. Errors name the bad field, e.g. steps[2].steps[0].target. Call with dry_run: true first, show the steps to the user and save only after they agree. dry_run saves nothing and does not contact Ga…

schedule_workouts Schedule workouts

Put saved workouts on the Garmin calendar (they then sync to the watch), or take them off it. `unschedule` takes schedule_id values (from list_workouts upcoming_schedule or an earlier schedule_workouts result); the workout stays in the library, only the calendar entry goes. Unschedule only what the user asked to remove. Unscheduling runs first, so moving a workout is one call. Returns a result per item. Examples: {"items":[{"date":"2026-10-10","workout_id":123}]}, {"unschedule":[456]}.

ParameterTypeDescription
itemsarray
unschedulearrayschedule_id values of calendar entries to remove

get_gear Get gear

List the shoes, bikes and other gear on the Garmin account, active first: uuid, name, type, status (active or retired), total distance and activity count, the distance limit set in Garmin, in use since, retired date and notes. Use it for "how many km on my shoes" or "which shoes to replace", not for watches and sensors (get_devices); name or uuid is what update_activity takes as add_gear/remove_gear. Returns every item, no paging; none recorded gives an empty list.

ParameterTypeDescription
include_activitiesbooleantrue: add the last 10 activities per item (date, name, distance) to see what the gear was used for

get_devices Get devices

Garmin devices on the account with model, firmware, last sync time and settings (units, tones, alerts, pulse ox during sleep, alarms). Use it for "is my watch up to date" or "when did it last sync"; shoes and bikes are get_gear. Read from the cache, refreshed from Garmin at most hourly; no devices gives an empty list.

get_load Get training load (own model)

Training load from the server's own transparent model: TSS per activity from power, else pace, else heart rate, else session RPE, with the thresholds in effect on each date. Use it for fitness, fatigue and form trends, ramp rate, weekly volume and intensity distribution (time below LT1, % in Z1, polarisation). Not Garmin's EPOC load: Garmin's status and CTL/ATL/TSB from Garmin's load are get_training_status, a go/no-go for today get_readiness. Returns CTL/ATL/TSB, ACWR, monotony and strain on `to` (`latest`), warning `flags`, ISO weeks per sport (sessions, hours, km, TSS, hrTSS, Garmin load, h…

ParameterTypeDescription
flagsobjectOwn flag thresholds, any of (default): acwr_high 1.5, acwr_warn 1.3, acwr_low 0.8, monotony_high 2, tsb_low -30, tsb_fresh 15, week_jump_pct 15, z1_min_pct 75, rpe_calibration 0.23, hr_method zones, i…
fromstringDefault: 27 days before `to`
include_activitiesbooleanAdd per activity TSS, IF, load_source, EF, cadence, running dynamics and, for sessions of 60+ min below LTHR with downloaded laps, aerobic decoupling (% EF drop from first to second half)
include_by_sportbooleanAdd CTL/ATL/TSB/ACWR per sport group (`by_sport`, plus run_ctl… columns in the series); the total stays the default
include_dynamicsbooleanAdd monthly cadence, GCT, VO, VR and stride of road runs, also at a reference pace (`_at_ref`)
include_efficiencybooleanAdd the monthly EF trend with decoupling as in include_activities
include_seriesbooleanAdd the daily TSS, CTL/ATL/TSB, ACWR, monotony and strain
sourcestringauto: power, pace, HR, then RPE per activity; hrtss: HR only; garmin_load: Garmin activity training load
tostringDefault: today

compare_activities Compare activities

Sessions side by side: pace, GAP, HR, power (best 5/20 min if curve stored), EF, decoupling, IF, TSS, % Z4-5, cadence and running dynamics, temperature, dew point. `ids` compares those activities; `similar_to` adds stored sessions like it (same type, duration and pace/GAP within tolerance; optionally same_route, easy_only), newest first with `match`. Pass exactly one of `ids` or `similar_to`, otherwise it returns an error; the similar_to filters combine. For one activity in depth use get_activity. E.g. today vs usual easy runs, progress on a route: {"similar_to":23011268235,"same_route":true}.

ParameterTypeDescription
duration_pctnumbersimilar_to: duration within ± this % of it
easy_onlybooleansimilar_to: only sessions under 5 % in Z4-5
fromstringsimilar_to: earliest date searched (default: 365 days before it)
idsarray2-10 activity ids to put side by side
limitintegersimilar_to: most similar sessions returned
pace_s_per_kmnumbersimilar_to: pace or GAP within ± this many s/km
same_routebooleansimilar_to: same start, end and distance
similar_tointegerActivity id to find stored sessions like

get_readiness Morning readiness

Morning GO/MODIFY/REST decision from HRV, resting HR, sleep hours and load against your own baselines. Returns each signal with its value, reference and rating (ok, yellow, red; unknown when data is missing), rules_used and a recommendation that starts with the signals that decided. Garmin's own scores (Training Readiness, Body Battery, stress; sleep score in the sleep value) are shown as info, not counted. REST needs a red pair, a single red or 2 yellow give MODIFY; `rules` changes the thresholds and the decision rule. Use for "how am I today" or "can I do a hard session".

ParameterTypeDescription
datestringMorning to judge; default today
rulesobjectOwn thresholds, any of (default): hrv_red_base_factor 0.9, hrv_red_mean28_factor 0.85, hrv_yellow_weekly_factor 0.9, rhr_red_delta 5, rhr_yellow_delta 3, sleep_h_red 6, sleep_h_yellow 7, acwr_red 1.5,…

get_thresholds Get training thresholds

Thresholds the analytics use on `date` (default today): per param its value, the date it applies since and its source (garmin-auto from the Garmin profile and its LTHR, threshold pace and FTP history; test, manual, import), by_sport (run, bike, swim: LTHR and LT1 with a note when a fallback, default or approximation), HRmax and the 28-day resting HR. zones has the HR and power zone floors per sport from the Garmin profile (method, HRmax/rest/LTHR or FTP used, fetched date; current, not historical). estimates.ftp_w: 95 % of best stored 20 min ride power, not saved. history adds every recorded r…

ParameterTypeDescription
datestringDay the thresholds are in effect on; default today
historybooleantrue: add all recorded rows (of `param`, if given) with date, value, source and note
paramstringOnly this threshold; default all

set_threshold Record a threshold

Record a field test result (LTHR, LT1, HRmax, FTP…) effective from a date; ask the user before saving. Stored in the local database only, never sent to Garmin; a row with the same date, param and source stays as it is (added false). A backdated row recomputes earlier activities from its date on. Returns the row and the value in effect today. Example: {"date":"2026-10-11","param":"lthr_run","value":171,"note":"30 min TT"}.

ParameterTypeDescription
date *stringDay of the test, not in the future
param *stringHeart rates in bpm, ftp_w/run_ftp_w in W, css_s_per_100m in s per 100 m, run_threshold_pace_s_per_km in s per km
value *numberIn the unit of `param`
notestringe.g. the test protocol
sourcestringtest: measured in a field or lab test; manual: a value the user sets without a test