Skip to main content
Glama

get_body_composition

Retrieve body composition metrics including weight, BMI, body fat percentage, muscle mass, bone mass, and body water for a specified date range.

Instructions

Get body composition data over a date range: weight, BMI, body fat %, muscle mass, bone mass, body water %

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startDateYesStart date in YYYY-MM-DD format
endDateYesEnd date in YYYY-MM-DD format

Implementation Reference

  • Registration of 'get_body_composition' tool via server.registerTool() with dateRangeParamSchema input, calling client.getBodyComposition()
    export function registerBodyTools(server: McpServer, client: GarminClient): void {
      server.registerTool(
        'get_body_composition',
        {
          description:
            'Get body composition data over a date range: weight, BMI, body fat %, muscle mass, bone mass, body water %',
          inputSchema: dateRangeParamSchema.shape,
        },
        async ({ startDate, endDate }) => {
          const data = await client.getBodyComposition(startDate, endDate);
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
          };
        },
      );
  • Handler for 'get_body_composition' - calls client.getBodyComposition(startDate, endDate) and returns JSON-stringified body composition data
    async ({ startDate, endDate }) => {
      const data = await client.getBodyComposition(startDate, endDate);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • Client method getBodyComposition() - makes HTTP request to BODY_COMPOSITION_ENDPOINT with startDate and endDate query params
    async getBodyComposition(startDate: string, endDate: string): Promise<unknown> {
      return this.request(`${BODY_COMPOSITION_ENDPOINT}?startDate=${startDate}&endDate=${endDate}`);
    }
  • dateRangeParamSchema - Zod schema defining startDate and endDate string inputs in YYYY-MM-DD format
    export type DateRangeParamDto = {
      startDate: string;
      endDate: string;
    };
    
    export const dateRangeParamSchema = z.object({
      startDate: dateString.describe('Start date in YYYY-MM-DD format'),
      endDate: dateString.describe('End date in YYYY-MM-DD format'),
    });
  • BODY_COMPOSITION_ENDPOINT constant = '/weight-service/weight/dateRange' - the API endpoint for body composition data
    export const BODY_COMPOSITION_ENDPOINT = '/weight-service/weight/dateRange';
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It only states basic read functionality over a date range. It omits details like timezone handling, data granularity, behavior when data is missing, or whether it returns daily aggregates or raw measurements.

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?

One sentence of 14 words, front-loaded with key info. Every word is informative. No redundancy or fluff.

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 2 parameters with full schema coverage and no output schema, the description covers basic purpose. However, it lacks usage guidelines and behavioral traits, making it adequate but not fully complete for agent decision-making among many sibling tools.

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?

Schema coverage is 100% with clear descriptions for startDate and endDate. The tool description adds no extra meaning beyond 'over a date range'. Baseline 3 is appropriate as schema already documents parameters.

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 specifies the verb 'Get', the resource 'body composition', and lists specific metrics (weight, BMI, body fat %, muscle mass, bone mass, body water %) over a date range. It distinguishes from sibling tools like get_daily_weigh_ins or get_latest_weight that focus on single weight measurements.

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 vs alternatives. With many related sibling tools (e.g., get_daily_weigh_ins, get_latest_weight, get_body_battery), explicit instructions or recommendations are missing.

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