remove_gear_from_activity
Unlink a gear item from a specific Garmin activity to correct gear associations and training logs.
Instructions
Unlink a gear item from an activity
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gearUuid | Yes | The UUID of the gear item | |
| activityId | Yes | The Garmin activity ID |
Implementation Reference
- src/client/garmin.client.ts:747-752 (handler)Client method that sends a PUT request to the gear unlink endpoint to remove a gear item from an activity.
async removeGearFromActivity(gearUuid: string, activityId: number): Promise<unknown> { return this.request( `${GEAR_UNLINK_ENDPOINT}/${gearUuid}/activity/${activityId}`, { method: 'PUT' }, ); } - src/dtos/write.dto.ts:90-93 (schema)Zod schema for the gear activity input (gearUuid and activityId), used by remove_gear_from_activity.
export const gearActivitySchema = z.object({ gearUuid: z.string().uuid().describe('The UUID of the gear item'), activityId: z.number().positive().describe('The Garmin activity ID'), }); - src/tools/write.tools.ts:119-131 (registration)Tool registration for 'remove_gear_from_activity' with description, input schema, and handler callback.
server.registerTool( 'remove_gear_from_activity', { description: 'Unlink a gear item from an activity', inputSchema: gearActivitySchema.shape, }, async ({ gearUuid, activityId }) => { const data = await client.removeGearFromActivity(gearUuid, activityId); return { content: [{ type: 'text' as const, text: JSON.stringify(data ?? 'Gear unlinked', null, 2) }], }; }, ); - Endpoint constant for the gear unlink API path used by removeGearFromActivity.
export const GEAR_UNLINK_ENDPOINT = '/gear-service/gear/unlink';