Skip to main content
Glama

get_activity_details

Retrieve detailed time series data for a Garmin activity, including heart rate, pace, elevation, cadence, and power metrics. Provide the activity ID to get comprehensive performance analysis.

Instructions

Get detailed activity metrics: HR, pace, elevation, cadence, power time series data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityIdYesThe Garmin activity ID

Implementation Reference

  • Tool registration and handler for 'get_activity_details' — calls client.getActivityDetails and returns JSON response
    server.registerTool(
      'get_activity_details',
      {
        description:
          'Get detailed activity metrics: HR, pace, elevation, cadence, power time series data',
        inputSchema: getActivitySchema.shape,
      },
      async ({ activityId }) => {
        const data = await client.getActivityDetails(activityId);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Input schema for get_activity_details tool — expects a positive numeric activityId
    export const getActivitySchema = z.object({
      activityId: z.number().positive().describe('The Garmin activity ID'),
    });
  • Client method that makes the API request to Garmin's activity details endpoint
    async getActivityDetails(activityId: number): Promise<unknown> {
      return this.request(
        `${ACTIVITY_ENDPOINT}/${activityId}/${ACTIVITY_DETAILS_SUBPATH}?maxChartSize=${ACTIVITY_DETAILS_MAX_CHART_SIZE}&maxPolylineSize=${ACTIVITY_DETAILS_MAX_POLYLINE_SIZE}`,
      );
    }
  • Constants defining the API endpoint base path and details subpath used for the details request
    export const ACTIVITY_ENDPOINT = '/activity-service/activity';
    export const ACTIVITY_TYPES_ENDPOINT = '/activity-service/activity/activityTypes';
    export const ACTIVITY_DETAILS_SUBPATH = 'details';
  • Constants for query parameters limiting chart data size and polyline size in details response
    export const ACTIVITY_DETAILS_MAX_CHART_SIZE = 2000;
    export const ACTIVITY_DETAILS_MAX_POLYLINE_SIZE = 4000;
Behavior2/5

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

No annotations are present, and the description does not disclose any behavioral traits beyond data retrieval. There is no mention of read-only nature, potential large data size, or required permissions. The tool is a getter, but transparency is minimal.

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 directly conveys the tool's output. It is concise and front-loaded with key information.

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

Completeness2/5

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

Given the large number of sibling tools and no output schema, the description lacks context on how this tool differs from others (e.g., get_activity_splits) and does not describe the return format (e.g., arrays of timestamps). This leaves gaps for an agent to correctly select and invoke the tool.

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 with a description for activityId. The tool description adds no additional parameter meaning beyond listing the data types. Baseline score of 3 is appropriate as the schema already documents the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves detailed activity metrics (HR, pace, elevation, cadence, power time series). However, it does not explicitly differentiate itself from sibling tools like get_activity or get_activity_hr_zones, which may also return metrics.

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?

No guidance is provided on when to use this tool versus alternatives (e.g., get_activity for summary, get_activity_hr_zones for specific data). The description implies it is for detailed time series, but does not explicitly state usage 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