get_floors
Get floors climbed chart data for a specific date to track daily stair climbing activity.
Instructions
Get floors climbed chart data 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/health.tools.ts:164-176 (handler)The tool handler for 'get_floors'. It calls client.getFloors(date) and returns the floors chart data as JSON text.
server.registerTool( 'get_floors', { description: 'Get floors climbed chart data for a specific date', inputSchema: dateParamSchema.shape, }, async ({ date }) => { const data = await client.getFloors(date); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/dtos/date-params.dto.ts:8-12 (schema)Input schema for 'get_floors' - expects an optional date string in YYYY-MM-DD format.
export const dateParamSchema = z.object({ date: dateString .optional() .describe('Date in YYYY-MM-DD format. Defaults to today if not provided'), }); - src/client/garmin.client.ts:308-311 (helper)The GarminClient.getFloors() method that makes the actual API request using the FLOORS_CHART_ENDPOINT.
async getFloors(date?: string): Promise<unknown> { const resolvedDate = date ?? todayString(); return this.request(`${FLOORS_CHART_ENDPOINT}/${resolvedDate}`); } - The API endpoint constant used by getFloors() to fetch floors climbed chart data.
export const FLOORS_CHART_ENDPOINT = '/wellness-service/wellness/floorsChartData/daily'; - src/tools/health.tools.ts:5-5 (registration)The registerHealthTools function where 'get_floors' is registered on the McpServer.
export function registerHealthTools(server: McpServer, client: GarminClient): void {