Skip to main content
Glama
willc121

Garmin Health MCP Server

by willc121

get_vo2max

Retrieve VO2 max history and trends to measure cardiovascular fitness levels over time. Analyze fitness data by date range and sport type for performance tracking.

Instructions

Get VO2 max history and trends. VO2 max measures cardiovascular fitness in ml/kg/min.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateNoStart date (YYYY-MM-DD)
end_dateNoEnd date (YYYY-MM-DD, exclusive recommended)
sportNoFilter by sport (e.g., 'running', 'cycling')

Implementation Reference

  • The handler function for the 'get_vo2max' tool. It queries the 'vo2_max' table in Supabase for VO2 max values filtered by optional start_date, end_date, and sport parameters. Computes and returns a summary (count, first, latest, min, max, average) along with the raw data.
    async function getVO2Max(startDate?: string, endDate?: string, sport?: string) {
      let query = supabase
        .from("vo2_max")
        .select("calendar_date, vo2_max_value, sport")
        .order("calendar_date", { ascending: true });
    
      if (startDate) query = query.gte("calendar_date", startDate);
      // End date is exclusive
      if (endDate) query = query.lt("calendar_date", endDate);
      if (sport) query = query.eq("sport", sport);
    
      const { data, error } = await query;
      if (error) throw error;
    
      const values = (data || []).map((v) => v.vo2_max_value);
      const summary = {
        count: data?.length || 0,
        first: data?.[0] ?? null,
        latest: data?.[data.length - 1] ?? null,
        min: values.length ? Math.min(...values) : null,
        max: values.length ? Math.max(...values) : null,
        average: values.length
          ? Math.round(
              (values.reduce((a, b) => a + b, 0) / values.length) * 10
            ) / 10
          : null,
      };
    
      return { summary, data };
    }
  • The input schema definition for the 'get_vo2max' tool, specifying optional parameters: start_date, end_date, and sport as strings.
    inputSchema: {
      type: "object",
      properties: {
        start_date: { type: "string", description: "Start date (YYYY-MM-DD)" },
        end_date: { type: "string", description: "End date (YYYY-MM-DD, exclusive recommended)" },
        sport: { type: "string", description: "Filter by sport (e.g., 'running', 'cycling')" },
      },
    },
  • src/index.ts:327-339 (registration)
    Registration of the 'get_vo2max' tool in the ListTools response, including name, description, and input schema.
    {
      name: "get_vo2max",
      description:
        "Get VO2 max history and trends. VO2 max measures cardiovascular fitness in ml/kg/min.",
      inputSchema: {
        type: "object",
        properties: {
          start_date: { type: "string", description: "Start date (YYYY-MM-DD)" },
          end_date: { type: "string", description: "End date (YYYY-MM-DD, exclusive recommended)" },
          sport: { type: "string", description: "Filter by sport (e.g., 'running', 'cycling')" },
        },
      },
    },
  • src/index.ts:408-410 (registration)
    Dispatch/execution registration in the CallToolRequest handler switch statement, mapping the tool name to the getVO2Max handler function.
    case "get_vo2max":
      result = await getVO2Max(a.start_date, a.end_date, a.sport);
      break;
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 this is a 'get' operation, implying read-only behavior, but doesn't address critical aspects like authentication needs, rate limits, data freshness, or error conditions. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves in practice.

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 description is appropriately sized with two sentences that efficiently convey the tool's purpose and define VO2 max. It's front-loaded with the core functionality, though the second sentence could be integrated more seamlessly. There's minimal waste, earning a high score for conciseness.

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 moderate complexity (3 parameters, no output schema, no annotations), the description is minimally adequate. It explains what VO2 max is but doesn't cover return values, error handling, or data format. Without annotations or output schema, more context on behavioral traits would improve completeness, but it meets basic requirements for a read operation.

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

Parameters3/5

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

The description adds no parameter-specific information beyond what's already in the input schema, which has 100% coverage with clear descriptions for start_date, end_date, and sport. Since schema_description_coverage is high (>80%), the baseline score is 3, as the description doesn't compensate with additional semantic context like date range defaults or sport filtering nuances.

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 VO2 max history and trends' with the specific resource (VO2 max) and verb (get). It distinguishes VO2 max as a measure of cardiovascular fitness in ml/kg/min, which helps differentiate it from siblings like get_heart_rate_zones or get_health_summary. However, it doesn't explicitly contrast with siblings beyond defining VO2 max.

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?

The description provides no guidance on when to use this tool versus alternatives like get_health_summary or get_activities, which might also contain fitness data. It lacks context about prerequisites, such as whether VO2 max data is available only for certain users or time periods, and offers no explicit when-not-to-use advice.

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