Skip to main content
Glama

get_sleep_cycles

Analyze sleep data to identify distinct sleep cycles by detecting gaps between sleep stages within specified time intervals.

Instructions

Return sleep cycles summarized from sleep stages.

Processes raw sleep data samples into sleep cycles by finding gaps in the sleep sample data within a specified time interval. Result timestamps will include time zones. Always translate timestamps to the user's local time zone when this is known.

Args: start_time: The starting timestamp (inclusive), as an ISO 8601 string or datetime object. end_time: The ending timestamp (exclusive), as an ISO 8601 string or datetime object. cycle_gap: Optional. Minimum time interval separating distinct cycles (e.g., "PT2H" for 2 hours). Defaults to server-side default if not provided. stages: Optional. Sleep stages to include. Defaults to all stages if not provided. gap_stages: Optional. Sleep stages to consider as gaps in sleep cycles. Defaults to server-side default if not provided. clip_to_range: Optional. Whether to clip the data to the requested date range. Defaults to True. Returns: A JSON string representing a pandas DataFrame containing the sleep cycle data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_timeYes
end_timeYes
cycle_gapNo
stagesNo
gap_stagesNo
clip_to_rangeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: processing logic (finding gaps in sleep data), timestamp handling (includes time zones, translation guidance), and output format (JSON string representing pandas DataFrame). However, it doesn't mention performance characteristics, error conditions, or authentication requirements.

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?

Well-structured with purpose statement, processing explanation, timestamp guidance, parameter documentation, and return format. The information is front-loaded and organized, though the parameter section is lengthy (necessary given 0% schema coverage). Every sentence serves a clear purpose.

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 complexity (6 parameters, processing logic) and the presence of an output schema, the description is quite complete. It explains the transformation logic, parameter semantics, and timestamp handling. The output schema handles return value details, so the description appropriately focuses on behavior and parameters. Minor gaps exist in error handling and performance context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing detailed parameter documentation in the Args section. Each of the 6 parameters is clearly explained with purpose, format examples, defaults, and optionality. This adds substantial value beyond the bare schema.

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 clearly states the tool's purpose: 'Return sleep cycles summarized from sleep stages' and explains the processing logic: 'Processes raw sleep data samples into sleep cycles by finding gaps in the sleep sample data within a specified time interval.' This is specific (verb+resource+processing method) and distinguishes it from sibling tools like get_metric_samples or get_workouts.

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 implied usage context through the processing explanation and timestamp handling guidance, but doesn't explicitly state when to use this tool versus alternatives. No sibling tool comparisons or explicit when-not-to-use guidance is provided, leaving usage decisions to inference.

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

Install Server

Other Tools

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/fulcradynamics/fulcra-context-mcp'

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