get_earned_badges
Retrieve your complete collection of earned badges and achievements from Garmin Connect to track your progress and milestones.
Instructions
Get all earned badges and achievements
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/profile.tools.ts:151-156 (handler)The anonymous handler function registered for the 'get_earned_badges' tool. Calls client.getEarnedBadges() and returns the result as JSON text.
async () => { const data = await client.getEarnedBadges(); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, - src/tools/profile.tools.ts:146-157 (registration)Registration of the 'get_earned_badges' tool on the MCP server via registerTool(), with description and handler.
server.registerTool( 'get_earned_badges', { description: 'Get all earned badges and achievements', }, async () => { const data = await client.getEarnedBadges(); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/client/garmin.client.ts:512-514 (helper)Client method that makes the API request to the Garmin Connect backend for earned badges.
async getEarnedBadges(): Promise<unknown> { return this.request(EARNED_BADGES_ENDPOINT); } - Endpoint constant pointing to '/badge-service/badge/earned' for fetching earned badges from Garmin.
export const EARNED_BADGES_ENDPOINT = '/badge-service/badge/earned';