Skip to main content
Glama

Log sleep

create_sleep

Add a finished sleep session to the baby's Nestling log. Use this only when the user asks to log or record a sleep that has ended. Each call adds a new entry, so do not retry after success. Accepts ISO 8601 ("2026-05-07T20:00:00Z"), relative ("2 hours ago", "now"), day and time ("today 3pm", "yesterday 8:30pm"), time only ("3pm"), or date and time ("2026-05-07 8pm"). Times without a zone use the timezone argument.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesWhen the sleep ended
notesNoOptional notes (max 10,000 characters)
startYesWhen the sleep started
babyIdYesThe baby's ID from list_babies
timezoneNoThe user's IANA time zone, such as "Europe/London". When left out, the host's location hint is used if it sends one, else UTC.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
totalResultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / babyId / description
      Previous value: -"The baby's UUID"New value: +"The baby's ID from list_babies"
    • changedInput schema / properties / end / description
      Previous value: -"Sleep end: Date/time — accepts ISO 8601 (\"2026-05-07T20:00:00Z\"), relative (\"2 hours ago\", \"now\"), day+time (\"today 3pm\", \"yesterday 8:30pm\"), time-only (\"3pm\"), or date+time (\"2026-05-07 8pm\")"New value: +"When the sleep ended"
    • addedInput schema / properties / end / maxLength
      Added value: +100
    • addedInput schema / properties / end / minLength
      Added value: +1
    • changedInput schema / properties / notes / description
      Previous value: -"Optional notes (max 10,000 chars)"New value: +"Optional notes (max 10,000 characters)"
    • changedInput schema / properties / start / description
      Previous value: -"Sleep start: Date/time — accepts ISO 8601 (\"2026-05-07T20:00:00Z\"), relative (\"2 hours ago\", \"now\"), day+time (\"today 3pm\", \"yesterday 8:30pm\"), time-only (\"3pm\"), or date+time (\"2026-05-07 8pm\")"New value: +"When the sleep started"
    • addedInput schema / properties / start / maxLength
      Added value: +100
    • addedInput schema / properties / start / minLength
      Added value: +1
    • addedInput schema / properties / timezone
      Added value: +{
      +  "description": "The user's IANA time zone, such as \"Europe/London\". When left out, the host's location hint is used if it sends one, else UTC.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / at
      Added value: +{
      +  "description": "When the entry happened, ISO 8601 UTC",
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / localTime
      Added value: +{
      +  "description": "The same time in the time zone used, with the zone name",
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / timezone
      Added value: +{
      +  "description": "Time zone used to read the times given",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / notes / description
      Previous value: -"Optional notes"New value: +"Optional notes (max 10,000 chars)"
    • addedInput schema / properties / notes / maxLength
      Added value: +10000
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare a non-idempotent write (readOnlyHint=false, idempotentHint=false, destructiveHint=false), and the description adds the consequence: every call appends a new entry, so retrying after success duplicates data. It does not discuss auth or failure modes, so it stops short of a 5.

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?

Front-loaded with purpose then the when-to-use constraint, followed by the format enumeration. Every sentence carries information; nothing is redundant padding.

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?

Output schema exists so return values need no explanation. Between the description (formats, timezone fallback, append semantics, non-retry rule) and annotations (write, non-idempotent), an agent has everything needed to call this correctly.

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 coverage is 100%, so the baseline is 3, but the description materially enriches the start/end semantics with accepted formats (ISO 8601, relative, day+time, time only) and the timezone fallback rule for zone-less times — meaning an agent cannot get from the schema alone.

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 ('Add a finished sleep session to the baby's Nestling log') and scopes it to completed sessions, which cleanly separates it from sibling creators like create_feed and create_nappy as well as from list_sleep.

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?

Explicitly states the trigger ('only when the user asks to log or record a sleep that has ended') and adds an operational rule ('do not retry after success'). The only minor gap is that it does not name an alternative tool for in-progress sleeps, but no such sibling exists in the list.

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