Skip to main content
Glama

Marrow Health: Apple Health for your AI

Log sleep

log_sleep

Record a night (or nap) the watch missed: when the user fell asleep and woke, phone time. Refused when that time already has sleep recorded (check sleep_log).

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": {
      "bedtime": "<bedtime>",
      "wake": "<wake>"
    },
    "name": "log_sleep"
  }
}

Input Schema

NameRequiredDescriptionDefault
wakeYesYYYY-MM-DD HH:MM, 24 hour
bedtimeYesYYYY-MM-DD HH:MM, 24 hour
idempotency_keyNoOptional. The same key never logs twice. Use a new one to log an identical entry again on purpose.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish this is a non-read-only, non-destructive, closed-world write, so the description's job is to add the write semantics — and it does by disclosing the duplicate-time refusal rule and pointing at sleep_log as the pre-check. It does not describe what a successful call produces or whether it merges with existing sleep records, which is a modest remaining gap.

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?

A single sentence that front-loads the core action and its scope, followed by the refusal condition — every clause carries information and nothing is padded.

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?

For a three-parameter logging tool with full schema coverage and annotations, the definition covers the action, the target record type, the time basis, and the failure mode. It is slightly thin on outcome (what gets created and whether it appears in daily totals), which matters because there is no output schema.

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%, so the baseline is 3, and both required time fields are already documented as 'YYYY-MM-DD HH:MM, 24 hour'. The description adds a small but real clarification with 'phone time', resolving a timezone ambiguity the schema leaves open, but says nothing further about the idempotency key that the schema doesn't already state.

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 uses a specific verb+resource pair ('Record a night (or nap)') and narrows the scope with 'the watch missed', which distinguishes manual backfill from automatic sleep capture. It stops short of naming an explicit alternative path (e.g. the auto-detected sleep read tool) beyond the parenthetical check reference.

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?

The phrase 'the watch missed' sets the condition for using this tool, and 'Refused when that time already has sleep recorded (check sleep_log)' gives a concrete precondition plus the sibling to consult first. What's missing is an explicit statement of the alternative when the night already exists (edit instead of log), so the agent must infer it.

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