Skip to main content
Glama

set_heart_rate_zones

Destructive

Set account-level Garmin Connect heart-rate training zones for one sport using max HR, heart-rate reserve, LTHR, or custom BPM while preserving omitted settings.

Instructions

Set an account-level heart-rate training-zone configuration for one sport.

    WARNING: This mutates the user's Garmin Connect account configuration.
    Garmin stores zones per sport, so DEFAULT (the generic fallback),
    RUNNING, CYCLING, and other sport profiles are independent. Only the
    requested sport is written; omitted values are read from that sport's
    current configuration and preserved.

    This change affects future activity recording and zone-based training.
    It does NOT retroactively re-slice already-recorded activities: their
    heart-rate zone boundaries were baked in when those activities were
    recorded.

    The calculation method may be max_hr (% maximum heart rate), hrr or
    karvonen (% heart-rate reserve), lthr (% lactate-threshold heart rate),
    or custom_bpm. Manual zone_boundaries are only accepted with the
    custom_bpm method. Garmin's API does not persist a separate CUSTOM enum:
    direct-BPM zones are sent and read back with trainingMethod=HR_MAX while
    the explicit zone floors remain authoritative.
    Changing the method or reference heart rates preserves the existing
    zone floors; this tool does not calculate new percentage-based floors.

    The tool performs a read-modify-write and then re-fetches the requested
    sport. Its result is the configuration Garmin actually saved, not the
    request payload. If verification fails after Garmin accepts the write,
    it reports success with write_committed=true, a confirmation_error, and
    the submitted_configuration. Re-read the profile before another update.

    Args:
        sport: Garmin sport key, e.g. default/generic, running, or cycling.
        max_hr: Maximum heart rate in BPM.
        resting_hr: Resting heart rate in BPM. Supplying it disables Garmin's
                    resting-HR auto-update for this zone profile.
        lactate_threshold_hr: Lactate-threshold heart rate (LTHR) in BPM.
        calculation_method: max_hr, hrr/karvonen, lthr, or custom_bpm.
        zone_boundaries: Five strictly increasing BPM floors [Z1, Z2, Z3,
                         Z4, Z5]. Every floor must be at most max_hr.
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sport": "<sport>"
    },
    "name": "set_heart_rate_zones"
  }
}

Input Schema

NameRequiredDescriptionDefault
sportYes
max_hrNo
resting_hrNo
zone_boundariesNo
calculation_methodNo
lactate_threshold_hrNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true, readOnlyHint=false, and idempotentHint=false, but the description goes well beyond them: read-modify-write semantics, per-sport isolation with omitted values preserved from that sport's current config, method-switch behavior that preserves existing zone floors, and a partial-success path reporting write_committed=true with confirmation_error and submitted_configuration. These are exactly the non-obvious failure and side-effect modes an agent needs before invoking a destructive write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The WARNING and the mutating-behavior facts are front-loaded, and the Args block gives the reader a predictable place to find parameter meaning. It is long and prose-heavy for a tool description, with some density that could be tightened or bulleted, but nearly every sentence carries operational information rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on the return-value burden and does so by stating that the result is what Garmin actually saved rather than the request payload, and by describing the verification-failure shape (write_committed, confirmation_error, submitted_configuration). Combined with the per-sport mutation semantics and the CUSTOM/HR_MAX persistence quirk, an agent has enough to call and interpret this destructive write correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full parameter burden and does so for all six args: sport as a Garmin key, max_hr/resting_hr/lactate_threshold_hr in BPM, calculation_method enumerated as max_hr/hrr/karvonen/lthr/custom_bpm, and zone_boundaries as five strictly increasing floors each capped at max_hr. It also adds non-schema constraints, notably that manual boundaries are only accepted with custom_bpm and that resting_hr disables Garmin's auto-update, which materially change how the tool should be called.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line states a specific verb and resource ('Set an account-level heart-rate training-zone configuration') plus the scoping unit ('for one sport'), which immediately separates it from the read-side get_heart_rate_zones sibling. The distinction between DEFAULT/RUNNING/CYCLING profiles is spelled out, so an agent knows exactly what object is being written.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for when this applies (future activity recording and zone-based training) and an explicit negative scope (does not retroactively re-slice recorded activities), which is valuable routing information. It stops short of naming get_heart_rate_zones as the prerequisite read step, only implying it via 'Re-read the profile before another update', so there is no explicit alternative/precondition statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools