get_intensity_minutes
Get moderate and vigorous intensity minutes recorded on a specific date from your Garmin Connect account.
Instructions
Get moderate and vigorous intensity minutes for a 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/health.tools.ts:150-162 (handler)Handler for the 'get_intensity_minutes' tool. Calls client.getIntensityMinutes(date) and returns the result as text content.
server.registerTool( 'get_intensity_minutes', { description: 'Get moderate and vigorous intensity minutes for a date', inputSchema: dateParamSchema.shape, }, async ({ date }) => { const data = await client.getIntensityMinutes(date); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/client/garmin.client.ts:303-306 (helper)Client method getIntensityMinutes - makes API request to the daily intensity minutes endpoint with the given date.
async getIntensityMinutes(date?: string): Promise<unknown> { const resolvedDate = date ?? todayString(); return this.request(`${DAILY_INTENSITY_MINUTES_ENDPOINT}/${resolvedDate}`); } - API endpoint constant for daily intensity minutes: '/wellness-service/wellness/daily/im'
export const DAILY_INTENSITY_MINUTES_ENDPOINT = '/wellness-service/wellness/daily/im'; - src/dtos/date-params.dto.ts:8-12 (schema)Schema definition for the tool's input parameter 'date' (optional YYYY-MM-DD string).
export const dateParamSchema = z.object({ date: dateString .optional() .describe('Date in YYYY-MM-DD format. Defaults to today if not provided'), }); - src/tools/health.tools.ts:5-5 (registration)Registration context: the tool is registered via registerTool inside registerHealthTools() on the MCP server.
export function registerHealthTools(server: McpServer, client: GarminClient): void {