Skip to main content
Glama
google-health-mcp

google-health-mcp

health_get_sleep

Retrieve nightly sleep data—duration, stages, and efficiency—from a local cache, with an option to fetch live from the Google Health API.

Instructions

Get nightly sleep data (duration, stages, efficiency).

Returns sleep data from the local cache by default. Use live=True to fetch from the API. Run health_sync first to populate the cache.

Sleep data is sparse: only nights with watch-tracked sleep are present. Travel, off-wrist nights, or manual logs may be missing.

Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.

Returns one entry per night with total_minutes, efficiency, start/end times, and stage breakdown (deep, light, REM, wake minutes).

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

Input Schema

NameRequiredDescriptionDefault
liveNo
end_dateNo
start_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.12.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "health_get_sleepOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv1.0.0

TDQS

A4.3/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 does substantial work: it discloses the default cache-read behavior, exactly what live=True does ('re-fetch this window from the API before reading the cache'), and that results are sparse and may silently omit travel, off-wrist, or manually logged nights. The main unexplored traits are cost/latency of a live fetch and any auth requirements.

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?

Front-loaded with purpose, then behavior, then caveats, then a compact Args block. The sparsity warning is a high-value sentence rather than filler. Slightly long relative to a three-parameter read tool, but no sentence is redundant with the structured fields.

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?

There is no output schema, and the description compensates by naming the per-night return fields (total_minutes, efficiency, start/end times, stage breakdown). Combined with full parameter documentation, the cache-vs-live model, and the data-completeness caveat, an agent has everything needed to call it correctly and interpret gaps.

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?

Schema description coverage is 0%, so the description must define everything, and it does: start_date and end_date accept YYYY-MM-DD, YYYY-MM (resolved to the last day for end_date), and relative forms like '30d'/'Nd', with explicit defaults for each. The live parameter's cache-invalidation semantics are spelled out rather than left to a bare boolean name.

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 opens with a specific verb and resource ('Get nightly sleep data') and enumerates the payload fields (duration, stages, efficiency). It does not distinguish itself from the sibling health_get_sleep_sessions or health_trends, so an agent cannot tell from the text alone which sleep tool applies, but the core purpose is unambiguous.

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 gives concrete operating context: reads come from a local cache by default, live=True re-fetches from the API, and health_sync must be run first to populate the cache. That is actionable prerequisite guidance. It stops short of stating when to prefer this tool over health_get_sleep_sessions or when a cache read would be misleading.

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