Skip to main content
Glama

add_weigh_in

Record a weight measurement to your Garmin Connect profile. Specify weight, unit (kg or lbs), and date as needed.

Instructions

Record a weight measurement

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
weightYesWeight value
unitKeyNoWeight unit: kg or lbs. Defaults to kgkg
dateNoDate in YYYY-MM-DD format. Defaults to today

Implementation Reference

  • The core handler method on GarminClient that sends a POST request to the Garmin weight endpoint with weight data.
    async addWeighIn(weight: number, unitKey = 'kg', date?: string): Promise<unknown> {
      const resolvedDate = date ?? todayString();
      return this.request(ADD_WEIGH_IN_ENDPOINT, {
        method: 'POST',
        body: {
          dateTimestamp: `${resolvedDate}T00:00:00.0`,
          gmtTimestamp: `${resolvedDate}T00:00:00.0`,
          unitKey,
          value: weight,
        },
      });
    }
  • Registers the 'add_weigh_in' tool with the MCP server, with inputSchema from addWeighInSchema and a handler function that calls client.addWeighIn().
    server.registerTool(
      'add_weigh_in',
      {
        description: 'Record a weight measurement',
        inputSchema: addWeighInSchema.shape,
      },
      async ({ weight, unitKey, date }) => {
        const data = await client.addWeighIn(weight, unitKey ?? 'kg', date);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Zod schema defining the input validation for add_weigh_in: weight (positive number, max 700), unitKey (kg/lbs, defaults to kg), date (optional YYYY-MM-DD).
    export const addWeighInSchema = z.object({
      weight: z.number().positive().max(700).describe('Weight value'),
      unitKey: z
        .enum(['kg', 'lbs'])
        .default('kg')
        .optional()
        .describe('Weight unit: kg or lbs. Defaults to kg'),
      date: dateString.optional().describe('Date in YYYY-MM-DD format. Defaults to today'),
    });
  • TypeScript type definition for the add_weigh_in input data.
    export type AddWeighInDto = {
      weight: number;
      unitKey?: string;
      date?: string;
    };
  • Endpoint constant for the Garmin Connect weight service API.
    export const ADD_WEIGH_IN_ENDPOINT = '/weight-service/user-weight';
Behavior2/5

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

The description does not disclose behavioral traits beyond the basic action of recording. Since annotations are absent, the description should explain effects like overwriting existing entries or response behavior, but it does not.

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, sufficiently informative sentence that is front-loaded and concise. Every word contributes to understanding the tool's purpose without unnecessary elaboration.

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

Completeness2/5

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

With no output schema and no annotations, the description should clarify return behavior or error handling. It does not, leaving incomplete context for an add operation. The 100% schema coverage partially compensates but does not address output or side effects.

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 input schema has 100% description coverage for all three parameters (weight, unitKey, date), so the schema already explains their meanings. The description adds no further context, meeting the baseline for this dimension.

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 'Record a weight measurement' clearly states the verb (record) and resource (weight measurement), indicating the tool's purpose. However, it does not differentiate from sibling tools like 'get_weigh_ins' or 'get_latest_weight', which are retrieval-focused.

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 such as 'get_weigh_ins' for reading or 'get_daily_weigh_ins' for batch retrieval. There is no mention of prerequisites or scenarios where this tool is appropriate.

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