Skip to main content
Glama

get-athlete-profile

Retrieve authenticated athlete profile data, including unique ID required for accessing Strava statistics and workout analysis tools.

Instructions

Fetches the profile information for the authenticated athlete, including their unique numeric ID needed for other tools like get-athlete-stats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute function inside the getAthleteProfile tool definition handles the tool logic, including Strava API client calls and error handling.
    execute: async () => { // No input parameters needed
      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 profile...");
        const athlete = await getAuthenticatedAthlete(token);
        console.error(`Successfully fetched profile for ${athlete.firstname} ${athlete.lastname} (ID: ${athlete.id}).`);
    
        const profileParts = [
          `👤 **Profile for ${athlete.firstname} ${athlete.lastname}** (ID: ${athlete.id})`,
          `   - Username: ${athlete.username || 'N/A'}`,
          `   - Location: ${[athlete.city, athlete.state, athlete.country].filter(Boolean).join(", ") || 'N/A'}`,
          `   - Sex: ${athlete.sex || 'N/A'}`,
          `   - Weight: ${athlete.weight ? `${athlete.weight} kg` : 'N/A'}`,
          `   - Measurement Units: ${athlete.measurement_preference}`,
          `   - Strava Summit Member: ${athlete.summit ? 'Yes' : 'No'}`,
          `   - Profile Image (Medium): ${athlete.profile_medium}`,
          `   - Joined Strava: ${athlete.created_at ? new Date(athlete.created_at).toLocaleDateString() : 'N/A'}`,
          `   - Last Updated: ${athlete.updated_at ? new Date(athlete.updated_at).toLocaleDateString() : 'N/A'}`,
        ];
    
        // Ensure return object matches expected structure
        const response = {
           content: [{ type: "text" as const, text: profileParts.join("\n") }]
          };
        return response;
    
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : "An unknown error occurred";
        console.error("Error in get-athlete-profile tool:", errorMessage);
        return {
          content: [{ type: "text" as const, text: `❌ API Error: ${errorMessage}` }],
          isError: true,
        };
      }
    }
  • The tool object itself, including its name ("get-athlete-profile") and description.
    export const getAthleteProfile = {
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that it fetches profile information and the ID, which is useful context, but lacks details on behavioral traits such as authentication requirements, rate limits, error handling, or response format. It adequately describes the core function but misses deeper behavioral insights.

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, efficient sentence that front-loads the main purpose and includes essential context about the ID's utility. Every word earns its place with no waste, making it highly concise and well-structured for quick understanding.

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 tool's complexity (simple fetch with no parameters) and lack of annotations and output schema, the description is minimally complete. It covers the purpose and a key output detail (the ID), but for a tool with no structured output documentation, it should ideally explain return values or error cases more fully to be fully helpful.

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 0 parameters with 100% schema description coverage, so the schema already fully documents the inputs. The description adds value by explaining the purpose (fetching profile info and ID) beyond the empty schema, but since there are no parameters to elaborate on, it naturally compensates well, earning a high baseline score.

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 specific action ('fetches') and resource ('profile information for the authenticated athlete'), distinguishing it from siblings like get-athlete-stats or get-athlete-zones by focusing on profile data. It explicitly mentions the inclusion of the unique numeric ID, which is a key differentiator.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context by specifying it fetches data 'for the authenticated athlete' and notes the ID is 'needed for other tools like get-athlete-stats,' implying usage as a prerequisite for those tools. However, it does not explicitly state when not to use it or name direct alternatives, keeping it from a perfect score.

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/LimeON-source/Strava-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server