Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GARMIN_EMAILNoGarmin Connect email address for authentication.
GARMIN_TOKENSNoPath to directory for cached Garmin session token. Defaults to ~/.garminconnect.~/.garminconnect
GARMIN_PASSWORDNoGarmin Connect password for authentication.
GARMIN_MULTI_TENANT_ROOTNoDirectory containing per-user token stores for multi-tenant mode.

Instructions

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

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_recent_activitiesA

List the most recent Garmin activities, newest first.

Returns a JSON array of activity summaries with: id (use with get_activity_details), date (YYYY-MM-DDTHH:MM local time), type (e.g. "running", "cycling"), name, distance_km, duration_min, avg_hr, and pace_min_per_km. limit caps how many activities come back (default 10).

get_activity_detailsA

Get full detail for a single activity by its id.

activity_id is the numeric id string returned by list_recent_activities or list_activities_by_date (the "id" field). Returns a JSON object combining the activity summary (name, type, distance, duration, HR, training effect) with a nested "details" object (measurement counts). A "timing" object gives the explicit elapsed / timer / moving / stopped breakdown so the caller never has to guess which duration is the finish time. For a per-lap breakdown (interval or km splits), call get_activity_laps. Bulky per-sample metric arrays and GPS polylines are stripped to keep the response small — use Garmin Connect directly for raw sample data.

get_activity_lapsA

Get the individual laps of an activity (intervals or auto-km splits).

activity_id is the numeric id from list_recent_activities. Returns a JSON object with "lap_count" and a "laps" array, one entry per real Garmin lap: lap number, distance_m, the three durations (elapsed_time_s, timer_time_s, moving_time_s), pace_min_per_km, avg/max HR, avg/max power, avg_run_cadence, "intensity" (e.g. WARMUP/ACTIVE/REST — the interval structure), and elevation gain/loss. Use this instead of get_activity_details when you need per-lap threshold or split analysis. GPS start/end coordinates are omitted by default; pass include_gps=true to include them.

list_activities_by_dateA

List activities between two dates (inclusive).

start_date and end_date must be "YYYY-MM-DD". Returns a JSON array of activity summaries in the same shape as list_recent_activities.

get_daily_statsB

Get daily summary stats for one day: steps, calories, resting HR, stress, etc.

date must be "YYYY-MM-DD". Returns a JSON object with fields such as totalSteps, totalKilocalories, restingHeartRate, averageStressLevel, bodyBatteryHighestValue/LowestValue, and floorsAscended.

get_sleepA

Get sleep summary for the night ending on the given date.

date must be "YYYY-MM-DD" (the calendar date the sleep session ends on). Returns a JSON object with the daily sleep summary (dailySleepDTO: sleep stages in seconds, sleep scores, average HR/SpO2/respiration/stress) plus overnight HRV and resting HR. Per-minute sleep-stage and movement arrays are stripped to keep the response small.

get_heart_rateA

Get heart rate summary for one day.

date must be "YYYY-MM-DD". Returns a JSON object with minHeartRate, maxHeartRate, restingHeartRate, and lastSevenDaysAvgRestingHeartRate. The per-minute heartRateValues time series is stripped to keep the response small.

get_body_batteryA

Get Body Battery (energy reserve) summary per day over a date range.

start_date and end_date must be "YYYY-MM-DD". Returns a JSON array with one object per day: date, charged (points gained), drained (points lost), highest, and lowest Body Battery level. Per-minute level arrays are stripped; highest/lowest are derived from them before stripping.

get_training_statusB

Get training status for a given day: fitness trend, load, VO2 max, acclimation.

date must be "YYYY-MM-DD". Returns a JSON object with mostRecentTrainingStatus (training status, acute/chronic training load), mostRecentVO2Max, and heatAltitudeAcclimationDTO.

get_performance_metricsA

Get current running fitness/threshold snapshot: lactate threshold, VO2 max, race predictions.

Answers "where is my fitness right now?" in one call. date is optional ("YYYY-MM-DD", defaults to today) and only affects which day's VO2 max is read; lactate threshold and race predictions always return Garmin's latest available values. Returns a JSON object with three independent sections:

  • "lactate_threshold": threshold heart rate (LTHR, bpm) and threshold pace ("M:SS/km" plus decimal min/km and raw m/s) — the numbers used to set training zones. (Garmin's "heart rate threshold" and "lactate threshold" are the same value.)

  • "vo2max": VO2 max (decimal precise value + rounded) and fitness age.

  • "race_predictions": predicted 5k / 10k / half-marathon / marathon finish times as clock strings.

Each section is fetched independently: if one Garmin endpoint is unavailable it becomes {"error": ...} while the others still return. Every section carries its own "measured_date" so stale values are visible.

get_personal_recordsA

Get the user's Garmin personal records (running PBs and bests).

Returns a JSON array, one object per record: record (human label for the common running types — fastest 1km/1mile/5km/10km, longest run — or null for other/unmapped types), type_id (Garmin's raw record type), value (raw: seconds for time records, metres for distance), value_formatted (clock string or "X.XX km" for mapped running types, else null), activity_id, and date. The raw type_id and value are always kept so an unmapped or non-running record is still usable, just unlabeled.

get_threshold_historyA

Get lactate-threshold heart rate + pace over time (the threshold trend).

start_date and end_date are "YYYY-MM-DD" (start no more than a year before end). aggregation is one of "daily", "weekly" (default), "monthly", "yearly". Returns a JSON object with "points": a dated series, each entry giving lthr_bpm (threshold heart rate) and threshold pace (pace_per_km "M:SS", decimal pace_min_per_km, raw speed_m_s). Use this to see whether threshold HR/pace is trending up over a training block — for the single latest value use get_performance_metrics instead. If Garmin's range payload can't be parsed into a series it is returned verbatim under "raw".

get_running_thresholdA

Get the running threshold anchor: lactate threshold pace, LTHR, and HR zones.

This is the number a threshold or interval session should be prescribed from — never an activity's average pace. Returns a JSON object with:

  • "lactate_threshold": threshold heart rate (LTHR, bpm) and threshold pace ("M:SS/km" plus decimal min/km and raw m/s), with the date Garmin last measured it. Check that date: a threshold from months ago is stale.

  • "heart_rate_zones": the five zones with explicit floor_bpm and ceiling_bpm, plus max and resting HR and the method Garmin used.

Each section is fetched independently, so one dead endpoint leaves the other intact. For VO2 max and race predictions use get_performance_metrics.

get_activity_intervalsA

Get the work reps of an interval session, with warm-up and cool-down excluded.

activity_id is the numeric id from list_recent_activities. Use this instead of get_activity_laps when you need what the reps were actually run at: it answers "how fast were the intervals", not "how fast was the run".

Returns a JSON object with "classified_by" — typed_splits (Garmin's recorded workout structure, preferred) or garmin_intensity (the lap intensity field, used only when an activity has no typed structure) — so the caller can see how certain the classification is. "reps" holds one entry per work rep and per rest between them — read is_work_rep rather than assuming every entry is a rep — each with distance_m, duration_s, pace_per_km, avg/max HR. "work_summary" aggregates the work reps only (count, total distance, average/fastest/slowest pace, pace spread, HR). "excluded" lists what was dropped and why.

An unstructured run returns zero work reps rather than one rep covering the whole activity: the activity's own average pace is never a rep pace.

get_activity_hr_zonesA

Get the time spent in each heart-rate zone (1-5) for one activity.

activity_id is the numeric id from list_recent_activities or list_activities_by_date. Returns a JSON object with "zones": one entry per zone with secs and minutes spent in it, plus the zone's floor_bpm and ceiling_bpm as configured when the activity was recorded (zone 5 has no ceiling). "total_secs" / "total_minutes" sum the zones.

"has_hr_data" is false when the activity was recorded without heart rate (Garmin returns no zones, or every zone at zero): treat the minutes as unknown then, never as zero. This is the per-activity breakdown behind get_activity_details' hasHrTimeInZones flag; for the zone limits themselves, without an activity, use get_running_threshold.

find_comparable_intervalsA

Find recent work reps of a given distance, across your last running activities.

Answers "what have I been running 1000m reps at lately?" in one call, replacing list-activities → laps-per-activity → filter-by-hand. Every rep returned has been through the same classification as get_activity_intervals, so warm-ups, rests and cool-downs never appear.

target_distance_m is the rep distance to match (e.g. 1000). Reps within tolerance_pct of it are returned (default 10%, so 900-1100 m). activity_limit (default 10) caps how many running activities are opened — each one costs a Garmin call — and they are taken from the most recent activities of any type, so a long stretch without running returns fewer.

Returns a JSON object with "matches" (each rep plus its activity_id, date and name, newest first), "match_count", and "activities_scanned".

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 16 tools

Disambiguation4/5

Most tools target clearly distinct resources (sleep, heart rate, body battery, daily stats, personal records), and the descriptions explicitly tell the caller when to prefer one over another (e.g. get_activity_laps vs get_activity_intervals vs get_activity_details). The main remaining overlap is lactate-threshold/VO2 data appearing in get_performance_metrics, get_running_threshold, and get_threshold_history, which an agent could still pick wrong despite the cross-references.

Naming Consistency4/5

Nearly everything follows a predictable get_/list_ + noun snake_case pattern (get_sleep, list_recent_activities, get_activity_hr_zones), with the activity sub-resources consistently namespaced. The single deviation is find_comparable_intervals, which uses a different verb than the rest of the set.

Tool Count4/5

At 16 tools the surface sits at the upper end of comfortable but each tool maps to a distinct Garmin data domain or analysis question, so none look like filler. It is slightly heavy, with three tools touching threshold/performance data, but that reflects the domain rather than padding.

Completeness4/5

The read-only analytics lifecycle is well covered: activities, laps, intervals, HR zones, daily stats, sleep, HR, body battery, training status, performance, and personal records, with sensible aggregation and history for thresholds. Gaps are minor for an analysis-focused server (no weight/body-composition, no scheduled workouts/calendar, and no write operations), which agents can work around by using Garmin Connect directly.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues