garmin_sync_weight
Copies recent Xiaomi scale weigh-ins into Garmin Connect with real body composition values, skipping duplicates and implausible weights. Use dry run first to preview entries.
Instructions
Copy recent weigh-ins from the Xiaomi scale into Garmin Connect.
Use this instead of garmin_add_body_composition when the measurement came
from the Mi Fitness / Xiaomi body-fat scale — it reads the real values
(weight, body fat, water, muscle, bone, BMI) rather than asking the user to
type them.
Every weighing becomes its own entry, with the time it was taken: morning fasted and evening before bed are two measurements, ten weighings make ten entries. Only the scale's double upload — a weight-only row followed by the full row seconds later — is folded into one, keeping the richer row.
A weighing Garmin already holds (same moment within three minutes) is skipped, so re-running writes nothing. Matching is by moment rather than by day, which is what lets a second weighing on the same day through while still recognising the first.
Weights that look wrong are refused, because Garmin keeps every entry and
there is no undo: with ≥3 Garmin weigh-ins in the window, anything more
than ±40% off their median is skipped (a 斤 mis-read is exactly 2× kg);
without Garmin history, weights outside 30–250 kg are skipped. Skips are
listed with the reason — override one manually with
garmin_add_body_composition if it was genuine.
Deleting a weigh-in in the Mi Fitness app does NOT remove it from Garmin: this tool has no delete path. Remove stray entries in the Garmin Connect app itself.
THIS WRITES TO YOUR GARMIN ACCOUNT unless dry_run is true. There is no
undo through this tool. Call with dry_run=true first when the user has not
seen the numbers yet, then report what would be written.
Requires a one-time interactive login (garmin-mcp-lite-xiaomi-login),
because Xiaomi's login needs a captcha and an SMS code. When the token is
missing or expired the result carries an error explaining that, and no
write happens.
Args: days: How far back to look, in days. Defaults to 7, capped at 90. dry_run: Report what would be written without writing anything.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "garmin_sync_weight"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| dry_run | No |