Skip to main content
Glama

get_profile

Retrieve user profile data from Fitbit, including health metrics and personal information, to access fitness tracking details.

Instructions

Get the raw JSON response for the user's Fitbit profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'get_profile' MCP tool. Fetches the user's Fitbit profile JSON by calling handleFitbitApiCall with endpoint 'profile.json'.
    handler: async () => {
      const endpoint = 'profile.json';
      
      return handleFitbitApiCall<FitbitProfile, Record<string, never>>(
        endpoint,
        {},
        getAccessTokenFn,
        {
          errorContext: 'profile data'
        }
      );
    }
  • src/profile.ts:26-47 (registration)
    registerProfileTool function defines and registers the 'get_profile' tool with the MCP server, specifying name, description, empty input schema, and handler.
    export function registerProfileTool(
      server: McpServer,
      getAccessTokenFn: () => Promise<string | null>
    ): void {
      registerTool(server, {
        name: 'get_profile',
        description: "Get the raw JSON response for the user's Fitbit profile.",
        parametersSchema: {},
        handler: async () => {
          const endpoint = 'profile.json';
          
          return handleFitbitApiCall<FitbitProfile, Record<string, never>>(
            endpoint,
            {},
            getAccessTokenFn,
            {
              errorContext: 'profile data'
            }
          );
        }
      });
    }
  • src/index.ts:79-79 (registration)
    Invocation of registerProfileTool in the main index.ts to register the 'get_profile' tool on the MCP server instance.
    registerProfileTool(server, getAccessToken);
  • TypeScript interface defining the structure of the Fitbit profile response used in the get_profile tool.
    interface FitbitProfile {
      user: {
        fullName: string;
        age: number;
        gender: string;
        height: number; // in centimeters
        weight: number; // in kilograms
        avatar: string; // URL to the user's avatar
        memberSince: string; // Date the user joined Fitbit
        // Add other fields as needed
      };
    }
  • Generic handleFitbitApiCall helper function used by the get_profile handler to perform the API request, handle errors, and format the MCP tool response.
    export async function handleFitbitApiCall<TResponse, TParams>(
      endpoint: string,
      params: TParams,
      getAccessTokenFn: () => Promise<string | null>,
      options: {
        apiBase?: string;
        successDataExtractor?: (data: TResponse) => unknown[] | null;
        noDataMessage?: string;
        errorContext?: string;
      } = {}
    ): Promise<ToolResponseStructure> {
      const {
        apiBase = FITBIT_API_VERSIONS.V1,
        successDataExtractor,
        noDataMessage,
        errorContext = JSON.stringify(params)
      } = options;
    
      const responseData = await makeFitbitRequest<TResponse>(
        endpoint,
        getAccessTokenFn,
        apiBase
      );
    
      if (!responseData) {
        return createErrorResponse(
          `${ERROR_MESSAGES.API_REQUEST_FAILED} for ${errorContext}. ${ERROR_MESSAGES.CHECK_TOKEN_PERMISSIONS}.`
        );
      }
    
      // Check for empty data if extractor provided
      if (successDataExtractor) {
        const extractedData = successDataExtractor(responseData);
        if (!extractedData || extractedData.length === 0) {
          return createNoDataResponse(noDataMessage || errorContext);
        }
      }
    
      return createSuccessResponse(responseData);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read operation, but lacks details on permissions, rate limits, or response format. This is a significant gap for a tool with no annotation coverage.

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 directly states the tool's function without unnecessary words. It's front-loaded and wastes no space, making it highly concise and well-structured.

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 simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks behavioral context and usage guidelines, which are needed for full completeness in a data retrieval scenario.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, but it could slightly enhance value by noting the lack of inputs. Baseline 4 is correct for zero parameters.

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 action ('Get') and resource ('raw JSON response for the user's Fitbit profile'), making the purpose understandable. However, it doesn't explicitly differentiate this tool from its siblings (e.g., 'get_activity_goals'), which all retrieve different types of Fitbit data, so it doesn't reach the highest clarity level.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention context like retrieving profile data specifically, nor does it reference sibling tools for other data types (e.g., activity or sleep), leaving the agent without usage direction.

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/TheDigitalNinja/mcp-fitbit'

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