Skip to main content
Glama

get-athlete-shoes

Retrieve your Strava running shoes data including usage distance and primary shoe status to track gear wear and optimize training equipment.

Instructions

Fetches the authenticated athlete's shoes from Strava, including usage distance and primary flag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implementation of the get-athlete-shoes tool handler.
    export const getAthleteShoesTool = {
        name: "get-athlete-shoes",
        description: "Fetches the authenticated athlete's shoes from Strava, including usage distance and primary flag.",
        inputSchema: undefined,
        execute: async () => {
            const token = process.env.STRAVA_ACCESS_TOKEN;
    
            if (!token || token === 'YOUR_STRAVA_ACCESS_TOKEN_HERE') {
                console.error("Missing or placeholder STRAVA_ACCESS_TOKEN in .env");
                return {
                    content: [{ type: "text" as const, text: "❌ Configuration Error: STRAVA_ACCESS_TOKEN is missing or not set in the .env file." }],
                    isError: true,
                };
            }
    
            try {
                console.error("Fetching athlete shoes...");
                const athlete = await getAuthenticatedAthlete(token);
                const shoes = athlete.shoes ?? [];
    
                if (shoes.length === 0) {
                    return {
                        content: [{ type: "text" as const, text: "No shoes found in your Strava profile." }],
                    };
                }
    
                const lines = shoes.map((shoe, index) => {
                    const distanceKm = typeof shoe.distance === "number" ? (shoe.distance / 1000).toFixed(2) : "N/A";
                    return `${index + 1}. ${shoe.name} (ID: ${shoe.id})\n   - Distance: ${distanceKm} km\n   - Primary: ${shoe.primary ? "Yes" : "No"}`;
                });
    
                return {
                    content: [{
                        type: "text" as const,
                        text: `👟 **Your Strava Shoes** (Total: ${shoes.length})\n\n${lines.join("\n\n")}`,
                    }],
                };
            } catch (error) {
                const errorMessage = error instanceof Error ? error.message : "An unknown error occurred";
                console.error("Error in get-athlete-shoes tool:", errorMessage);
                return {
                    content: [{ type: "text" as const, text: `❌ API Error: ${errorMessage}` }],
                    isError: true,
                };
            }
        }
    };
  • src/server.ts:173-179 (registration)
    Registration of the get-athlete-shoes tool in the main MCP server file.
    // --- Register get-athlete-shoes tool ---
    server.tool(
        getAthleteShoesTool.name,
        getAthleteShoesTool.description,
        {},
        getAthleteShoesTool.execute
    );

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry the burden of behavioral disclosure. It states the tool 'fetches' (implying read-only) and notes 'authenticated athlete', which hints at auth requirements. However, it does not disclose potential side effects, rate limits, or any required OAuth scopes, leaving some ambiguity for a simple read operation.

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, focused sentence with a clear verb-first structure and no unnecessary words. It front-loads the key information about the resource and included data.

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

Completeness4/5

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

For a zero-parameter read tool with no output schema, the description covers the essential context: it names the resource, the auth scope, and the key returned fields (usage distance, primary flag). It could list all return fields, but 'including' suggests additional data is present, which is acceptable for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema has no properties, so the baseline is 4. The description appropriately focuses on what the tool returns rather than parameter syntax, which is unnecessary here.

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 ('Fetches') and identifies the resource ('athlete's shoes'), clearly distinguishing it from sibling tools like get-athlete-stats or get-athlete-profile. It also scopes to the authenticated user and mentions key fields returned.

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 given on when to use this tool versus alternatives. It describes what the tool does but lacks any contextual 'when' or 'when not' scenarios, such as comparing with activity or profile tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.