Skip to main content
Glama

search_records

Find days when a health metric crossed a threshold. For cumulative metrics, filters on daily total; for rate metrics, filters on daily average. Results sorted highest to lowest to surface outliers.

Instructions

Find days where a health metric crossed a threshold. For cumulative metrics (steps, calories) filters on daily total. For rate metrics (HRV, heart rate) filters on daily average.

Examples:

  • All days with HRV below 40ms: metric_type='HKQuantityTypeIdentifierHeartRateVariabilitySDNN', max_value=40

  • Days with 10k+ steps: metric_type='HKQuantityTypeIdentifierStepCount', min_value=10000

  • Nights under 6 hours sleep (360 min): metric_type='HKCategoryTypeIdentifierSleepAnalysis', max_value=360

Results sorted highest-to-lowest so outliers surface first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metric_typeYes
daysNo
min_valueNo
max_valueNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description carries full burden. It explains behavior for cumulative vs. rate metrics and sorting, but lacks details on auth, rate limits, or potential no-match scenarios. Adequate but not comprehensive.

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?

Concise, well-structured: summary, differentiation of metric types, examples, and sorting behavior. Every sentence adds value with no 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 5 parameters and threshold-based filtering, description covers key aspects. Output schema exists, so return values are handled. Could include handling of no matches, but overall complete.

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

Parameters4/5

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

Schema description coverage is 0%, so description compensates well. It explains min_value/max_value as thresholds and provides examples for metric_type. Does not fully detail days and limit, but clarifies defaults and usage.

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 finds days where a health metric crossed a threshold, and distinguishes between cumulative and rate metrics. This is specific and distinct from siblings like get_metric_stats or query_metric.

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?

Provides clear examples of when to use it (e.g., days with HRV below 40ms). Lacks explicit guidance on when not to use it or alternatives, but the context of threshold crossing is well-defined.

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/jefflitt1/health4ai'

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