get_blood_pressure
Retrieve blood pressure readings from Garmin Connect for a specified date range to monitor systolic and diastolic trends.
Instructions
Get blood pressure readings over a date range
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| startDate | Yes | Start date in YYYY-MM-DD format | |
| endDate | Yes | End date in YYYY-MM-DD format |
Implementation Reference
- src/client/garmin.client.ts:379-381 (handler)The handler function that executes the getBloodPressure API call, sending a request to the blood pressure endpoint with start and end dates.
async getBloodPressure(startDate: string, endDate: string): Promise<unknown> { return this.request(`${BLOOD_PRESSURE_ENDPOINT}/${startDate}/${endDate}`); } - src/dtos/date-params.dto.ts:19-22 (schema)Input schema (dateRangeParamSchema) defining startDate and endDate as required date strings for the tool.
export const dateRangeParamSchema = z.object({ startDate: dateString.describe('Start date in YYYY-MM-DD format'), endDate: dateString.describe('End date in YYYY-MM-DD format'), }); - src/tools/body.tools.ts:62-74 (registration)Registration of the 'get_blood_pressure' tool using server.registerTool with description and input schema.
server.registerTool( 'get_blood_pressure', { description: 'Get blood pressure readings over a date range', inputSchema: dateRangeParamSchema.shape, }, async ({ startDate, endDate }) => { const data = await client.getBloodPressure(startDate, endDate); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - Constant defining the blood pressure API endpoint path '/bloodpressure-service/bloodpressure/range'.
export const BLOOD_PRESSURE_ENDPOINT = '/bloodpressure-service/bloodpressure/range';