Skip to main content
Glama

list_sleep

Retrieve sleep time-series samples for a date range, including duration by stage, efficiency, and sleep score. Helps analyze sleep patterns across multiple nights.

Instructions

Returns sleep time-series samples from the /247samples API for the date range [from, to] inclusive, ordered chronologically by timestamp. Each entry: { timestamp (ISO8601), totalSleep (s), deepSleep (s), lightSleep (s), remSleep (s), awake (s), efficiency (%), sleepScore }. Nights without recorded sleep are omitted. Use get_sleep for a single night. Requires Sleep API subscription on apizone; returns 404 without it. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesLast bedtime date YYYY-MM-DD, inclusive (the date the person went to bed, not woke up — see get_sleep). Future dates are accepted but produce no entries. Prefer ranges ≤ 30 days for responsiveness.
fromYesFirst bedtime date YYYY-MM-DD, inclusive (the date the person went to bed, not woke up — see get_sleep). Must be ≤ to. Nights without recorded sleep are silently omitted, not 404.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.14.1
    • changedInput schema / properties / from / description
      Previous value: -"First wake-up date YYYY-MM-DD, inclusive. Must be ≤ to. Nights without recorded sleep are silently omitted, not 404."New value: +"First bedtime date YYYY-MM-DD, inclusive (the date the person went to bed, not woke up — see get_sleep). Must be ≤ to. Nights without recorded sleep are silently omitted, not 404."
    • changedInput schema / properties / to / description
      Previous value: -"Last wake-up date YYYY-MM-DD, inclusive. Future dates are accepted but produce no entries. Prefer ranges ≤ 30 days for responsiveness."New value: +"Last bedtime date YYYY-MM-DD, inclusive (the date the person went to bed, not woke up — see get_sleep). Future dates are accepted but produce no entries. Prefer ranges ≤ 30 days for responsiveness."
  2. Changed2 schema fields changedv0.9.2
    • changedInput schema / properties / from / description
      Previous value: -"First wake-up date YYYY-MM-DD, inclusive. Example: 2026-04-01."New value: +"First wake-up date YYYY-MM-DD, inclusive. Must be ≤ to. Nights without recorded sleep are silently omitted, not 404."
    • changedInput schema / properties / to / description
      Previous value: -"Last wake-up date YYYY-MM-DD, inclusive. Example: 2026-04-30."New value: +"Last wake-up date YYYY-MM-DD, inclusive. Future dates are accepted but produce no entries. Prefer ranges ≤ 30 days for responsiveness."
  3. Changed6 schema fields changedv0.9.1
    • addedInput schema / properties / from / examples
      Added value: +[
      +  "2026-04-01"
      +]
    • addedInput schema / properties / from / maxLength
      Added value: +10
    • addedInput schema / properties / from / minLength
      Added value: +10
    • addedInput schema / properties / to / examples
      Added value: +[
      +  "2026-04-30"
      +]
    • addedInput schema / properties / to / maxLength
      Added value: +10
    • addedInput schema / properties / to / minLength
      Added value: +10
  4. Changed6 schema fields changedv0.9.0
    • changedInput schema / properties / from / description
      Previous value: -"YYYY-MM-DD"New value: +"First wake-up date YYYY-MM-DD, inclusive. Example: 2026-04-01."
    • addedInput schema / properties / from / format
      Added value: +"date"
    • addedInput schema / properties / from / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • changedInput schema / properties / to / description
      Previous value: -"YYYY-MM-DD"New value: +"Last wake-up date YYYY-MM-DD, inclusive. Example: 2026-04-30."
    • addedInput schema / properties / to / format
      Added value: +"date"
    • addedInput schema / properties / to / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
  5. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly: read-only, inclusive date bounds, omission of nights without recorded sleep, field-level output shape, and subscription-derived 404 behavior are all disclosed.

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

Conciseness5/5

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

The description is dense but efficient: purpose, output shape, edge case, sibling alternative, prerequisite, and safety hint are each handled in one sentence. There is no filler or repetition, and key information is front-loaded.

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?

The tool has no output schema, so the description compensates by enumerating every returned field with units. It also covers omissions, subscription dependency, read-only nature, and the correct alternative tool—everything an agent needs to invoke it correctly.

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?

Schema coverage is 100% and both from and to already have detailed descriptions covering format, inclusive bedtime-date semantics, ordering constraints, future-date behavior, and range-size guidance. The description adds little per-parameter meaning beyond reaffirming inclusivity, so the high-coverage baseline of 3 is appropriate.

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 states a specific verb ('Returns sleep time-series samples'), the API source (/247samples), the date-range scope, and chronological ordering. It also explicitly distinguishes itself from the sibling get_sleep, so an agent can tell them apart immediately.

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?

It names the alternative ('Use get_sleep for a single night'), states the subscription prerequisite, and documents the failure mode ('returns 404 without it'). The schema additionally advises ranges ≤ 30 days, giving clear practical guidance.

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