get-daily-movement
Retrieve daily movement and activity data from Garmin Connect for a specified date.
Instructions
Get daily movement/activity data
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD, defaults to today |
Implementation Reference
- src/tools.ts:402-416 (handler)The tool registration and handler for 'get-daily-movement'. Uses the Garmin client to fetch daily movement data from the wellness-service API endpoint with an optional date parameter.
server.tool( "get-daily-movement", "Get daily movement/activity data", { date: z.string().optional().describe("YYYY-MM-DD, defaults to today"), }, async ({ date }) => { const client = getClient(); const d = date ?? todayDate(); const data = await client.get("wellness-service/wellness/dailyMovement", { calendarDate: d, }); return jsonResult(data); } ); - src/tools.ts:405-407 (schema)Input schema: optional date string in YYYY-MM-DD format, defaults to today.
{ date: z.string().optional().describe("YYYY-MM-DD, defaults to today"), }, - src/tools.ts:402-416 (registration)Tool registered via server.tool() with name 'get-daily-movement', description, Zod schema, and async handler.
server.tool( "get-daily-movement", "Get daily movement/activity data", { date: z.string().optional().describe("YYYY-MM-DD, defaults to today"), }, async ({ date }) => { const client = getClient(); const d = date ?? todayDate(); const data = await client.get("wellness-service/wellness/dailyMovement", { calendarDate: d, }); return jsonResult(data); } ); - src/tools.ts:32-38 (helper)Helper function getClient() that checks for an existing session and returns a GarminClient instance.
function getClient() { if (!sessionExists()) { throw new Error( "No Garmin session found. The user needs to run: npx garmin-connect-mcp login" ); } return getSharedClient();