get_activity_gear
Identify the gear used in a Garmin activity. Submit the activity ID to retrieve the equipment list.
Instructions
Get gear/equipment used during a specific activity
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activityId | Yes | The Garmin activity ID |
Implementation Reference
- src/tools/activities.tools.ts:168-180 (registration)Registration of the 'get_activity_gear' tool on the MCP server, including its description, input schema, and handler function that calls the client method.
server.registerTool( 'get_activity_gear', { description: 'Get gear/equipment used during a specific activity', inputSchema: getActivitySchema.shape, }, async ({ activityId }) => { const data = await client.getActivityGear(activityId); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/client/garmin.client.ts:524-526 (handler)The GarminClient method that executes the HTTP request to the Garmin API to fetch gear data for a given activity.
async getActivityGear(activityId: number): Promise<unknown> { return this.request(`${ACTIVITY_GEAR_ENDPOINT}?activityId=${activityId}`); } - src/dtos/activities.dto.ts:49-51 (schema)Zod schema defining the required input parameter 'activityId' (positive number) for the get_activity_gear tool.
export const getActivitySchema = z.object({ activityId: z.number().positive().describe('The Garmin activity ID'), }); - API endpoint constant used by the client to construct the request URL for activity gear data.
export const ACTIVITY_GEAR_ENDPOINT = '/gear-service/gear/filterGear';