Skip to main content
Glama
nissand

WHOOP MCP Server

by nissand

whoop-set-access-token

Configure API authentication by setting the access token required to retrieve WHOOP fitness and health data through the MCP server.

Instructions

Set the access token for API calls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessTokenYesAccess token to use for API calls

Implementation Reference

  • Handler for the 'whoop-set-access-token' tool: validates the accessToken input and delegates to WhoopApiClient.setAccessToken, returning success message.
    case 'whoop-set-access-token': {
      if (!args || typeof args.accessToken !== 'string') {
        throw new Error('accessToken is required and must be a string');
      }
      this.whoopClient.setAccessToken(args.accessToken);
      return {
        content: [
          {
            type: 'text',
            text: 'Access token set successfully',
          },
        ],
      };
    }
  • Registration of the 'whoop-set-access-token' tool in the listTools handler, including name, description, and input schema.
    {
      name: 'whoop-set-access-token',
      description: 'Set the access token for API calls',
      inputSchema: {
        type: 'object',
        properties: {
          accessToken: {
            type: 'string',
            description: 'Access token to use for API calls',
          },
        },
        required: ['accessToken'],
      },
    },
  • Input schema definition for the 'whoop-set-access-token' tool.
    inputSchema: {
      type: 'object',
      properties: {
        accessToken: {
          type: 'string',
          description: 'Access token to use for API calls',
        },
      },
      required: ['accessToken'],
    },
  • Core helper method in WhoopApiClient that sets the access token in the config, which is used by the axios interceptor for Authorization headers in subsequent API calls.
    setAccessToken(accessToken: string) {
      this.config.accessToken = accessToken;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior1/5

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

No annotations provided, so the description carries full burden. It fails to disclose behavioral traits such as whether the token is stored persistently, overrides previous tokens, or is scoped to the session. This is critical for a state-changing operation.

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

Conciseness4/5

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

The description is a single sentence that is concise and front-loaded. However, the brevity comes at the cost of missing important details.

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?

For a simple setter tool with no output schema, the description is incomplete. It does not explain side effects, persistence, or error conditions, leaving the agent with insufficient context to use the tool correctly.

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

Parameters3/5

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

Schema coverage is 100% with one parameter 'accessToken' described identically in both schema and description. No additional meaning or context is added beyond the schema.

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

Purpose5/5

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

The description clearly states the action 'set' and the resource 'access token', with a specific purpose distinct from sibling tools like exchange, refresh, or revoke.

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 on when to use this tool versus alternatives such as whoop-exchange-code-for-token or whoop-refresh-token. The description does not explain the context for setting an access token.

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