Skip to main content
Glama
Wellness Project MCP

Wellness Project MCP

log_sleep

Log overnight sleep or a separate nap with duration, bedtime, wake time, and tracker scores or stage breakdown, so daily wellness records stay accurate and queryable.

Instructions

Log an overnight sleep entry or a separate nap. Use for a concrete sleep event from a tracker or recall. Question/habit/hypothetical alone: no write.

PROACTIVE DATA COLLECTION: For an overnight entry without numbers, ask: "How many hours did you sleep, and do you have a sleep score or stage breakdown from your tracker?" For a nap, use NAPS below.

INFER — do not ask:

  • date: local date the sleep or nap ended; default to today

NAPS: Set is_nap=true for a daytime nap or other short sleep separate from the main night, even when the user only says "I napped." Provide its start (bedtime) and/or end (wake_time), plus duration (total_hours) or both times. Ask for a time if neither is known; never invent one. Naps must be under undefined hours. They are separate sessions and never replace or increase overnight sleep. Overnight total_hours means the main night only.

Overnight entries accept any subset of fields. One row per date, updated on repeat. All entries are tagged manual; wearable-provider sources are reserved for auto-sync.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "date": "<date>"
    },
    "name": "log_sleep"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesLocal date the sleep or nap ended. Format: YYYY-MM-DD. Default to today.
is_napNoWhether this is a separate nap. Default false; see NAPS above.
bedtimeNoBedtime / primary sleep session start time. Format: ISO 8601 timestamp (e.g. 2026-08-16T22:47:00-04:00) or HH:MM wall-clock time. Optional.
wake_timeNoWake time / primary sleep session end time. Format: ISO 8601 timestamp (e.g. 2026-08-17T06:21:00-04:00) or HH:MM wall-clock time. Optional.
awakeningsNoNumber of times woken during the night. Optional.
sleep_scoreNoSleep quality score on a 0-100 scale (matches wearable scoring). For a 1-10 self-rating, multiply by 10 first. Optional.
total_hoursNoTotal sleep duration in hours (e.g. 7.5). Optional.
rem_sleep_hoursNoREM sleep in hours. Optional — include if the tracker reports it.
deep_sleep_hoursNoDeep/slow-wave sleep in hours. Optional — include if the tracker reports it.
light_sleep_hoursNoLight sleep in hours. Optional — include if the tracker reports it.

Output Schema

NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.3.0
    • changedInput schema / properties / date / description
      Previous value: -"Date of the sleep entry (night ending on this date). Format: YYYY-MM-DD. Default to today."New value: +"Local date the sleep or nap ended. Format: YYYY-MM-DD. Default to today."
    • addedInput schema / properties / is_nap
      Added value: +{
      +  "description": "Whether this is a separate nap. Default false; see NAPS above.",
      +  "type": "boolean"
      +}
  2. First observedv1.2.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotation coverage is good (write, non-destructive, non-idempotent), and the description adds the upsert rule that matters most: 'One row per date, updated on repeat,' plus that all entries are tagged manual while wearable-provider sources are reserved for auto-sync. The only real gap is the malformed nap length limit, which is the one numeric behavior an agent needs and cannot get from annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Headers and imperative bullets make it front-loaded and scannable, so the structure works. But it carries a verbatim scripted question under PROACTIVE DATA COLLECTION that reads like prompt content rather than tool documentation, and the broken 'under undefined hours' clause is wasted, misleading text.

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 an output schema, full parameter coverage and clear annotations, the description covers the remaining judgment calls: inference of date, nap handling, upsert-per-date behavior, and the fact that naps and overnight totals are separate quantities. It is essentially complete except for the missing nap maximum duration, which the description itself promises to define and then fails to.

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 description coverage is 100%, so the baseline is 3, and the description still adds meaning the schema does not: is_nap marks a distinct session that never replaces or increases overnight sleep, total_hours means the main night only, and date is the local date the session ended. Those distinctions would be ambiguous from the per-field descriptions alone.

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 definition gives a specific verb and resource ('Log an overnight sleep entry or a separate nap') and draws a sharp line around what it is not ('Question/habit/hypothetical alone: no write'). The only blemish is the malformed nap constraint, which says naps 'must be under undefined hours' and leaves the scope of a nap literally unspecified.

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

Usage Guidelines5/5

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

It names when to write versus when not to write (questions, habits, hypotheticals produce no write), routes naps to is_nap=true, and specifies what to ask for when an overnight entry arrives without numbers. It also says explicitly which fields to infer instead of asking (date defaults to today, ask for a nap time only if neither is known), so the agent is never left guessing whether to prompt the user.

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