get_daily_weigh_ins
Retrieve all weigh-in entries for a specific date to track daily weight changes.
Instructions
Get all weigh-in entries for a specific date
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date in YYYY-MM-DD format. Defaults to today if not provided |
Implementation Reference
- src/tools/body.tools.ts:34-46 (registration)Tool 'get_daily_weigh_ins' is registered via registerTool on the MCP server, with input schema from dateParamSchema, description 'Get all weigh-in entries for a specific date'. Calls client.getDailyWeighIns(date).
server.registerTool( 'get_daily_weigh_ins', { description: 'Get all weigh-in entries for a specific date', inputSchema: dateParamSchema.shape, }, async ({ date }) => { const data = await client.getDailyWeighIns(date); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/tools/body.tools.ts:40-45 (handler)Handler async function that destructures {date} from arguments, calls client.getDailyWeighIns(date), and returns the result as JSON text content.
async ({ date }) => { const data = await client.getDailyWeighIns(date); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, - src/client/garmin.client.ts:370-373 (helper)GarminClient.getDailyWeighIns method: resolves date (defaults to today), makes an HTTP GET request to WEIGHT_DAY_VIEW_ENDPOINT with the date and ?includeAll=true query parameter.
async getDailyWeighIns(date?: string): Promise<unknown> { const resolvedDate = date ?? todayString(); return this.request(`${WEIGHT_DAY_VIEW_ENDPOINT}/${resolvedDate}?includeAll=true`); } - src/dtos/date-params.dto.ts:8-12 (schema)dateParamSchema: Zod schema with an optional 'date' field (YYYY-MM-DD format, defaults to today). Used as inputSchema for get_daily_weigh_ins.
export const dateParamSchema = z.object({ date: dateString .optional() .describe('Date in YYYY-MM-DD format. Defaults to today if not provided'), }); - WEIGHT_DAY_VIEW_ENDPOINT constant: '/weight-service/weight/dayview' — the Garmin API endpoint used by getDailyWeighIns.
export const WEIGHT_DAY_VIEW_ENDPOINT = '/weight-service/weight/dayview';