Garmin Mcp

io.github.endurancetools由 GitHub 帳號 endurancetools 發布v0.5.0更新於 Oct 31, 2026

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

概覽

AI 產生的概覽

非官方 Garmin Connect 伺服器,讓助理讀取活動、睡眠、健康與訓練負荷資料,並為手錶建立訓練課程。

可以做什麼
  • 列出、檢視、比較與重新命名活動,並匯出為 FIT、GPX、TCX、KML 或 CSV 檔案
  • 查詢健康指標、睡眠、身體組成、訓練狀態、負荷與晨間準備度及趨勢
  • 檢視課程庫、已排定訓練與即將到來的比賽,並讀取課程步驟
  • 以預設或自訂定義建立結構化課程,並排入 Garmin 行事曆
  • 檢視裝備、裝置與閾值歷史,並在本機記錄測試結果
  • 依範圍與資料類型把資料同步到本機快取
適用情境
適合想讓助理分析自己 Garmin 資料的運動者:回顧訓練週、查看狀態與疲勞或準備度、追蹤睡眠與 HRV 趨勢,或把一句需求變成同步到手錶的結構化課程。
執行需求
透過 npx 以 stdio 在本機執行;需要 Node.js 22 或更新版本、Garmin Connect 帳號,以及用於一次性登入的 Chromium 系瀏覽器(也可改用終端機方式)。權杖與 SQLite 快取存放在 GARMIN_DATA_DIR(預設 ~/.garmin-mcp)。GARMIN_REGION 選擇 global 或 cn 主機;GARMIN_ENABLE_DESTRUCTIVE 啟用刪除工具。
安裝前請注意
非官方專案,與 Garmin 無關聯。登入權杖保存在磁碟上,需保護好 GARMIN_DATA_DIR。寫入類工具會改動 Garmin Connect 資料:update_activity 修改活動,create_workout 與 schedule_workouts 儲存並排定課程,刪除工具與覆寫課程僅在 GARMIN_ENABLE_DESTRUCTIVE=true 時出現。下載有節奏與每日上限,遇到 429 或 Cloudflare 驗證會暫停同步 6 小時。分析結果屬於訓練資訊,並非醫療建議。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Garmin Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Garmin MCP

[npm] [CI] [MCP registry]

Ask your AI assistant how your training is really going. Garmin MCP is an unofficial, open-source MCP server for your Garmin Connect data: training load, form and morning readiness computed on your machine with methods from published sports-science literature, with citations; 21 tools designed around the questions athletes ask, not a mirror of Garmin's API; a local SQLite cache that downloads only what a question needs; and structured workouts that go from the answer to your Garmin calendar and watch. It also reads activities, health, sleep, training status, body composition, gear, devices and the workout library.

Works with Claude Code, Claude Desktop, Codex, Antigravity CLI, opencode and any other MCP client (stdio or streamable HTTP).

Documentation: endurancetools.github.io/garmin-mcp (getting started per client, what to ask, configuration, troubleshooting). Contributing and development: DEVELOPMENT.md.

Unofficial. Garmin and Garmin Connect are trademarks of Garmin Ltd. or its subsidiaries; this project is not affiliated with or endorsed by Garmin. The training analytics (get_load, get_readiness) are training information, not medical advice.

Why Garmin MCP

  • Answers you can check. Training load (TSS from power, pace, heart rate or session RPE), fitness, fatigue and form (CTL/ATL/TSB), ACWR, intensity distribution and morning readiness from your own HRV, resting heart rate, sleep and load against your own baselines, with methods from published sports-science literature, with citations. Every answer returns the values and rules it used, and you can change them. Methods and evidence
  • Designed tools, not an API mirror. 21 tools built around questions like "review my week" or "can I train hard today?", so one call answers one question. The whole tool list costs the model about 8,600 tokens of context, and the first tool call was the right one in 48 of 48 tool-selection scenarios. Designed tools
  • Local and private. You sign in on Garmin's own page, so your password never passes through the tool. What it downloads stays in a local database on your computer, answers come back from it in milliseconds, downloads are paced to stay gentle with Garmin, and tool answers go only to the AI client you connect. What is stored where
  • From answer to watch. Ask for "6×400 m with 90 s rest on Thursday": you see the steps and estimated duration first, nothing is saved until you agree, and then it goes to your Garmin calendar and syncs to the watch. Workouts and calendar

Getting started

Requirements: Node.js 22 or newer, a Garmin Connect account, and Chrome, Edge, Brave or Chromium for the sign-in window (there is a terminal fallback).

1. Sign in once. This opens Garmin's own sign-in page in your browser. Your password never passes through the tool; only the tokens Garmin issues are stored, in ~/.garmin-mcp.

bash
npx -y garmin-mcp-cli login

2. Add the server to your client.

ClientConfiguration
Claude Codeclaude mcp add garmin -- npx -y garmin-mcp-server
Claude Desktopinstall garmin-mcp-<version>.mcpb from the GitHub release, or add to claude_desktop_config.json: {"mcpServers":{"garmin":{"command":"npx","args":["-y","garmin-mcp-server"]}}}
Codex~/.codex/config.toml: [mcp_servers.garmin] command = "npx" args = ["-y", "garmin-mcp-server"]
Antigravity CLIagy mcp add garmin npx -y garmin-mcp-server
opencodeopencode.json: {"mcp":{"garmin":{"type":"local","command":["npx","-y","garmin-mcp-server"],"enabled":true}}}
Any other clientcommand npx, arguments -y garmin-mcp-server, transport stdio

3. Ask. Nothing is downloaded until a question needs it. For example:

  • "How did I sleep this week?" or "How did my HRV trend over the summer?"
  • "Review my training week" or "Summarise my block from 2026-08-04 to 2026-09-28"
  • "Am I fatigued? What is my form right now?"
  • "When is my next race?" or "What is planned this week?"
  • "Build me 6×400 m with 90 s rest for Thursday" (you see the steps first, nothing is saved until you agree)
  • "Rename activity 21001 to Parkrun PB"

Optional: pre-load a range so the first questions answer instantly.

bash
npx -y garmin-mcp-cli sync --scope all --from 2026-07-01 --to 2026-09-30

How it fetches data

Logging in and starting the server download nothing. When a question needs days that are not in the local database, the tool downloads exactly that range, waits up to 20 s and answers; anything left keeps downloading in the background and the answer says so (meta.source is partial). Everything downloaded stays in the local database: stored days are never downloaded again unless you pass --force, so repeating a question costs nothing.

To stay gentle with Garmin, long ranges go in 7-day chunks, newest first, with a random 1-11 s pause after each chunk that actually downloaded something, at most 600 requests per day. A 429 or a Cloudflare challenge pauses all downloads for 6 h. An interrupted sync continues where it left off.

With GARMIN_AUTO_FETCH=false nothing is downloaded unless you run garmin sync or the garmin_sync tool; read tools then return the missing range in meta.sync_hint and the model asks you first.

Measured on a real account after a 90-day sync (433 requests in about an hour): answers come from the local database in 1-110 ms.

Tools

ToolPurpose
get_activitiesdense activity list with cursor paging (GAP, cadence, NP, Training Effect label, temperature when downloaded); type takes a Garmin type key (all keys in garmin://activity-types), plus name, min_duration_min/max_duration_min and a pace range
get_activityone activity: summary (with running dynamics, breathing, stamina, HR source), splits (laps with dynamics and workout steps), hr_zones, power_zones, weather, exercise_sets (strength sets), stream_summary (stream per km, 5 min, half or quarter), or full (all sections plus the raw stream, 50 KB pages, optional metrics and downsample_s)
update_activityname, type, description, RPE, feel
download_activity_fileFIT (unzipped), GPX, TCX, KML, CSV to the download directory (GARMIN_FIT_DOWNLOAD_DIR)
query_healthsteps (with daily distance), resting HR (with daily min/max HR), HRV (with status and baseline), sleep, stress, body battery, respiration, SpO2, intensity minutes, calories (burned, and eaten when a food log is linked), floors; per day or week, with 7/28-day trends
get_sleepone night with stages, or a range with averages
get_training_statusVO2max, readiness, recovery time, Garmin status, load and load focus, garmin_load_model (CTL/ATL/TSB from Garmin's training load, optionally the daily series); race predictions, endurance/hill score, fitness age, personal records, acclimation
get_body_compositionweigh-ins in kg with trend
get_period_summaryweek, month or any from..to range up to 366 days: volume per sport, HR zones, rest days, longest/hardest, garmin_load_model at the end, health and energy averages
list_workouts, get_workoutworkout library, scheduled workouts, races and events from the calendar in any date range (default: next 60 days), readable steps
create_workout, schedule_workoutsworkouts from presets (run intervals, walk/run, easy Z2, strength circuit) or a typed definition (nestable repeats, HR/pace/power targets); create_workout with dry_run: true shows the steps and estimated duration without saving; schedule_workouts puts workouts on the calendar and takes them off again
get_gear, get_devicesgear with distance, devices with last sync and settings
garmin_syncexplicit download of a scope (all/activities/health/training/reference) and date range, with progress notifications
get_loadown load model (TSS per activity from power, pace, heart rate or RPE, with the thresholds valid on each date): CTL/ATL/TSB, ACWR 7:28, monotony and strain, flags with overridable thresholds, ISO weeks per sport, 3-zone intensity split; optional daily series, per-activity TSS/IF/load source/EF and running dynamics, monthly EF trend, monthly running dynamics at a reference pace
compare_activitiessessions side by side (ids), or the ones similar to an activity (similar_to: same type, duration and pace, optionally same route or easy only): pace, GAP, HR, power, EF, decoupling, TSS, dynamics, weather
get_readinessmorning GO / MODIFY / REST from HRV, resting HR, sleep hours and load, with Garmin's Training Readiness, Body Battery, stress and sleep score shown, not counted; overridable rules, every signal with value, reference and rating
get_thresholds, set_thresholdthreshold history per date (LTHR per sport, LT1, HRmax, FTP, VO2max...; Garmin profile changes recorded automatically), heart rate and power zones per sport from the Garmin profile, and recording a test result, locally only

delete_activity, delete_workout, delete_weigh_in and overwriting a saved workout (create_workout with workout_id) are only available with GARMIN_ENABLE_DESTRUCTIVE=true.

Resources: garmin://profile, garmin://gear, garmin://devices, garmin://activity-types, garmin://sync-status, and the templates garmin://activity/{id} and garmin://workout/{id} with id completion. Prompts: weekly_review, plan_next_week.

Every response is { data, meta: { source: cache|live|partial|local, fetched_at, coverage?, sync_hint? } }, as JSON text and as structuredContent matching the tool's outputSchema; failures are { error: { code, message, hint } }.

Formulas, defaults and limits of the analytics tools: docs/analytics.md. Which Garmin Connect data is covered, and what is still missing: docs/coverage.md.

CLI

garmin-mcp-cli shares the core with the server and is handy for setup and checks:

garmin login [--strategy auto|browser|curl|fetch] [--email] [--token-path]garmin import-tokens <file>          # garmin_tokens.json from python-garminconnect 0.3.xgarmin status [--json]garmin sync [--scope ...] [--from --to] [--force] [--pause <s>]   # default: last 7 daysgarmin activities [--from --to --type --limit --json]garmin health <metric> [--from --to --week --json]garmin load [--from --to] [--source auto|hrtss|garmin_load] [--flags <file.json>] [--series] [--activities] [--efficiency] [--by-sport] [--json]garmin readiness [date] [--rules <file.json>] [--json]          # GO / MODIFY / REST for the morninggarmin thresholds [--date --param --history --json]             # LTHR, LT1, HRmax ... in effect, per sportgarmin thresholds add <date> <param> <value> [--source test|manual] [--note]garmin thresholds export [--out <file.csv>]                     # date,param,value,source,notegarmin thresholds import <file.csv>garmin import-activities <file.csv...>                          # Garmin Connect "Activities" CSV exportsgarmin doctor                        # TLS strategy, hosts, permissions, tokens, SQLite drivergarmin serve [--transport stdio|streamable-http] [--port]garmin logout

load, readiness and thresholds print the same results as the get_load, get_readiness and get_thresholds tools: markdown tables by default, the tool's { data, meta } envelope with --json. They read the local database only and never download; missing days come back as a note with the garmin sync command that fills them. import-activities adds activities from Garmin Connect CSV exports (English or Polish headers) for dates the synced activities do not cover, and thresholds export/import keep a copy of the threshold history in a CSV file.

Run it with npx -y garmin-mcp-cli <command> or install it globally (npm i -g garmin-mcp-cli).

Signing in

garmin login opens Garmin's real sign-in page in your installed Chrome, Edge, Brave or Chromium (a temporary profile, removed afterwards). You sign in there, including MFA or a CAPTCHA if Garmin asks; the tool only catches the one-time ticket Garmin redirects to afterwards and exchanges it for tokens. Cloudflare sees a real browser. Set GARMIN_BROWSER_PATH if your browser is not found.

Without a browser (headless server, Docker) or with --strategy curl|fetch, it asks for e-mail, password and MFA in the terminal and talks to Garmin's mobile login API, trying curl-impersonate (optional cuimp package, downloads its binary on first use) and then plain fetch. If that is blocked too, log in with Python and import the tokens; garmin doctor prints the exact command:

bash
uvx --with "garminconnect>=0.3" python <path>/python-login.py ~/.garmin-mcp/garmin_tokens.jsongarmin import-tokens ~/.garmin-mcp/garmin_tokens.json

Tokens and the database are 0600 inside a 0700 directory; the server refuses to start on looser permissions.

Remote and Docker

Streamable HTTP: GARMIN_MCP_TRANSPORT=streamable-http GARMIN_MCP_HTTP_TOKEN=<secret> npx -y garmin-mcp-server serves POST /mcp with Authorization: Bearer <secret>. Without a token it only binds to 127.0.0.1. Requests whose Host or Origin is not localhost, 127.0.0.1 or [::1] get 403 (DNS rebinding protection); behind a public hostname add it with GARMIN_HTTP_ALLOWED_HOSTS=mcp.example.com.

The server speaks MCP 2026-07-28 (server/discover, list results cached for an hour) and the 2025 revisions through the usual initialize handshake, on stdio and on HTTP, so clients on older MCP SDKs connect unchanged.

Docker: docker build -t garmin-mcp . && docker run -i -v garmin-data:/data garmin-mcp (log in with docker run -it -v garmin-data:/data garmin-mcp login).

Configuration

Precedence: CLI flag > environment > <data dir>/config.json > default. ~, $HOME and ${HOME} are always expanded.

VariableDefault
GARMIN_DATA_DIR~/.garmin-mcptokens, database, config.json
GARMIN_TOKENS_FILE$GARMIN_DATA_DIR/tokens.json
GARMIN_EMAIL, GARMIN_PASSWORDfirst login only
GARMIN_REGIONglobalcn switches all three hosts
GARMIN_SSO_STRATEGYautoauto (browser if installed, else terminal), browser, curl, fetch, import
GARMIN_BROWSER_PATHdetectedChrome/Edge/Brave/Chromium used for the sign-in window
GARMIN_ENABLED_TOOLS, GARMIN_DISABLED_TOOLScomma-separated allow/deny lists
GARMIN_ENABLE_DESTRUCTIVEfalsedelete tools and workout overwrite
GARMIN_AUTO_FETCHtrueread tools download missing data themselves; false: only explicit syncs
GARMIN_REDACTtrueget_activity full leaves out name, profile/photo URLs, device and sensor serials and GPS; false: raw as sent
GARMIN_FIT_DOWNLOAD_DIR$GARMIN_DATA_DIR/downloads
GARMIN_MCP_TRANSPORT, GARMIN_MCP_PORT, GARMIN_MCP_HOST, GARMIN_MCP_HTTP_TOKENstdio, 8000, 127.0.0.1,
GARMIN_HTTP_ALLOWED_HOSTScomma-separated hostnames (no port, IPv6 in brackets) accepted in Host/Origin on top of localhost, 127.0.0.1, [::1]; others get 403
GARMIN_LOG_LEVELinfopino JSON on stderr
GARMIN_TIMEZONEsystemIANA zone for "today"
GARMIN_CONCURRENCY4parallel connectapi requests
GARMIN_MIN_REQUEST_INTERVAL_MS250spacing between request starts (±25 % jitter)
GARMIN_SYNC_CHUNK_DAYS / GARMIN_SYNC_PAUSE_S / GARMIN_SYNC_MAX_REQUESTS_PER_DAY7 / 1-11 / 600pacing of syncs; the pause is seconds, a random range or a fixed number
GARMIN_DI_CLIENT_IDS, GARMIN_APP_VERSION, GARMIN_APP_USER_AGENTbuilt infor when Garmin changes the mobile app identity

More

來源:README.md,提交 c7bb1bc

工具

21

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 run in the background in 7-day chunks with pauses and a daily request cap to stay gentle with Garmin; this waits at most 20 s and reports progress (also in garmin://sync-status). Example: {"scope":"health","from":"2026-09-01","to":"2026-09-30"}.

輸入參數tofromforcescope

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). 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. Example: {"from":"2026-10-01","type":"running","limit":10}.

輸入參數tofromnamepacesorttypelimitcursormax_duration_minmin_duration_min

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; "hr_zones" adds time in HR zones; "power_zones" adds time in power zones (power meter); "weather" adds temperature, wind and conditions during the activity; "exercise_sets" adds strength sets (exercise, reps, weight, rest); "stream_summary" aggregates the stream per `bucket` (pace, GAP, HR, power, dynamics, breathing, Performance Condition, elevation, stamina; compares halves or kilometres without raw samples); "full" adds all sections plus the raw stream (HR, pace, power...) paginated with next_cursor, 50 KB per page, optionally only `metrics` and one sample per `downsample_s` - only when the user needs raw samples.

輸入參數id必填bucketcursordetailmetricsdownsample_s

update_activity

Edit an activity

Change an activity in Garmin Connect: name, type (Garmin type key such as "trail_running"; valid keys in resource garmin://activity-types), description (notes), rpe (0-10 perceived effort) or feel (0 very weak, 25 weak, 50 normal, 75 strong, 100 very strong). Only call when the user asked for the change. Returns the activity after the edit.

輸入參數id必填rpefeelnametypedescription

download_activity_file

Download activity file

Save an activity as a file on this machine and return its path: fit (original device file), gpx, tcx, kml or csv (laps). Use when the user wants the file itself, e.g. to import elsewhere.

輸入參數id必填formatoutput_dir

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. Metrics: steps, resting_hr, hrv, sleep, stress, body_battery, respiration, spo2, intensity_minutes, calories, floors. steps also returns the daily distance in km, resting_hr the daily min/max HR, hrv the Garmin HRV status and baseline range, floors the floors climbed, calories the kcal burned (total, active) and eaten (calories_consumed_kcal, absent without food log entries). Ask for several metrics in one call (e.g. calories and intensity_minutes together). Use get_sleep for sleep stages of particular nights. Example: {"metrics":["hrv","resting_hr","sleep"],"from":"2026-07-01","to":"2026-09-30","granularity":"week"}.

輸入參數tofrommetrics必填granularity

get_sleep

Get sleep

Sleep for one night ({"date":"2026-10-08"}, the morning date) with stages, score, SpO2, respiration and overnight HRV; or for a range ({"from","to"}) a per-night table with averages and trends.

輸入參數todatefrom

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.

輸入參數tofrominclude_series

get_body_composition

Get body composition

Weigh-ins (kg, body fat %, muscle mass, BMI) in a range with change and trend. Default range: last 90 days.

輸入參數tofrom

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, weight from get_body_composition. Weeks run Monday-Sunday. Period "range" gives the same for any from..to up to 366 days, e.g. a training block: {"period":"range","from":"2026-08-04","to":"2026-09-28"}. `complete` is true when the period is over and all its data is in the cache; `training` is left out while its activities are not. Example: {"period":"week","anchor_date":"2026-10-08"}.

輸入參數tofromperiodanchor_date

list_workouts

Workouts and calendar

For "my next race", "what is planned this week" or "which workouts do I have": the saved workout library (`workouts`), scheduled workouts (`upcoming_schedule`) and races or events the user added or subscribed to (`upcoming_events`: date, title, distance, start time, location; `race`/`primary` present only when true, `primary` marks the goal race of an active training plan). The calendar covers `from` to `to` (default: today and the next 60 days); any range works, past or future, and months not in the cache yet are downloaded on the way. Example: {"from":"2027-03-01","to":"2027-05-31"} for races next spring.

輸入參數tofromlimitsport

get_workout

Get a planned workout

Steps of a saved workout in readable form (warm-up, repeats, targets in pace/HR/power).

輸入參數id必填

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 Garmin: it returns the readable steps and the estimated duration (time steps, plus distance steps at the middle of their pace range; steps with neither are listed in estimate_note, and for garmin_json that carries its own estimate the note says it was taken from there).

輸入參數presetdry_rundefinitiongarmin_json

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]}.

輸入參數itemsunschedule

get_gear

Get gear

Shoes, bikes and other gear with total distance, usage since, notes and status. include_activities adds the last 10 activities per item.

輸入參數include_activities

get_devices

Get devices

Garmin devices on the account with model, firmware, last sync time and settings (time/date format, units, tones, move and heart-rate alerts, pulse ox during sleep, number of alarms). Comes from the reference sync.

無需輸入參數。

get_load

Get training load (own model)

Own transparent load model (TSS per activity from power, else pace, else heart rate, else session RPE, with date-dependent thresholds), not Garmin's EPOC load; for Garmin's status and CTL/ATL/TSB from Garmin's load (`garmin_load_model`) use get_training_status. Returns CTL/ATL/TSB, ACWR, monotony and strain on `to` (`latest`), warning `flags`, ISO weeks per sport (sessions, hours, km, TSS, hrTSS, Garmin load, hours in Z1-2/Z3/Z4-5), the 3-zone intensity split against LT1/LTHR of the last 28 days (Z1/Z2/Z3 minutes and %; answers time below LT1, % in Z1, polarisation) and the thresholds used. include_series adds the daily curve, include_activities TSS/IF/load_source/EF (runs with power also ef_power), cadence and running dynamics per activity, include_efficiency the monthly EF trend, both with aerobic decoupling (% EF drop from first to second half, `decoupling_basis` pa_hr or pw_hr; runs with power also decoupling_pw_pct) of sessions of 60+ min below LTHR with downloaded laps, include_dynamics monthly cadence, GCT, VO, VR, stride of road runs, also at a reference pace (`_at_ref`), include_by_sport CTL/ATL/TSB/ACWR per sport group (`by_sport`, plus run_ctl… columns in the series) next to the total, which stays the default. Example: {"from":"2026-09-01","to":"2026-09-30","include_activities":true}.

輸入參數tofromflagssourceinclude_seriesinclude_by_sportinclude_dynamicsinclude_activitiesinclude_efficiency

compare_activities

Compare activities

Sessions side by side: pace, GAP, HR, power, 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; same_route: start, end and distance; easy_only: <5 % Z4-5), newest first with `match`. E.g. today vs usual easy runs, progress on a route: {"similar_to":24897101232,"same_route":true}.

輸入參數idsfromlimiteasy_onlysame_routesimilar_toduration_pctpace_s_per_km

get_readiness

Morning readiness

Morning GO/MODIFY/REST decision from HRV, resting HR, sleep hours and load; pass `rules` to use your own thresholds. Each signal has its value, reference, rating (ok, yellow, red; unknown when data is missing) and a readable detail; plus rules_used and a recommendation. 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 (hrv with rhr or sleep, load with hrv, rhr or sleep), a single red or 2 yellow give MODIFY; decision_rule "count" instead gives REST at decision_red_min reds. Use for "how am I today" or "can I do a hard session". Example: {"date":"2026-10-12"}.

輸入參數daterules

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, 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). history adds every recorded row. Example: {"param":"lthr_run","history":true}.

輸入參數dateparamhistory

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 (the first garmin-auto row is the Garmin profile as of its first download). Returns the row and the value in effect today. Example: {"date":"2026-10-11","param":"lthr_run","value":171,"note":"30 min TT"}.

輸入參數date必填noteparam必填value必填source

版本歷史

8
  1. v0.5.0最新Oct 30, 2026
  2. v0.4.2Oct 29, 2026
  3. v0.4.1Oct 16, 2026
  4. v0.4.0Oct 15, 2026
  5. v0.3.1Oct 14, 2026
  6. v0.3.0Oct 13, 2026
  7. v0.2.0Oct 12, 2026
  8. v0.1.1Oct 12, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分