Skip to main content
Glama

get_gear_stats

Retrieve total distance and activity count for a specific gear item using its unique identifier.

Instructions

Get usage statistics for a specific gear item (total distance, activities)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gearUuidYesThe UUID of the gear item

Implementation Reference

  • Registration of the 'get_gear_stats' tool on the MCP server with its description, input schema, and handler logic.
    server.registerTool(
      'get_gear_stats',
      {
        description: 'Get usage statistics for a specific gear item (total distance, activities)',
        inputSchema: getGearStatsSchema.shape,
      },
      async ({ gearUuid }) => {
        const data = await client.getGearStats(gearUuid);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Client method that makes the actual API request to fetch gear stats for a given gear UUID, appending the UUID to the GEAR_STATS_ENDPOINT.
    async getGearStats(gearUuid: string): Promise<unknown> {
      return this.request(`${GEAR_STATS_ENDPOINT}/${gearUuid}`);
    }
  • Zod schema and TypeScript type defining the input validation for get_gear_stats: requires gearUuid as a UUID string.
    export type GetGearStatsDto = {
      gearUuid: string;
    };
    
    export const getGearStatsSchema = z.object({
      gearUuid: z.string().uuid().describe('The UUID of the gear item'),
    });
  • Constants file defining the Garmin API endpoint path used by the gear stats service.
    export const GEAR_STATS_ENDPOINT = '/gear-service/gear/stats';
Behavior2/5

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

With no annotations, the description carries full burden. It implies a read operation but does not disclose error behavior, response format, or whether the data is historical or current. Minimal transparency.

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?

Single sentence, no wasted words. Could be slightly more informative but is appropriately concise.

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 no output schema, the description only hints at return fields (total distance, activities). It lacks detail on units, whether it's aggregated, and pagination. Adequate for a simple 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 schema has 100% coverage (single param gearUuid with description). The description adds no additional meaning beyond 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 clearly states the tool retrieves usage statistics for a specific gear item, listing 'total distance, activities'. This distinguishes it from sibling tools like get_gear (gear details) and get_gear_activities (list of activities).

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, such as get_gear_activities or get_gear_defaults. There is no mention of prerequisites or contexts.

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