Skip to main content
Glama

Sleep analysis

get_sleep_analysis
Read-onlyIdempotent

Retrieve nightly sleep data for 1-90 days, including bed/wake times, sleep stages, performance, efficiency, and averages to analyze sleep patterns.

Instructions

Returns nightly sleep for the last days days (default 14), newest first, as Markdown tables: bed and wake time, time asleep (light, deep and REM), in bed, deep, REM, light and awake, performance (%) and efficiency (%); a details table with no-data time, sleep cycles, disturbances, consistency (%), respiratory rate and the sleep needed before each night (baseline, debt, strain, nap credit); a naps table; then averages over the nights that have each value. Nights WHOOP hasn't scored are listed as pending. Each night counts toward the day the user woke up. Use it for sleep patterns. For last night's stages, use get_today; for the recovery those nights produced, use get_recovery_trends. Set days to match the question: 7 for the last week, 30 for the last month, up to 90. Read-only: it never changes the user's WHOOP data. It fetches the data live from WHOOP on every call and keeps no copy, so the answer is current; if WHOOP can't be reached, it says so. If WHOOP isn't connected yet, it returns a message asking to call get_auth_url.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoHow many days to cover, counting back from today: 1 to 90, default 14.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.1.2
    • addedInput schema / properties / days / default
      Added value: +14
    • changedInput schema / properties / days / description
      Previous value: -"Number of days to analyze (default: 14, max: 90)"New value: +"How many days to cover, counting back from today: 1 to 90, default 14."
    • addedInput schema / properties / days / maximum
      Added value: +90
    • addedInput schema / properties / days / minimum
      Added value: +1
    • changedInput schema / properties / days / type
      Previous value: -"number"New value: +"integer"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), yet the description adds genuinely new behavior: live fetch on every call with no cached copy, the day-attribution rule (a night counts toward the wake-up day), unscored nights appearing as pending, and failure paths (WHOOP unreachable, or not connected → call get_auth_url).

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-loaded with purpose and routing before the column inventory, and nearly every sentence carries actionable information. It is a dense single paragraph, though, and the long enumerations of table columns make it heavier to scan than it needs to be.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does so thoroughly (table structure, metrics, averages, pending nights), plus edge cases: auth state, live-fetch freshness, and unreachable-service behavior. Nothing an agent needs to call it correctly is missing.

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 100%, so the range/default are already documented, but the description adds interpretive value the schema lacks: the mapping of day counts to question phrasing (7 = last week, 30 = last month) and the counting convention (back from today).

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+resource (nightly sleep over the last `days` days, newest first) and enumerates the actual returned tables and metrics, so an agent knows exactly what it gets. It also explicitly distinguishes itself from siblings by naming get_today and get_recovery_trends and the conditions that select them.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('Use it for sleep patterns'), when-to-use-something-else with named alternatives ('For last night's stages, use get_today; for the recovery those nights produced, use get_recovery_trends'), and concrete parameter selection guidance ('7 for the last week, 30 for the last month, up to 90').

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