whoop-get-recovery-for-cycle
Retrieve recovery metrics and analysis for a specific WHOOP cycle to monitor physiological restoration and readiness for activity.
Instructions
Get recovery data for a specific cycle
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cycleId | Yes | ID of the cycle to get recovery data for |
Implementation Reference
- src/whoop-api.ts:96-99 (handler)Core handler function that fetches recovery data for a given cycle ID via the Whoop API endpoint `/cycle/{cycleId}/recovery` and returns the parsed response.async getRecoveryForCycle(cycleId: number): Promise<WhoopRecovery[]> { const response = await this.client.get(`/cycle/${cycleId}/recovery`); return response.data; }
- src/mcp-server.ts:143-156 (schema)Tool registration including name, description, and input schema validation (requires cycleId as number).{ name: 'whoop-get-recovery-for-cycle', description: 'Get recovery data for a specific cycle', inputSchema: { type: 'object', properties: { cycleId: { type: 'number', description: 'ID of the cycle to get recovery data for', }, }, required: ['cycleId'], }, },
- src/mcp-server.ts:403-416 (handler)MCP server handler case that validates the input arguments and delegates execution to the WhoopApiClient's getRecoveryForCycle method, formatting the result as MCP response.case 'whoop-get-recovery-for-cycle': { if (!args || typeof args.cycleId !== 'number') { throw new Error('cycleId is required and must be a number'); } const result = await this.whoopClient.getRecoveryForCycle(args.cycleId); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/types.ts:50-61 (schema)TypeScript interface defining the structure of Whoop recovery data returned by the tool (output schema). Note: WhoopRecoveryScore defined nearby.export interface WhoopRecovery { id: string; v1_id: number; user_id: number; created_at: string; updated_at: string; start: string; end: string; timezone_offset: string; score_state: string; score?: WhoopRecoveryScore['score']; }