Skip to main content
Glama

get_activity_power_in_timezones

Retrieve power time in zones for a cycling or running activity using its Garmin activity ID. Analyze performance by time spent in each power zone.

Instructions

Get power time in zones for cycling/running power activities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityIdYesThe Garmin activity ID

Implementation Reference

  • Tool handler for 'get_activity_power_in_timezones'. Calls client.getActivityPowerInTimezones and returns JSON stringified data.
    server.registerTool(
      'get_activity_power_in_timezones',
      {
        description: 'Get power time in zones for cycling/running power activities',
        inputSchema: getActivitySchema.shape,
      },
      async ({ activityId }) => {
        const data = await client.getActivityPowerInTimezones(activityId);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Input schema for the tool: requires a positive integer activityId.
    export const getActivitySchema = z.object({
      activityId: z.number().positive().describe('The Garmin activity ID'),
    });
  • src/index.ts:39-39 (registration)
    Top-level registration of the activity tools (including get_activity_power_in_timezones) on the MCP server.
    registerActivityTools(server, client);
  • Client method that makes the API call to Garmin's powerTimeInZones endpoint.
    async getActivityPowerInTimezones(activityId: number): Promise<unknown> {
      return this.request(`${ACTIVITY_ENDPOINT}/${activityId}/${ACTIVITY_POWER_ZONES_SUBPATH}`);
    }
  • API subpath constant for the power time in zones endpoint.
    export const ACTIVITY_POWER_ZONES_SUBPATH = 'powerTimeInZones';
Behavior2/5

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

With no annotations, the description carries full burden but only states the action; it does not disclose any behavioral traits, such as whether the activity must have power data, what the output format is, or if it is read-only.

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 a single concise sentence that is front-loaded with the key action and resource. However, it could be slightly more informative without sacrificing brevity.

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 simplicity (single param, no output schema), the description covers the basic purpose but lacks details about return values, supported activity types, or time zone context, leaving some ambiguity.

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 input schema has 100% coverage for the single parameter (activityId), and the description adds no additional meaning beyond the schema's own description. Baseline 3 is appropriate.

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 retrieves power time in zones for cycling or running power activities, which is a specific verb-resource pair and distinguishes it from siblings like get_activity_hr_zones or get_activity_splits.

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, nor does it mention prerequisites or exclusions. Among many sibling tools, there is no differentiation.

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