Skip to main content
Glama
willc121

Garmin Health MCP Server

by willc121

get_heart_rate_zones

Calculate personalized heart rate training zones using maximum heart rate and lactate threshold data to optimize workout intensity.

Instructions

Get personalized heart rate training zones based on max HR and lactate threshold

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the get_heart_rate_zones tool. It fetches the latest heart rate zones from the Supabase database and formats them into readable ranges.
    async function getHeartRateZones() {
      const { data, error } = await supabase.from("heart_rate_zones").select("*").limit(1);
      if (error) throw error;
    
      const zones = data?.[0];
      if (!zones) return { error: "No heart rate zone data available" };
    
      return {
        max_hr: zones.max_hr,
        lactate_threshold_hr: zones.lactate_threshold_hr,
        zones: {
          zone1_warmup: `${zones.zone1_floor}-${zones.zone2_floor - 1} bpm`,
          zone2_easy: `${zones.zone2_floor}-${zones.zone3_floor - 1} bpm`,
          zone3_aerobic: `${zones.zone3_floor}-${zones.zone4_floor - 1} bpm`,
          zone4_threshold: `${zones.zone4_floor}-${zones.zone5_floor - 1} bpm`,
          zone5_maximum: `${zones.zone5_floor}-${zones.max_hr} bpm`,
        },
      };
    }
  • Input schema and metadata for the get_heart_rate_zones tool as defined in the ListTools response.
      name: "get_heart_rate_zones",
      description:
        "Get personalized heart rate training zones based on max HR and lactate threshold",
      inputSchema: { type: "object", properties: {} },
    },
  • src/index.ts:420-422 (registration)
    Registration and dispatching logic in the CallToolRequestSchema handler's switch statement.
    case "get_heart_rate_zones":
      result = await getHeartRateZones();
      break;
  • Helper usage of getHeartRateZones within the getHealthSummary function to include HR zones data.
    const [vo2, activities, sleep, races, zones] = await Promise.all([
      getVO2Max(),
      getActivities(),
      getSleep(),
      getRacePredictions(),
      getHeartRateZones(),
    ]);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks details on traits like whether it's read-only (implied by 'Get'), requires authentication, has rate limits, or returns data in a specific format. This is a significant gap for a tool with no structured safety hints.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core action ('Get personalized heart rate training zones') and adds necessary detail ('based on max HR and lactate threshold'). There is zero waste, making it appropriately sized for a simple tool.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally complete. It states the purpose clearly but lacks behavioral context and usage guidelines. For a fitness data tool, more details on output format or integration with siblings would enhance completeness, but it's adequate for basic understanding.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds value by specifying the basis for calculations ('max HR and lactate threshold'), which clarifies the tool's logic beyond the empty schema. This compensates well for the lack of parameters.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get personalized heart rate training zones' with specific criteria ('based on max HR and lactate threshold'). It distinguishes from siblings like get_activities or get_sleep by focusing on heart rate zones, but doesn't explicitly differentiate from similar tools like get_health_summary or get_training_load, which might overlap in fitness data.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description implies usage for heart rate zone calculation but doesn't specify contexts (e.g., training planning vs. health monitoring) or exclusions (e.g., if other tools like get_training_load might be better for broader metrics). This leaves the agent to infer usage without explicit direction.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/willc121/garmin-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server