Skip to main content
Glama
nissand

WHOOP MCP Server

by nissand

whoop-get-sleep-for-cycle

Retrieve detailed sleep analysis data for a specific WHOOP cycle to monitor sleep patterns and quality.

Instructions

Get sleep data for a specific cycle

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cycleIdYesID of the cycle to get sleep data for

Implementation Reference

  • Registration of the 'whoop-get-sleep-for-cycle' tool in the MCP server's listTools handler, including name, description, and input schema.
    {
      name: 'whoop-get-sleep-for-cycle',
      description: 'Get sleep data for a specific cycle',
      inputSchema: {
        type: 'object',
        properties: {
          cycleId: {
            type: 'number',
            description: 'ID of the cycle to get sleep data for',
          },
        },
        required: ['cycleId'],
      },
    },
  • MCP server request handler for callToolRequestSchema that handles the 'whoop-get-sleep-for-cycle' case, validates input, calls WhoopApiClient, and returns JSON response.
    case 'whoop-get-sleep-for-cycle': {
      if (!args || typeof args.cycleId !== 'number') {
        throw new Error('cycleId is required and must be a number');
      }
      const result = await this.whoopClient.getSleepForCycle(args.cycleId);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core implementation of getSleepForCycle in WhoopApiClient that performs the HTTP GET request to the Whoop API endpoint `/cycle/{cycleId}/sleep` and returns the sleep data.
    async getSleepForCycle(cycleId: number): Promise<WhoopSleep[]> {
      const response = await this.client.get(`/cycle/${cycleId}/sleep`);
      return response.data;
    }
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 of behavioral disclosure. It states it 'gets' data, implying a read-only operation, but doesn't specify authentication requirements, rate limits, error conditions, or what the returned data structure looks like. This leaves significant gaps for an agent to understand how to use it effectively.

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's front-loaded with the core purpose, making it easy to parse quickly. Every part of the sentence contributes directly to understanding the tool's function.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'sleep data' includes, how it's structured, or any prerequisites like authentication. For a data retrieval tool in a family with many similar tools, more context is needed to guide proper usage.

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?

The schema description coverage is 100%, with the single parameter 'cycleId' clearly documented in the schema. The description doesn't add any additional meaning beyond what the schema provides, such as explaining what a 'cycle' represents or valid ID ranges. With high schema coverage, the baseline score of 3 is appropriate.

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 ('sleep data for a specific cycle'), making the purpose understandable. However, it doesn't distinguish this tool from similar siblings like 'whoop-get-sleep-by-id' or 'whoop-get-sleep-collection', which likely retrieve sleep data in different ways.

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?

The description provides no guidance on when to use this tool versus alternatives. Given siblings like 'whoop-get-sleep-by-id' and 'whoop-get-sleep-collection', it's unclear if this is for retrieving sleep data by cycle ID specifically, or if other tools might be more appropriate in different contexts.

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