Skip to main content
Glama
PhilipAD

Health Export AI

by PhilipAD

get_sleep_sessions

Read-onlyIdempotent

Retrieve clustered sleep sessions from Apple Health for specific waking days, with start/end/day filters, to ensure sleep data matches the daily cache for consistent analysis.

Instructions

Clustered sleep sessions from health-sessions.json with {start, end, day} filters. Sessions are attributed to the WAKING day, matching the daily cache's sleep_analysis, so the two surfaces never disagree; a split night appears as multiple sessions with the same day, returned as-is. Timestamps carry the local UTC offset at the time of the sample.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dayNoA single waking day, YYYY-MM-DD.
endNoLast waking day (inclusive), YYYY-MM-DD.
startNoFirst waking day (inclusive), YYYY-MM-DD.
Behavior5/5

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

The description discloses non-obvious behavioral traits: sessions are attributed to the waking day, split nights appear as multiple sessions with the same day, and timestamps include the local UTC offset. These go well beyond the readOnly and idempotent annotations, giving the agent a precise model of how results are shaped and time-zone sensitive. No contradictions exist with 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?

The description is three sentences, tightly packed with functional and behavioral details. It front-loads the core purpose then expands on subtle behaviors. Every clause earns its place, and there is no fluff or repeated schema content.

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 read-only retrieval tool with no output schema, the description explains the session clustering and timezone handling. However, it does not mention the list of returned fields, ordering, or pagination. Despite the strong behavioral context, the absence of an output schema means the agent still lacks a complete picture of the result shape.

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?

The schema already documents all three parameters with inclusive explicit date range semantics (YYYY-MM-DD) at 100% coverage. The description only references them generically as filters, adding no new details beyond what the schema states. Thus the baseline score of 3 is appropriate.

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 specific verb, resource, and scope: 'Clustered sleep sessions from health-sessions.json with {start, end, day} filters.' It clearly distinguishes this tool from siblings like get_workouts or get_health_metrics by focusing on sleep sessions and their clustered/aggregated nature. The additional context about waking-day attribution and split nights makes the tool's uniqueness explicit.

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 description gives clear context on when the tool applies: it filters sleep sessions by start/end/day, and aligns with the daily cache's sleep_analysis. However, it does not explicitly name alternative tools or say when not to use it, leaving some inference to the agent. The clear domain coverage earns a 4 rather than a 5.

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/PhilipAD/health-export-mcp'

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