Skip to main content
Glama

get_activity_typed_splits

Retrieve typed split data from a Garmin activity, distinguishing active intervals from rest periods using the activity ID.

Instructions

Get typed split data for an activity (e.g. active vs rest intervals)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityIdYesThe Garmin activity ID

Implementation Reference

  • Registration of the 'get_activity_typed_splits' tool via server.registerTool, with description and inputSchema, and handler that calls client.getActivityTypedSplits.
    server.registerTool(
      'get_activity_typed_splits',
      {
        description: 'Get typed split data for an activity (e.g. active vs rest intervals)',
        inputSchema: getActivitySchema.shape,
      },
      async ({ activityId }) => {
        const data = await client.getActivityTypedSplits(activityId);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Handler function that executes the tool logic: calls client.getActivityTypedSplits and returns JSON-stringified data.
    async ({ activityId }) => {
      const data = await client.getActivityTypedSplits(activityId);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • Zod schema for input validation: expects a positive number 'activityId'.
    export const getActivitySchema = z.object({
      activityId: z.number().positive().describe('The Garmin activity ID'),
    });
  • Client method that performs the HTTP request to the Garmin API endpoint for typed splits.
    async getActivityTypedSplits(activityId: number): Promise<unknown> {
      return this.request(`${ACTIVITY_ENDPOINT}/${activityId}/${ACTIVITY_TYPED_SPLITS_SUBPATH}`);
    }
  • Definition of the typed splits subpath constant 'typedsplits', combined with ACTIVITY_ENDPOINT '/activity-service/activity' to form the full URL.
    export const ACTIVITY_TYPED_SPLITS_SUBPATH = 'typedsplits';
Behavior2/5

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

With no annotations, the description bears full burden. It states the basic purpose and an example but fails to disclose the response format, data structure, or any limitations (e.g., which activity types support typed splits). This leaves significant behavioral gaps.

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 concise sentence that front-loads the purpose and includes an informative example. No extraneous text.

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 low complexity (one parameter) and good schema coverage, the description is adequate. However, the lack of output schema means it should hint at return format (e.g., list of split objects). The description is incomplete in this regard.

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 one parameter with full description in the schema (100% coverage). The tool description adds no extra meaning beyond what is already in the schema, so 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 uses a specific verb ('Get') and resource ('typed split data for an activity') and provides an example ('active vs rest intervals'), clearly distinguishing it from sibling tools like get_activity_splits or get_activity_split_summaries.

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 typed splits but does not explicitly state when to use this tool vs. alternatives like get_activity_splits. No when-not or alternative guidance 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