Commit d38dd64
feat: support custom bpm heart-rate range in create_run_workout (#224)
Named Garmin zones (Z1-Z5) don't always match a real training target -
e.g. a 136-148 bpm Zone 2 goal straddles Garmin's Z2 (118-137) and Z3
(138-157). Previously create_run_workout only accepted hr_zone, so the
watch would show "in range" for the whole zone (up to 157 bpm) even
when the actual target ceiling was lower, silently misleading the
in-workout HR feedback.
Add optional hr_min/hr_max params that build a custom bpm-range target
(targetValueOne/targetValueTwo) instead of a zoneNumber, matching a
range Garmin Connect already supports natively but this tool didn't
expose. hr_zone remains the default and is ignored when a range is
given. Verified against the live Garmin Connect API: the custom range
round-trips correctly with no zoneNumber set.
Co-authored-by: Michael McComiskey <michael.mccomiskey@wunderkind.co>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent 0195fa0 commit d38dd64
3 files changed
Lines changed: 125 additions & 6 deletions
File tree
- src/garmin_mcp
- tests
- integration
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
48 | 73 | | |
49 | 74 | | |
50 | 75 | | |
51 | 76 | | |
52 | 77 | | |
53 | 78 | | |
| 79 | + | |
| 80 | + | |
54 | 81 | | |
55 | | - | |
56 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
57 | 89 | | |
58 | 90 | | |
59 | 91 | | |
60 | 92 | | |
61 | 93 | | |
62 | 94 | | |
63 | | - | |
| 95 | + | |
64 | 96 | | |
65 | 97 | | |
66 | 98 | | |
| |||
80 | 112 | | |
81 | 113 | | |
82 | 114 | | |
83 | | - | |
| 115 | + | |
84 | 116 | | |
85 | 117 | | |
86 | 118 | | |
87 | | - | |
| 119 | + | |
88 | 120 | | |
89 | 121 | | |
90 | 122 | | |
| |||
363 | 395 | | |
364 | 396 | | |
365 | 397 | | |
| 398 | + | |
| 399 | + | |
366 | 400 | | |
367 | 401 | | |
368 | 402 | | |
369 | 403 | | |
370 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
371 | 412 | | |
372 | 413 | | |
373 | 414 | | |
374 | 415 | | |
375 | 416 | | |
376 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
377 | 420 | | |
378 | 421 | | |
379 | 422 | | |
| |||
382 | 425 | | |
383 | 426 | | |
384 | 427 | | |
| 428 | + | |
| 429 | + | |
385 | 430 | | |
386 | 431 | | |
387 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
169 | 201 | | |
170 | 202 | | |
171 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
74 | 116 | | |
75 | 117 | | |
76 | 118 | | |
| |||
0 commit comments