Skip to main content
Glama

get_weekly_stress

Aggregate weekly stress data for trend analysis over up to 52 weeks. Specify end date and optionally the number of weeks (1-52, default 52).

Instructions

Get weekly aggregated stress data for trend analysis. Defaults to 52 weeks (1 year). Max 52 weeks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endDateYesEnd date in YYYY-MM-DD format
weeksNoNumber of weeks to look back (1-52). Defaults to 52 (full year)

Implementation Reference

  • GarminClient.getWeeklyStress - Makes the actual API request to the Garmin weekly stress endpoint
    async getWeeklyStress(endDate: string, weeks = 52): Promise<unknown> {
      return this.request(`${WEEKLY_STRESS_ENDPOINT}/${endDate}/${weeks}`);
    }
  • weeklyParamSchema - Zod schema defining input validation for the tool (endDate string, optional weeks 1-52)
    export const weeklyParamSchema = z.object({
      endDate: dateString.describe('End date in YYYY-MM-DD format'),
      weeks: z
        .number()
        .min(1)
        .max(52)
        .default(52)
        .optional()
        .describe('Number of weeks to look back (1-52). Defaults to 52 (full year)'),
    });
  • Tool registration with server.registerTool, binds input schema and handler logic
    server.registerTool(
      'get_weekly_stress',
      {
        description:
          'Get weekly aggregated stress data for trend analysis. Defaults to 52 weeks (1 year). Max 52 weeks',
        inputSchema: weeklyParamSchema.shape,
      },
      async ({ endDate, weeks }) => {
        const data = await client.getWeeklyStress(endDate, weeks ?? 52);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • WEEKLY_STRESS_ENDPOINT constant - The API endpoint path for weekly stress data
    export const WEEKLY_STRESS_ENDPOINT = '/usersummary-service/stats/stress/weekly';
  • Inline handler lambda - calls client.getWeeklyStress and formats response as JSON text
    async ({ endDate, weeks }) => {
      const data = await client.getWeeklyStress(endDate, weeks ?? 52);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions aggregation and time range limits but doesn't clarify if it's read-only or any other side effects, though 'get' implies read.

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, no unnecessary words. Highly concise and structured.

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?

The description is adequate for a simple list tool but lacks output format details (e.g., what 'aggregated stress data' contains). With no output schema, more context would help.

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 description adds little beyond schema defaults (e.g., 'Defaults to 52 weeks'). It reinforces but does not expand on parameter meaning.

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 tool gets 'weekly aggregated stress data' for 'trend analysis', specifying a verb and resource, and differentiates from daily stress tools like get_stress.

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 use for trend analysis but does not explicitly guide when to use this tool over siblings like get_stress or get_stress_range, missing alternatives or exclusion criteria.

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