Skip to main content
Glama

get_sleep

Fetch sleep records for the last 1–30 days, including naps, with performance, duration, efficiency, and stage breakdowns to analyze sleep quality and habits.

Instructions

Returns sleep records (performance, duration, efficiency, time in each stage) for the last N days, including naps. Use it to analyze sleep quality and habits. sleep_performance_pct is 0-100% (actual sleep vs. sleep needed); efficiency is the share of time in bed spent asleep. Summary stats exclude naps.

Input Schema

NameRequiredDescriptionDefault
daysNoHow many days back to fetch, from 1 to 30 (default 7).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

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 burden and does disclose meaningful data semantics: naps are included in the records but excluded from summary stats, and it defines sleep_performance_pct and efficiency. It omits whether aggregation/summary fields appear at all and any permission or scope constraints, but the exclusion rule is genuinely useful context beyond structured fields.

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?

Two sentences, front-loaded with what is returned, then metric definitions and the nap-exclusion caveat. Every sentence adds information an agent cannot get from the schema.

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?

No output schema exists, so the description must characterize returns, and it lists the metric families and the nap rule. It stops short of describing record-level shape (per-night vs aggregate, units, timezone), which leaves a modest gap for an agent composing downstream logic.

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 the single 'days' parameter is already documented with range and default. The description only restates 'last N days' and adds that naps are included; baseline 3 is appropriate since the schema does the work.

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?

States a specific verb and resource ('Returns sleep records') and enumerates exactly what is included: performance, duration, efficiency, time in each stage, plus naps. Against siblings like get_recovery and get_workouts, the domain is unambiguous from the first clause.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use it to analyze sleep quality and habits' gives an implied use case but does not say when to prefer it over get_recovery or get_workouts, nor any exclusions. Usage is inferred rather than directed.

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