Skip to main content
Glama

Marrow Health: Apple Health for your AI

Sleep log

sleep_log
Read-onlyIdempotent

Nights of sleep, one per wake day, exactly as the app and Apple Health count them: bedtime, wake time, hours asleep, and minutes per stage (core, deep, rem, awake). Use this for any sleep question instead of raw metric_samples, which cannot be summed by calendar day.

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

Input Schema

NameRequiredDescriptionDefault
toNoLast day, YYYY-MM-DD, inclusive (optional, default today)
daysNoNights back (default 7, max 90)
fromNoFirst day, YYYY-MM-DD on the phone's calendar (optional, used instead of days)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this a safe, read-only, idempotent, closed-world read, so the safety profile is covered. The description adds real context beyond them: the wake-day aggregation rule and the stage breakdown, which explain how results are shaped. It omits nothing critical, though it doesn't mention pagination or whether multiple nights can be missing/gapped.

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 with no filler; the resource definition and returned fields come first, then the routing rule and its rationale. Every clause carries information an agent would otherwise have to guess.

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?

For a three-optional-parameter read with no output schema, the description supplies what is otherwise missing: the shape of each record and the per-stage fields. Combined with fully described parameters and rich annotations, an agent has enough to call this correctly and interpret the result.

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 description coverage is 100%, so all three parameters (from, to, days) are already documented with formats and defaults, establishing a baseline of 3. The description adds only the general notion that days correspond to wake days, not parameter-specific detail such as how from and days interact or which takes precedence.

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 concrete resource (nights of sleep) with an explicit counting convention ("one per wake day") and enumerates the returned fields: bedtime, wake time, hours asleep, per-stage minutes. It also explicitly disambiguates from metric_samples, so an agent can distinguish it without opening the schema.

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?

Gives a clear routing rule ("use this for any sleep question instead of raw metric_samples") with the reason the alternative fails (can't be summed by calendar day). It does not address write-side siblings such as log_sleep or say when a plain nightly query is insufficient, so it falls short of full when/when-not coverage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources