Skip to main content
Glama

query_workout_series

Read-onlyIdempotent

Retrieve a cached, auto-downsampled heart-rate curve and summary statistics for one workout_id from query_workouts.

Instructions

Read an auto-downsampled heart-rate curve for one workout_id obtained from query_workouts (contract agent-safe-series/v1). Uses all cached heart-rate sample types inside the workout window. Returns data with numeric t offsets in seconds from start_time, bpm values, downsampled/source_points/returned_points/method and full-resolution summary statistics. resolution defaults to 60 seconds and increases to respect max_points (default 400, hard cap 500). Pass the same reference_max_hr in bpm for comparable time_in_zone across activities; otherwise each workout uses its own maximum, so zones are not comparable. Unknown workout IDs or unsupported metrics return status=error. For raw date-range samples use query_heart_rate. Read-only local SQLite query; no cloud request or automatic sync. Requires a configured local account/cache. Returns JSON text with status, source=cache, generated_at and data; empty lists mean no cached matches, not zero measurements. Use get_data_coverage to inspect availability or sync_data to refresh with user consent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricNoOnly heart_rate is supported; values are beats per minute (bpm).heart_rate
max_pointsNoRequested maximum returned points (default 400, 1..500); server also clamps direct service calls to this range.
resolutionNoRequested bucket duration in seconds (default 60, at least 1); automatically increased to fit max_points.
workout_idYesExact workout_id returned by query_workouts for this account; do not invent an ID.
reference_max_hrNoOptional positive reference maximum heart rate in bpm for zone normalization; use the same value across compared workouts. Omit to use this workout maximum.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotent/non-destructive, but the description adds substantial context beyond them: local SQLite only, no cloud request or automatic sync, requires a configured local account/cache, error status for unknown workout IDs, and the important caveat that empty lists mean no cached matches rather than zero measurements. The downsampling/clamping behavior and the 500-point hard cap are also disclosed.

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?

Front-loads the core purpose in the first sentence, then layers contract, semantics, and caveats. It is dense and long, but nearly every clause carries operational information; a few items (contract string, source=cache) are borderline overhead.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description enumerates the returned fields (t offsets, bpm, downsampled/source_points/returned_points/method, summary statistics) and the envelope (status, source, generated_at, data). For a read tool with five parameters and no output schema, nothing material is missing.

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 coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: the resolution/max_points interaction ('resolution defaults to 60 seconds and increases to respect max_points') and the cross-activity comparability rationale for reference_max_hr. These go beyond the per-field schema text.

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?

States a specific verb+resource ('Read an auto-downsampled heart-rate curve for one workout_id') and scopes it to a single workout rather than a date range, which distinguishes it from query_heart_rate and query_metric_series. It also names the contract identifier, so an agent can identify the exact operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: 'For raw date-range samples use query_heart_rate', 'Use get_data_coverage to inspect availability or sync_data to refresh with user consent'. It also gives the conditional rule for reference_max_hr (pass the same value for comparable time_in_zone, omit otherwise), which is real when-to-use guidance.

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