Skip to main content
Glama

get_endurance_score

Retrieve endurance score for a specific date or date range, with optional daily, weekly, or monthly aggregation.

Instructions

Get Endurance Score. Single date: omit endDate. Date range: provide both with optional aggregation (daily/weekly/monthly)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startDateYesStart date in YYYY-MM-DD format. If endDate is omitted, treated as single day
endDateNoEnd date in YYYY-MM-DD format. Omit for single-day view
aggregationNoAggregation for range mode: daily, weekly, or monthly. Only used when endDate is provided

Implementation Reference

  • The GarminClient.getEnduranceScore method makes the actual API request to the Garmin endpoint. If no endDate is provided, it fetches a single-day score; otherwise it fetches a range with aggregation.
    async getEnduranceScore(startDate: string, endDate?: string, aggregation = 'weekly'): Promise<unknown> {
      if (!endDate) {
        return this.request(`${ENDURANCE_SCORE_ENDPOINT}?calendarDate=${startDate}`);
      }
      return this.request(
        `${ENDURANCE_SCORE_ENDPOINT}/stats?startDate=${startDate}&endDate=${endDate}&aggregation=${aggregation}`,
      );
    }
  • The MCP tool handler registered as 'get_endurance_score'. It receives startDate, endDate, and aggregation params, calls client.getEnduranceScore, and returns the JSON result.
    server.registerTool(
      'get_endurance_score',
      {
        description:
          'Get Endurance Score. Single date: omit endDate. Date range: provide both with optional aggregation (daily/weekly/monthly)',
        inputSchema: getScoreSchema.shape,
      },
      async ({ startDate, endDate, aggregation }) => {
        const data = await client.getEnduranceScore(startDate, endDate, aggregation);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • The Zod schema (getScoreSchema) defining input validation for get_endurance_score: startDate (required), endDate (optional), and aggregation (optional enum: daily/weekly/monthly).
    export const getScoreSchema = z.object({
      startDate: dateString
        .describe('Start date in YYYY-MM-DD format. If endDate is omitted, treated as single day'),
      endDate: dateString
        .optional()
        .describe('End date in YYYY-MM-DD format. Omit for single-day view'),
      aggregation: z
        .enum(['daily', 'weekly', 'monthly'])
        .optional()
        .describe('Aggregation for range mode: daily, weekly, or monthly. Only used when endDate is provided'),
    });
  • Registration of the 'get_endurance_score' tool via server.registerTool with description and inputSchema.
    server.registerTool(
      'get_endurance_score',
      {
        description:
          'Get Endurance Score. Single date: omit endDate. Date range: provide both with optional aggregation (daily/weekly/monthly)',
        inputSchema: getScoreSchema.shape,
      },
  • Constant ENDURANCE_SCORE_ENDPOINT defining the API path '/metrics-service/metrics/endurancescore' used by the client method.
    export const ENDURANCE_SCORE_ENDPOINT = '/metrics-service/metrics/endurancescore';
Behavior3/5

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

No annotations provided, so description carries full burden. It explains the parameter-driven behavior (single vs. range) but doesn't disclose other traits like auth, rate limits, or output format.

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 sentences, front-loaded with the primary purpose. Every sentence is informative with no waste.

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?

Sufficient for basic usage with 3 params and no output schema, but lacks explanation of what endurance score is or what the return value looks like. Could be more complete.

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?

Schema coverage is 100% (each param has description). The description adds value by clarifying the relationship between startDate and endDate and the condition for using aggregation, which goes beyond the schema.

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 starts with a clear verb+resource 'Get Endurance Score'. It distinguishes this tool from siblings by specifying it retrieves endurance score data.

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?

Provides explicit guidance on single vs. range mode: 'Single date: omit endDate. Date range: provide both with optional aggregation'. No when-not or alternative tools mentioned, but clear context.

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