Skip to main content
Glama

check_garmin_auth

Verify Garmin Connect authentication status to ensure workout creation and device synchronization functions properly.

Instructions

Check if Garmin authentication is valid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'check_garmin_auth' tool. It checks Garmin authentication validity using garminAuth.getValidAuth(), formats the expiration date, and returns a text response indicating if authentication is valid or not, with error handling.
    case "check_garmin_auth": { try { const authData = await garminAuth.getValidAuth(); if (authData) { const expiresAt = new Date(authData.expiresAt); return { content: [ { type: "text", text: `✅ Garmin authentication is valid and ready to use.\nToken expires: ${expiresAt.toLocaleString()}`, }, ], }; } else { return { content: [ { type: "text", text: "❌ No valid Garmin authentication found. Please run the 'authenticate_garmin' tool to authenticate.", }, ], }; } } catch (error) { return { content: [ { type: "text", text: `❌ Authentication error: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }
  • Registration of the 'check_garmin_auth' tool in the ListTools response, including name, description, and empty input schema.
    { name: "check_garmin_auth", description: "Check if Garmin authentication is valid", inputSchema: { type: "object", properties: {}, }, },
  • Input schema for the 'check_garmin_auth' tool, which takes no parameters.
    inputSchema: { type: "object", properties: {}, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/charlesfrisbee/garmin-workouts-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server