Skip to main content
Glama

get_sleep_and_recovery

Analyzes overnight sleep stages, HRV, SpO2, respiration, and Body Battery recharge to detect sleep debt, autonomic recovery issues, and early illness or overreaching markers.

Instructions

Analyze overnight sleep architecture, HRV vs. baseline, SpO2, respiration, and Body Battery recharge.

Coaching Purpose: Evaluates multi-day or single-night sleep quality and autonomic nervous system recovery. Useful for diagnosing cumulative sleep debt, suppressed nocturnal HRV, elevated sleeping heart rate/respiration (early illness or overreaching markers), and poor Body Battery recharge.

Args: start_date: Start ISO date (YYYY-MM-DD). If omitted, defaults to a 7-day window ending on end_date (or today). If provided and end_date is omitted, fetches that single day. end_date: End ISO date (YYYY-MM-DD). Defaults to start_date when start_date is explicitly provided, or today when start_date is omitted. response_format: Output representation: "markdown", "json", or "hybrid" (default).

Returns: Formatted sleep & recovery analysis including deep/light/REM/awake sleep stages, sleep score, SpO2, respiration rate, overnight HRV + baseline, and Body Battery recharge.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_sleep_and_recovery"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_dateNo
start_dateNo
response_formatNohybrid

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose the non-obvious behavior that date arguments default to a rolling 7-day window and that a lone start_date collapses the query to a single night. It does not mention authorization requirements, rate limits, or data-availability limits for missing nights, which keeps it short of a 5.

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 a one-line summary, then clearly delimited Purpose/Args/Returns sections, so an agent can scan to the relevant block. The purpose paragraph is slightly padded with diagnostic examples that could be trimmed, but nothing is redundant with the schema.

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?

For a read-only analysis tool with three optional parameters and an output schema, the definition covers what is queried, how dates resolve, and what the output represents. Even though the output schema exists, the Returns block usefully names the sleep-stage and recovery metrics included, leaving no gap an agent would need filled before calling it.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely, and it does: it gives the ISO YYYY-MM-DD format, spells out the defaulting rules for both dates and their interaction, and explains what each response_format value means. This is meaning well beyond the bare string/null and enum fields in the schema.

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

Purpose4/5

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

The opening sentence names a specific verb and a precise resource set: overnight sleep architecture, HRV vs. baseline, SpO2, respiration, and Body Battery recharge. That is far more specific than the sibling names alone, though it never explicitly contrasts itself with adjacent tools like get_health_trends or get_coach_daily_briefing.

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 'Coaching Purpose' block gives concrete when-to-use conditions — multi-day vs. single-night evaluation, cumulative sleep debt, suppressed nocturnal HRV, elevated sleeping HR/respiration as illness or overreaching markers. It stops short of stating exclusions or naming the sibling tool to use instead for overlapping questions such as general health trends.

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