Skip to main content
Glama

WHOOP Sleep Trend

whoop_sleep_trend
Read-onlyIdempotent

Aggregate WHOOP sleep into trend metrics for performance, duration, and efficiency to see if sleep is improving or degrading. Computes averages, slopes, and direction without paging raw records.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv0.6.1
  3. Removedv0.5.4
  4. First observedv0.5.3

TDQS

A4.3/5.0
Behavior4/5

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

Adds substantive context beyond the annotations: it discloses the return object shape ({avg,min,max,slope,direction,n_valid}), how slope is computed (least-squares over chronologically ordered scored sleeps), direction semantics, and that it stores nothing. Annotations already cover readOnly/idempotent/destructive, so these additions are the value-add, though no pagination or failure-mode detail is given.

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?

Front-loads the aggregation scope and metrics, then details the return shape and slope/direction semantics. Slightly dense with parenthetical details, but every sentence contributes information an agent needs to interpret the output.

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 an output schema exists, the description needn't reproduce return values, yet it explains slope/direction semantics that are central to interpreting results. Combined with the use-case framing and no-storage note, it is nearly complete, missing only edge-case behavior (e.g., insufficient_data handling changes).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67% and the description reinforces the days default (30) and its purpose, aligning with the schema's own min/max note. The timezone and response_format parameters are left entirely to the schema, so the description adds meaningful context for one param but not all three.

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?

States a specific verb (aggregate) and resource (WHOOP sleep) with explicit scope (last N days) and enumerates the exact metrics produced. An agent can distinguish this from whoop_list_sleeps (raw paging) and whoop_recovery_trend without opening the schema.

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?

Provides an explicit use case ('answer "is my sleep improving or degrading?" without paging the raw collection yourself') and implicitly contrasts with the raw-listing sibling. It lacks a clear when-NOT-to-use statement or named alternative tool, keeping it below 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.