Skip to main content
Glama

whoop-get-sleep-for-cycle

Retrieve detailed sleep analysis data for a specific WHOOP cycle, including sleep stages, duration, and quality metrics to track sleep patterns and recovery.

Instructions

Get sleep data for a specific cycle

Input Schema

NameRequiredDescriptionDefault
cycleIdYesID of the cycle to get sleep data for

Input Schema (JSON Schema)

{ "properties": { "cycleId": { "description": "ID of the cycle to get sleep data for", "type": "number" } }, "required": [ "cycleId" ], "type": "object" }

Implementation Reference

  • Core handler function that implements the tool logic by calling the Whoop API endpoint for sleep data of a specific cycle.
    async getSleepForCycle(cycleId: number): Promise<WhoopSleep[]> { const response = await this.client.get(`/cycle/${cycleId}/sleep`); return response.data; }
  • MCP server handler that validates input and delegates to WhoopApiClient.getSleepForCycle, formats response as MCP content.
    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), }, ], }; }
  • Tool registration in the list of available tools, 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'], }, },
  • Input schema definition for the tool, specifying cycleId as required number parameter.
    inputSchema: { type: 'object', properties: { cycleId: { type: 'number', description: 'ID of the cycle to get sleep data for', }, }, required: ['cycleId'], }, },

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