Skip to main content
Glama

getSleep

Retrieve sleep metrics for one night or up to 14 nights, including bedtime, wake time, sleep stages, score, heart rate, SpO2, respiration, and Garmin feedback.

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.

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 observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely delivers: it discloses the 14-night cap, that output is one compact row per night, that missing values are omitted rather than nulled, and that a night without sleep data returns only its date. It doesn't mention auth requirements or rate limits, but for a read-only data getter the behavioral profile is unusually complete.

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?

The mode-selection information is front-loaded, and the long field enumeration earns its space because there is no output schema. The middle clause is dense and reads as a run-on, but nothing is redundant with structured fields.

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?

With no output schema and no annotations, the description compensates by enumerating every returned field and the missing-data convention. The one gap is that all four parameters are optional, and the description never says what happens if no date arguments are passed.

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 baseline is 3, but the description adds real meaning: 'date' is defined as 'the morning you woke up' (a genuine disambiguation the schema does not make), and it explains that fromDate/toDate must be used as a pair. That goes beyond restating property descriptions.

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 description names a specific verb ('Sleep') and resource (Garmin sleep data) and splits the two operating modes: a single night via 'date', or a range via 'fromDate'/'toDate'. The resource is unique among siblings (getActivity, getBodyBattery, getHrvRange), so confusion is unlikely, though no sibling is named explicitly to route an agent away.

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 states the condition for each mode: one night with 'date', up to 14 nights with 'fromDate' and 'toDate', and 'raw=true' for Garmin's JSON. It gives no exclusions or pointers to alternative tools, but the usage context is unambiguous.

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