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: {},
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool checks authentication validity but doesn't describe what 'valid' means (e.g., token expiration, scope sufficiency), what happens on failure, or any side effects like rate limits or logging. This leaves significant gaps for a tool that likely interacts with external APIs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving external authentication checks) and lack of annotations and output schema, the description is incomplete. It doesn't explain what constitutes valid authentication, potential error conditions, or return values, leaving the agent with insufficient information for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description doesn't need to add parameter details, and it correctly implies no inputs are required for checking auth status, aligning with the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as checking Garmin authentication validity, using a specific verb ('check') and resource ('Garmin authentication'). However, it doesn't differentiate from sibling tools like 'authenticate_garmin' which might handle initial authentication versus checking existing validity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'authenticate_garmin' for initial setup or 'create_garmin_workout' for operations requiring valid auth. The description implies usage for checking validity but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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