Skip to main content
Glama
nissand

WHOOP MCP Server

by nissand

whoop-get-authorization-url

Generate an OAuth authorization URL to authenticate users for accessing WHOOP fitness and health data through the API.

Instructions

Get the authorization URL for OAuth flow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of generating the OAuth authorization URL for Whoop API using client configuration.
    getAuthorizationUrl(state?: string): string {
      const params = new URLSearchParams({
        client_id: this.config.clientId,
        redirect_uri: this.config.redirectUri,
        response_type: 'code',
        scope: 'read:recovery read:cycles read:workout read:sleep read:profile read:body_measurement'
      });
      
      if (state) {
        params.append('state', state);
      }
      
      return `https://api.prod.whoop.com/oauth/oauth2/auth?${params.toString()}`;
    }
  • MCP server switch case handler that calls the WhoopApiClient.getAuthorizationUrl() and returns formatted text response.
    case 'whoop-get-authorization-url': {
      const url = this.whoopClient.getAuthorizationUrl();
      return {
        content: [
          {
            type: 'text',
            text: `Authorization URL: ${url}`,
          },
        ],
      };
    }
  • Tool registration in the ListTools response, including name, description, and input schema (empty object).
    {
      name: 'whoop-get-authorization-url',
      description: 'Get the authorization URL for OAuth flow',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are present, so the description must provide behavioral context. It only states it gets the URL, but omits important details such as whether user interaction is required, the need for a redirect URI, or any side effects like token caching.

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 extremely concise, a single sentence with no superfluous information. It is front-loaded and efficient.

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

Completeness3/5

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

For a tool with no parameters and no output schema, the description is adequate but could be improved by specifying that the tool returns a URL and that the user must navigate to it to proceed with OAuth. Without this, the tool's role in the flow is partially ambiguous.

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 input schema has no parameters, so there is no need for additional parameter descriptions. Schema coverage is 100% by default. The description adds no extra parameter info, but none is required.

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 action ('Get') and resource ('authorization URL for OAuth flow'), making the purpose obvious. However, it does not explicitly differentiate from sibling OAuth tools like exchange-code-for-token, which slightly reduces clarity.

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 vs. alternatives. For example, it is the first step in the OAuth flow but no mention of when to subsequently call exchange-code-for-token or other related tools.

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