Skip to main content
Glama

WHOOP Sleep Trend

whoop_sleep_trend
Read-onlyIdempotent

Aggregate WHOOP sleep records to reveal trends in sleep performance, duration, and efficiency. Get average, min, max, slope, and direction to see if your sleep is improving or degrading.

Instructions

Aggregate WHOOP sleep over the last N days (default 30) into a per-metric trend for sleep performance percentage, sleep duration (hours) and sleep efficiency percentage.

Each metric returns { avg, min, max, slope, direction, n_valid } where slope is a least-squares fit over the chronologically ordered scored sleeps (oldest to newest) and direction is rising, falling, stable or insufficient_data. Use this to answer "is my sleep improving or degrading?" without paging the raw collection yourself. Read-only; fetches recent WHOOP v2 records, computes statistics, stores nothing. Not medical advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to aggregate into the trend. Minimum 2 (slope needs two points), maximum 30. Defaults to 30.
timezoneNoIANA timezone reserved for display, e.g. America/New_York.UTC
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYes
metricsYes
diagnosticYes
data_qualityYes
generated_atYes
lookback_daysYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true and idempotentHint=true. The description adds 'Read-only; fetches recent WHOOP v2 records, computes statistics, stores nothing. Not medical advice,' which aligns and adds useful behavioral context (data source, computation, non-medical). No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, front-loading the core aggregation purpose, then details the metrics and use case. It's efficient but could be slightly shorter without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description adequately covers metrics and slope interpretation. It explains the aggregate fields and direction. No significant gaps for a read-only aggregation tool.

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 input schema already describes parameters (days, timezone, response_format) with 67% coverage. The description mentions default days but adds no meaning beyond the schema. Baseline score of 3 is appropriate since schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Aggregate WHOOP sleep over the last N days into a per-metric trend for sleep performance percentage, sleep duration and sleep efficiency percentage.' It uses a specific verb and resource, distinguishing from siblings like whoop_get_sleep (individual sleep) and whoop_recovery_trend (recovery aggregation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this to answer "is my sleep improving or degrading?" without paging the raw collection yourself,' providing a clear use case. It implies alternatives like raw collection tools, though it doesn't name sibling tools explicitly.

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/davidmosiah/whoop-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server