Skip to main content
Glama

Fitbit Sleep Logs

fitbit_list_sleep
Read-onlyIdempotent

Retrieve Fitbit sleep logs using date filters, pagination, and privacy modes. Get structured sleep data for analysis or review.

Instructions

List Fitbit sleep logs. Supports before/after cursor, pagination and privacy modes. Requires sleep scope. Not medical advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoFitbit page number.
afterNoReturn records after this calendar date. Converted to Fitbit afterDate; mutually exclusive with before.
limitNoFitbit per_page value. Fitbit allows up to 200.
beforeNoReturn records before this calendar date. Converted to Fitbit beforeDate; mutually exclusive with after.
all_pagesNoFetch multiple pages up to max_pages.
max_pagesNoMaximum pages to fetch when all_pages is true.
privacy_modeNoOptional per-call privacy override. Defaults to FITBIT_PRIVACY_MODE or structured. raw returns upstream Fitbit JSON. summary removes GPS/map details.
response_formatNomarkdown
explicit_user_intentNoRequired true when privacy_mode=raw or include_gps=true (agent escalation of redaction).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
recordsYes
endpointYes
has_moreYes
next_pageNo
privacy_modeYes
pages_fetchedYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.6.3
    • changedInput schema / properties / after / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"New value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    • changedInput schema / properties / before / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"New value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
  2. Changed2 schema fields changedv0.4.11
    • addedInput schema / properties / explicit_user_intent
      Added value: +{
      +  "description": "Required true when privacy_mode=raw or include_gps=true (agent escalation of redaction).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / privacy_mode / description
      Previous value: -"Optional per-call privacy override. Defaults to FITBIT_PRIVACY_MODE or structured. raw returns upstream Fitbit JSON. summary minimizes sensitive health and profile details."New value: +"Optional per-call privacy override. Defaults to FITBIT_PRIVACY_MODE or structured. raw returns upstream Fitbit JSON. summary removes GPS/map details."
  3. Changed2 schema fields changedv0.4.6
    • changedInput schema / properties / after / description
      Previous value: -"Only return activities after this time. Converted to Fitbit epoch seconds."New value: +"Return records after this calendar date. Converted to Fitbit afterDate; mutually exclusive with before."
    • changedInput schema / properties / before / description
      Previous value: -"Only return activities before this time. Converted to Fitbit epoch seconds."New value: +"Return records before this calendar date. Converted to Fitbit beforeDate; mutually exclusive with after."
  4. First observedv0.4.5

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already cover read-only, idempotent, non-destructive behavior, so the description is not required to repeat those. It does add the auth requirement ('Requires sleep scope') and a disclaimer ('Not medical advice'), which are useful beyond annotations. However, it does not describe pagination behavior or privacy mode nuances beyond what the schema already covers, so the added value is moderate.

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?

The description is three short sentences, front-loading the purpose ('List Fitbit sleep logs') before adding supporting details. Every sentence adds value—scope, pagination/privacy, and prerequisites/disclaimer. No fluff or redundancy.

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?

Given the tool's complexity (9 optional parameters) and the presence of an output schema, the description covers the essential points: what it lists, key capabilities, and the required scope. It does not explain return format, but the output schema covers that. It is adequately complete for an agent to understand the tool's role and basic invocation.

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?

With 89% schema description coverage, the schema already documents parameters thoroughly. The description only summarizes features like 'before/after cursor, pagination and privacy modes' without adding detail not already in the parameter descriptions. This meets the baseline for high coverage, but adds little beyond a high-level overview.

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?

The description states a clear action ('List') and resource ('Fitbit sleep logs'), which is specific and distinguishes it from sibling tools like fitbit_get_sleep_day that target a single day. It also hints at the tool's scope (sleep logs vs other data types), leaving no ambiguity about what it does.

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?

The description provides context ('Requires sleep scope') but does not explicitly state when to use this tool over alternatives. It implies listing multiple logs versus getting a single day's data, but no explicit exclusion or alternative routing is given. Sibling names suggest the distinction, but the description itself lacks direct guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/davidmosiah/fitbit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server