Skip to main content
Glama

List nights

list_nights
Read-onlyIdempotent

One row per night, keyed by the morning it ended on: bed and wake times, and seconds asleep and in each stage. With several devices, the longest sleep is the night. get_night has the stages.

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

Input Schema

NameRequiredDescriptionDefault
toNoLast day, inclusive. Omitted: today in the account time zone.
fromNoFirst day, inclusive. Omitted: 365 days before `to`, the most one call covers. For older rows, call again with an earlier `to`.
limitNoRows per page, 1 to 500.
clientNoFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
cursorNoThe cursor from the previous page, to continue.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (read-only, idempotent, non-destructive), so the bar is low. The description still adds non-obvious behavior: when multiple devices report, "the longest sleep is the night" — a deduplication rule an agent could not infer from the schema or annotations.

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?

Three short sentences, all substantive: row shape first, then the device-dedup caveat, then the sibling pointer. No filler and no repetition of schema content.

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 no output schema, the description carries the return-shape burden and does so (per-night rows with times and stage seconds), plus the dedup rule and pagination handled by the schema. Only minor gaps remain, such as result ordering or empty-range behavior.

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 five parameters (from/to/limit/client/cursor) are already documented in the schema, including the 365-day default window and pagination. The description adds no parameter meaning beyond that, which is exactly the baseline case.

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?

"One row per night, keyed by the morning it ended on" gives a specific verb, resource, and row-granularity rule, then enumerates the returned fields (bed/wake times, seconds asleep and per stage). It also explicitly distinguishes itself from get_night, so an agent can pick between them without reading either 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?

It names the sibling alternative (get_night) for detailed stage breakdowns, which is genuine routing guidance. It does not state exclusions or prerequisites such as typical date-window intent, but the usage context is clear.

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