whoop-get-cycle-by-id
Retrieve specific WHOOP cycle data using its unique identifier to access detailed fitness metrics, recovery analysis, and physiological performance information.
Instructions
Get the cycle for the specified ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cycleId | Yes | ID of the cycle to retrieve |
Implementation Reference
- src/mcp-server.ts:62-75 (registration)Registration of the 'whoop-get-cycle-by-id' tool, including name, description, and input schema.{ name: 'whoop-get-cycle-by-id', description: 'Get the cycle for the specified ID', inputSchema: { type: 'object', properties: { cycleId: { type: 'number', description: 'ID of the cycle to retrieve', }, }, required: ['cycleId'], }, },
- src/mcp-server.ts:338-351 (handler)MCP tool handler for 'whoop-get-cycle-by-id': validates cycleId input and delegates to WhoopApiClient.getCycleById, returns JSON stringified result.case 'whoop-get-cycle-by-id': { if (!args || typeof args.cycleId !== 'number') { throw new Error('cycleId is required and must be a number'); } const result = await this.whoopClient.getCycleById(args.cycleId); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/whoop-api.ts:59-62 (helper)Core implementation fetching the cycle data by ID from the Whoop API endpoint /cycle/{cycleId} using axios.async getCycleById(cycleId: number): Promise<WhoopCycle> { const response = await this.client.get(`/cycle/${cycleId}`); return response.data; }