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

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

No annotations are provided, so the description carries the full burden. It states what the tool does but lacks behavioral details such as whether this initiates user interaction, requires specific permissions, or has rate limits. For an OAuth-related tool with zero annotation coverage, this is a significant gap in transparency.

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, clear sentence with no wasted words. It is front-loaded and efficiently conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured.

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?

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is minimally adequate. However, for an OAuth authorization tool, it could benefit from additional context such as what the URL is used for or next steps in the flow, leaving some gaps in completeness.

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, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add parameter semantics, but this is acceptable given the lack of parameters, aligning with the baseline expectation for zero-parameter tools.

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 verb ('Get') and resource ('authorization URL for OAuth flow'), making the purpose immediately understandable. It doesn't explicitly differentiate from its sibling 'whoop-exchange-code-for-token', but the distinction is implied by the OAuth flow sequence (URL first, then token exchange).

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

Usage Guidelines3/5

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

The description implies usage in an OAuth flow context, suggesting it should be called before token exchange. However, it doesn't explicitly state when to use this tool versus alternatives like direct token setting or refresh, nor does it mention prerequisites 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/nissand/whoop-mcp-server-claude'

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