get_gear_defaults
Get default gear assignments for each activity type to know which equipment is automatically associated with your workouts.
Instructions
Get default gear assignments per activity type
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/profile.tools.ts:200-211 (registration)Registration of the 'get_gear_defaults' tool on the MCP server. It has a description 'Get default gear assignments per activity type' and calls client.getGearDefaults().
server.registerTool( 'get_gear_defaults', { description: 'Get default gear assignments per activity type', }, async () => { const data = await client.getGearDefaults(); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/client/garmin.client.ts:602-604 (handler)Handler function getGearDefaults() that calls this.request() with the GEAR_DEFAULTS_ENDPOINT URL plus userProfilePk and '/activityTypes'.
async getGearDefaults(): Promise<unknown> { return this.request(`${GEAR_DEFAULTS_ENDPOINT}/${this.userProfilePk}/activityTypes`); } - Constant GEAR_DEFAULTS_ENDPOINT = '/gear-service/gear/user' used to construct the API request URL.
export const GEAR_DEFAULTS_ENDPOINT = '/gear-service/gear/user'; - src/client/garmin.client.ts:117-119 (helper)Helper getter userProfilePk that retrieves the user's profile primary key from auth, used in building the request URL.
private get userProfilePk(): number { return this.auth.userProfilePk; } - src/client/garmin-auth.ts:84-86 (helper)The userProfilePk getter on GarminAuth returns the profileId from the user profile.
get userProfilePk(): number { return this.profile?.profileId ?? 0; }