Skip to main content
Glama

get_training_readiness_range

Retrieve daily training readiness scores for any date range to assess recovery and performance readiness.

Instructions

Get Training Readiness data over a date range (day-by-day). Returns array of {date, data} records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startDateYesStart date in YYYY-MM-DD format
endDateYesEnd date in YYYY-MM-DD format

Implementation Reference

  • Client method that fetches Training Readiness data over a date range, calling getTrainingReadiness for each day via fetchRange.
    async getTrainingReadinessRange(startDate: string, endDate: string): Promise<{ date: string; data: unknown }[]> {
      return this.fetchRange(startDate, endDate, (d) => this.getTrainingReadiness(d));
    }
  • Client method that calls the Garmin API endpoint to get training readiness for a single date.
    async getTrainingReadiness(date?: string): Promise<unknown> {
      const resolvedDate = date ?? todayString();
      return this.request(`${TRAINING_READINESS_ENDPOINT}/${resolvedDate}`);
    }
  • The dateRangeParamSchema used as inputSchema for get_training_readiness_range.
    export const dateRangeParamSchema = z.object({
      startDate: dateString.describe('Start date in YYYY-MM-DD format'),
      endDate: dateString.describe('End date in YYYY-MM-DD format'),
    });
  • Registration of the get_training_readiness_range tool with its description, schema, and handler.
    server.registerTool(
      'get_training_readiness_range',
      {
        description:
          'Get Training Readiness data over a date range (day-by-day). Returns array of {date, data} records',
        inputSchema: dateRangeParamSchema.shape,
      },
      async ({ startDate, endDate }) => {
        const data = await client.getTrainingReadinessRange(startDate, endDate);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Generic fetchRange helper that iterates over dates and calls a per-date fetcher function.
    private async fetchRange(
      startDate: string,
      endDate: string,
      fetcher: (date: string) => Promise<unknown>,
    ): Promise<{ date: string; data: unknown }[]> {
      const dates = this.dateRange(startDate, endDate);
      const results: { date: string; data: unknown }[] = [];
      for (const date of dates) {
        const data = await fetcher(date).catch(() => null);
        results.push({ date, data });
      }
      return results;
    }
Behavior2/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It states the return type but lacks details on data structure within 'data', limitations (e.g., max range or date gaps), authentication requirements, or error scenarios. This is insufficient for an agent to handle edge cases.

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 sentence that efficiently captures purpose, scope, and return format. No redundant information is present, and the key details are front-loaded.

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

Completeness4/5

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

Given the simple input schema (no nested objects, two required parameters) and no output schema, the description provides a reasonable overview. It specifies the return structure, but could be improved by noting any date range constraints or data availability. Overall, it is sufficient for its complexity.

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?

Schema coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the parameter names and pattern constraints. It does clarify the scope is a date range, but that is already explicit from the parameter names 'startDate' and 'endDate'.

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 the verb 'Get', the resource 'Training Readiness data', and the scope 'over a date range (day-by-day)'. It also specifies the return format as an array of {date, data} records, distinguishing it from a single-day retrieval tool like 'get_training_readiness'.

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

Usage Guidelines3/5

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

The description implies usage for date range queries but does not explicitly specify when to use this tool versus the sibling 'get_training_readiness'. No guidance on excluded cases or contextual conditions is provided.

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