Skip to main content
Glama

getSleep

Read-only

Retrieve sleep data for one night or up to 14 nights, including bedtime, sleep stages, score, heart rate, SpO2, respiration and stress, with optional raw Garmin JSON.

Instructions

Sleep for one night (date: the morning you woke up), or for up to 14 nights (fromDate and toDate), yyyy-MM-dd, as one compact row per night: bedtime and wake (local HH:mm), hours of sleep, deep, light, REM and awake, the sleep score and its quality, the sleep need (hours), average heart rate, average and lowest SpO2, average respiration, awake count, average sleep stress and Garmin's feedback. Missing values are left out, and a night without sleep data has only its date. Set raw=true for Garmin's JSON.

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": "getSleep"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawNoReturn Garmin's raw JSON instead of the summary
dateNoDate yyyy-MM-dd
toDateNoLast date yyyy-MM-dd, with fromDate
fromDateNoFirst date yyyy-MM-dd, with toDate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations establish readOnlyHint and openWorldHint, so safety is covered; the description adds real behavioral detail on top — the 14-night limit, that missing values are omitted rather than null-filled, and that a night without sleep data returns only its date. These edge-case behaviors are exactly what an agent needs to interpret results correctly, though permissions or failure modes for out-of-range dates are not stated.

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?

One dense but front-loaded block: the scope and date semantics come first, the field list second, the raw option last. Every clause carries information, with only mild over-packing in the long field enumeration, which could have been grouped slightly more tightly.

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 full burden of describing return values and does so field by field, including the compact-row-per-night shape and the empty-night case. Combined with the input-mode explanation and the raw flag, an agent has everything needed to call and interpret it.

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 baseline would be 3, but the description adds genuinely non-obvious semantics: date refers to the morning of waking (not the bedtime date), and fromDate/toDate must be paired and capped at 14 nights. It also clarifies the raw=true escape hatch to Garmin's unmodified JSON, which the schema only states tersely.

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 opens with a specific verb and resource — retrieving a night's sleep — and immediately scopes it to either one night via date or up to 14 nights via fromDate/toDate. It then enumerates exactly what is returned (bedtime, wake, hours, sleep stages, score, SpO2, respiration, and so on), which leaves no ambiguity about what the tool produces.

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?

It clearly explains the two mutually exclusive calling modes and the 14-night ceiling, and it states the date semantics ('the morning you woke up'), which is the main place an agent could go wrong. It stops short of naming when to prefer this over other Garmin data tools, but no sibling in the catalog appears to return sleep data, so the gap is minor.

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