Skip to main content
Glama

whoop-get-cycle-collection

Retrieve paginated physiological cycle data from WHOOP to analyze fitness patterns, track recovery metrics, and monitor sleep cycles over time.

Instructions

Get all physiological cycles for a user, paginated

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoLimit on the number of cycles returned (max 25)
startNoReturn cycles that occurred after or during this time (ISO 8601)
endNoReturn cycles that intersect this time or ended before this time (ISO 8601)
nextTokenNoNext token from the previous response to get the next page

Implementation Reference

  • MCP tool handler switch case that delegates the tool execution to WhoopApiClient.getCycleCollection and returns the result as JSON-formatted text content.
    case 'whoop-get-cycle-collection': { const result = await this.whoopClient.getCycleCollection({ limit: args?.limit as number | undefined, start: args?.start as string | undefined, end: args?.end as string | undefined, nextToken: args?.nextToken as string | undefined, }); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool registration in the ListTools handler, defining the tool name, description, and input schema.
    { name: 'whoop-get-cycle-collection', description: 'Get all physiological cycles for a user, paginated', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Limit on the number of cycles returned (max 25)', }, start: { type: 'string', description: 'Return cycles that occurred after or during this time (ISO 8601)', }, end: { type: 'string', description: 'Return cycles that intersect this time or ended before this time (ISO 8601)', }, nextToken: { type: 'string', description: 'Next token from the previous response to get the next page', }, }, required: [], }, },
  • Core helper function in WhoopApiClient that constructs pagination query parameters and fetches cycle collection data from the Whoop API.
    async getCycleCollection(params?: PaginationParams): Promise<WhoopCycleCollection> { const queryParams = new URLSearchParams(); if (params?.limit) queryParams.append('limit', params.limit.toString()); if (params?.start) queryParams.append('start', params.start); if (params?.end) queryParams.append('end', params.end); if (params?.nextToken) queryParams.append('nextToken', params.nextToken); const url = `/cycle${queryParams.toString() ? `?${queryParams.toString()}` : ''}`; const response = await this.client.get(url); return response.data; }
  • TypeScript interface defining the input parameters for getCycleCollection, matching the tool's inputSchema.
    export interface PaginationParams { limit?: number; start?: string; end?: string; nextToken?: string; }

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