Skip to main content
Glama

get_sleep

Retrieve sleep duration, sleep stages, sleep score, and overnight HRV for a specific date. Defaults to last night's sleep.

Instructions

Sleep duration, sleep stages, sleep score, and overnight HRV.

Args: date: Calendar date in YYYY-MM-DD format. Defaults to last night (yesterday). Pass today's date to get the most recent recorded sleep when you wake up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesCalendar date for the sleep period, YYYY-MM-DD.
noteNoSet when no sleep data was found for the date.
avg_spo2No
sleep_scoreNoGarmin sleep score, 0 to 100.
awake_secondsNo
sleep_qualityNoQualitative label such as GOOD or POOR.
avg_respirationNo
rem_sleep_secondsNo
deep_sleep_secondsNo
light_sleep_secondsNo
total_sleep_secondsNo
avg_overnight_hrv_msNoAverage overnight HRV in milliseconds.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the data returned (duration, stages, score, HRV), but does not mention behavioral traits like error handling for missing dates, authentication needs, or rate limits. For a read-only tool, this is minimally adequate.

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 description is concise, front-loading the key data items, and includes parameter details in a docstring style. It is efficient with words, but the parameter details could be integrated more seamlessly.

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?

Given the presence of an output schema (not shown but indicated), the description need not explain return values, though it does mention returned data. It explains the input parameter thoroughly. It is fairly complete for a simple retrieval tool, though it could mention what happens if no sleep data exists for the date.

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?

The schema has 0% description coverage for the date parameter. The description compensates fully by explaining the format (YYYY-MM-DD), default behavior (last night/yesterday), and a use case (today's date for most recent sleep). This adds significant meaning beyond the schema's type definition.

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 clearly specifies the verb (get) and resource (sleep data including duration, stages, score, HRV), and it distinguishes itself from sibling tools that deal with other health metrics (e.g., get_steps_and_calories, get_stress).

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 description provides clear context on when to use the tool: defaults to last night, and suggests using today's date to get most recent sleep on waking. However, it does not explicitly exclude cases or mention alternatives, though among siblings it is unique.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tyler-Irving/garmin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server