Skip to main content
Glama

log_sleep

Record a sleep session with local start and wake times, ensuring the wake time is after sleep and not in the future.

Instructions

补一条睡眠记录(需要 app 3.8+):两个端点都是本地时间、无时区, 形如 2026-11-04T23:00。wake_at 必须晚于 sleep_at 且不能是未来。

Input Schema

NameRequiredDescriptionDefault
idNo
wake_atYes
sleep_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full disclosure burden. It does well by disclosing the temporal model ('local time, no timezone'), the required format, the version gate, and validation rules; but it says nothing about what the optional id does (upsert/overwrite semantics), what happens on a duplicate date, or what a successful call returns.

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?

Two dense sentences with the core action first, followed by format and validation constraints. No filler, though the parenthetical version requirement interrupts the flow slightly and could be placed at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with zero annotations, no output schema, and three parameters at 0% schema coverage, the description covers the temporal semantics well but leaves the 'id' parameter and the result/duplicate behavior undefined. An agent can call it correctly for the common case but may misjudge idempotency.

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 0%, so the description must supply parameter meaning. It gives strong detail for sleep_at and wake_at (local time, no timezone, ISO-like example, ordering and future constraints) but the third parameter 'id' is never mentioned, leaving its purpose and interaction with existing records entirely undocumented.

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 and resource ('补一条睡眠记录' — add a sleep record), which is unambiguous against siblings like list_sleep or today_summary. It does not explicitly name the sibling to avoid, so it stops just short of a 5.

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

Usage Guidelines3/5

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

Preconditions are stated: the app must be version 3.8+, wake_at must be after sleep_at, and neither endpoint may be in the future. However, the description gives no explicit guidance on when to use this instead of list_sleep, or what to do when a record already exists for that date.

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