get_available_badge_challenges
Retrieve badge challenges currently available to join on Garmin Connect. Find challenges to earn badges and stay motivated.
Instructions
Get available badge challenges that can be joined
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_available_badge_challenges"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/challenges.tools.ts:44-55 (registration)Registration of the 'get_available_badge_challenges' tool via server.registerTool() with description, and a handler that calls client.getAvailableBadgeChallenges().
server.registerTool( 'get_available_badge_challenges', { description: 'Get available badge challenges that can be joined', }, async () => { const data = await client.getAvailableBadgeChallenges(); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/client/garmin.client.ts:586-588 (handler)Handler implementation: getAvailableBadgeChallenges() method that makes an HTTP request to the AVAILABLE_BADGE_CHALLENGES_ENDPOINT.
async getAvailableBadgeChallenges(): Promise<unknown> { return this.request(AVAILABLE_BADGE_CHALLENGES_ENDPOINT); } - Endpoint constant: AVAILABLE_BADGE_CHALLENGES_ENDPOINT pointing to '/badgechallenge-service/badgeChallenge/available'.
export const AVAILABLE_BADGE_CHALLENGES_ENDPOINT = '/badgechallenge-service/badgeChallenge/available';