Skip to main content
Glama

get_lactate_threshold

Retrieve your lactate threshold heart rate and pace. Get the latest value by omitting dates, or view historical trends with daily, weekly, or monthly aggregation.

Instructions

Get lactate threshold data: HR and pace. Omit dates for latest. Provide dates for historical trend with aggregation (daily/weekly/monthly)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startDateNoStart date in YYYY-MM-DD format. Omit for latest value only
endDateNoEnd date in YYYY-MM-DD format. Required if startDate is provided
aggregationNoAggregation type: daily, weekly, or monthly. Defaults to dailydaily

Implementation Reference

  • Tool 'get_lactate_threshold' is registered via server.registerTool with input schema from getLactateThresholdSchema. The handler calls client.getLactateThreshold() and returns JSON-formatted results.
    server.registerTool(
      'get_lactate_threshold',
      {
        description:
          'Get lactate threshold data: HR and pace. Omit dates for latest. Provide dates for historical trend with aggregation (daily/weekly/monthly)',
        inputSchema: getLactateThresholdSchema.shape,
      },
      async ({ startDate, endDate, aggregation }) => {
        const data = await client.getLactateThreshold(startDate, endDate, aggregation ?? 'daily');
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Handler function for get_lactate_threshold: calls client.getLactateThreshold(startDate, endDate, aggregation ?? 'daily') and returns content as JSON string.
    async ({ startDate, endDate, aggregation }) => {
      const data = await client.getLactateThreshold(startDate, endDate, aggregation ?? 'daily');
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • Type definition (GetLactateThresholdDto) and Zod schema (getLactateThresholdSchema) defining optional startDate, endDate, and aggregation (daily/weekly/monthly, default daily) inputs.
    export type GetLactateThresholdDto = {
      startDate?: string;
      endDate?: string;
      aggregation?: string;
    };
    
    export const getLactateThresholdSchema = z.object({
      startDate: dateString
        .optional()
        .describe('Start date in YYYY-MM-DD format. Omit for latest value only'),
      endDate: dateString
        .optional()
        .describe('End date in YYYY-MM-DD format. Required if startDate is provided'),
      aggregation: z
        .enum(['daily', 'weekly', 'monthly'])
        .default('daily')
        .optional()
        .describe('Aggregation type: daily, weekly, or monthly. Defaults to daily'),
    });
  • Client-side method getLactateThreshold: if no dates provided, fetches from LACTATE_THRESHOLD_ENDPOINT (latest); otherwise fetches from BIOMETRIC_STATS_ENDPOINT with startDate, endDate, and aggregation params.
    async getLactateThreshold(startDate?: string, endDate?: string, aggregation = 'daily'): Promise<unknown> {
      if (!startDate || !endDate) {
        return this.request(LACTATE_THRESHOLD_ENDPOINT);
      }
      return this.request(
        `${BIOMETRIC_STATS_ENDPOINT}?startDate=${startDate}&endDate=${endDate}&aggregation=${aggregation}`,
      );
    }
  • Endpoint constant LACTATE_THRESHOLD_ENDPOINT = '/biometric-service/biometric/latestLactateThreshold' and BIOMETRIC_STATS_ENDPOINT = '/biometric-service/stats' (line 108) used by the client method.
    export const LACTATE_THRESHOLD_ENDPOINT = '/biometric-service/biometric/latestLactateThreshold';
Behavior4/5

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

No annotations are provided, so the description carries full behavioral burden. It discloses the tool retrieves lactate threshold HR and pace, and explains the effect of omitting dates (latest) vs. providing dates (historical trend). While it doesn't discuss auth or rate limits, it is sufficiently transparent for a read-only retrieval tool.

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?

Two short sentences, front-loaded with purpose, zero filler. Every word serves to inform the AI about the tool's core function and usage patterns.

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?

Given 3 optional parameters, no output schema, and simple domain, the description covers all necessary aspects: what data is returned (HR, pace), how to use dates, and aggregation options. It is fully complete for its complexity level.

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 100%, so baseline is 3. However, the description adds significant semantic context: it explains conditional requirements (startDate required with endDate, omit for latest) and the purpose of aggregation enum. This goes beyond bare schema definitions.

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 description clearly states 'Get lactate threshold data: HR and pace', specifying the exact resource and data fields. This distinguishes it from sibling tools like get_cycling_ftp or get_vo2max, which cover different metrics.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Omit dates for latest. Provide dates for historical trend with aggregation (daily/weekly/monthly)'. This tells the AI exactly when to call this tool versus alternatives and how to obtain different data types.

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/Nicolasvegam/garmin-connect-mcp'

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