get_steps_chart
Retrieve a detailed intraday step chart for any date, showing step counts at regular intervals to analyze daily step patterns.
Instructions
Get detailed intraday step data throughout the day (step chart)
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:35-47 (registration)Registration of the 'get_steps_chart' tool with the MCP server. Defines description, input schema, and handler.
server.registerTool( 'get_steps_chart', { description: 'Get detailed intraday step data throughout the day (step chart)', inputSchema: dateParamSchema.shape, }, async ({ date }) => { const data = await client.getStepsChart(date); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/tools/health.tools.ts:41-46 (handler)The handler function that executes the tool logic: calls client.getStepsChart(date) and returns JSON-stringified data.
async ({ date }) => { const data = await client.getStepsChart(date); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, - src/client/garmin.client.ts:262-265 (helper)The client method 'getStepsChart' that sends the request to the Garmin API endpoint.
async getStepsChart(date?: string): Promise<unknown> { const resolvedDate = date ?? todayString(); return this.request(`${STEPS_CHART_ENDPOINT}/${this.displayName}?date=${resolvedDate}`); } - src/dtos/date-params.dto.ts:8-12 (schema)The input schema (dateParamSchema) used by the tool: 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'), }); - The API endpoint constant STEPS_CHART_ENDPOINT = '/wellness-service/wellness/dailySummaryChart'.
export const STEPS_CHART_ENDPOINT = '/wellness-service/wellness/dailySummaryChart';