Skip to main content
Glama

Analyze performance

analyze_performance
Read-onlyIdempotent

Compute running performance from recorded activities with fixed rules (no AI): a metric such as 5K best time, tempo or Zone 2 average pace, long-run distance or interval count, over the last period_days and the window before it, for the connected account, one athlete or a group. Group scope ranks members and supports most-improved or top-K questions through trend_filter, sort_by and top_k. A coach with one group may omit group_id; with several, the result has status needs_group_choice with the group names and ids. Names in athlete_names that match no one or several members are reported while the rest are analysed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_performance"
  }
}

Input Schema

NameRequiredDescriptionDefault
zoneNoKeep runs whose average heart rate fell in this zone.
scopeNoself: the connected account; athlete: athlete_id; group: group_id or the coach's group; auto: group when group_id is given, else athlete, else self.self
top_kNoRanked rows to keep; 0 or omitted keeps all.
measureNoWhat to compute over the matching runs; default best_time.
sort_byNoRanking order; a measure name sorts by current_value.
group_idNoA group id from get_team_overview; a coach with one group may omit it.
athlete_idNoAthlete scope: the athlete's user id (get_coach_athletes, find_athlete).
metric_keyNoA preset metric; it sets the filters and measure. Omit to build one.
metric_hintNoThe question in plain words, used when no metric_key fits.
period_daysNoTrailing days analysed, 1-180.
trend_filterNoKeep only athletes whose trend has this direction (group scope).
athlete_namesNoGroup scope: only members with these names.
member_filterNoGroup scope: only these member user ids.
heart_rate_maxNoAverage heart-rate bound in bpm.
heart_rate_minNoAverage heart-rate bound in bpm.
sort_directionNoRanking direction; the default follows the measure.
pace_max_secondsNoPace bound in seconds per kilometre.
pace_min_secondsNoPace bound in seconds per kilometre.
activity_sub_typesNoRun types to include, for example easy_run, long_run, tempo, threshold, interval or recovery; related spellings are grouped.
compare_to_previousNoAlso analyse the preceding window of the same length.
distance_max_metersNoRun distance bound in metres.
distance_min_metersNoRun distance bound in metres.
min_current_samplesNoLeave out athletes with fewer runs in the window.

Output Schema

NameRequiredDescriptionDefault
errorNo
scopeNo
groupsNo
metricNo
statusNo
messageNo
privacyNoPresent when the athlete's settings withhold data.
summaryNo
group_idNo
insightsNo
warningsNo
next_stepNoWhat can be done next, for example after a failure.
athlete_idNo
text_tableNoThe member rows as a plain-text table.
member_rowsNo
next_cursorNoReads the next page; null on the last page.
reason_codeNo
total_weeksNo
user_contentNoFields in this result that people wrote.
data_coverageNo
subject_labelNoThe athlete or group analysed.
weeks_returnedNo
ambiguous_namesNo
applied_filtersNo
truncated_fieldsNoLists cut to fit one response: rows returned and total.
unresolved_namesNo
comparison_windowNo
generated_contentNoFields in this result that NexRex's AI wrote.
invalid_athlete_idsNo
session_definitionsNoSessions that several rows of this result share by session_ref.
content_block_fieldsNoColumn names of every content_blocks row, nested blocks rows included.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / content_block_fields / description
      Previous value: -"Column names of every content_blocks row."New value: +"Column names of every content_blocks row, nested blocks rows included."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavior beyond them: deterministic fixed rules with no AI, automatic comparison against the preceding equal-length window, group ranking of members, and a needs_group_choice status contract. It also discloses that unmatched or ambiguous athlete_names are reported while the remainder is still analysed — partial-failure semantics an agent could not infer from the schema.

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?

Four sentences, front-loaded with purpose before scope and group-selection rules, with no filler or restatement of the title. The first sentence is clause-heavy, stacking four example metrics plus the window definition, which makes it denser than necessary for an opening line.

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?

For a 23-parameter tool with full schema coverage, rich annotations, and an output schema, the description covers the decisions an agent must make: scope, group disambiguation, ranking controls, and the comparison window. It leaves metric_hint (plain-language question, used when no metric_key fits) unexplained and does not state what the response shape looks like beyond the needs_group_choice status, so a small gap remains.

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?

Schema coverage is 100%, so the schema already documents every parameter including defaults and enums, making 3 the baseline. The description adds modest semantic glue — that metric_key presets set both filters and measure, and that trend_filter/sort_by/top_k drive group ranking — but says nothing about metric_hint fallback behavior, how scope 'auto' resolves against the presence of a preset, or how filters interact with a chosen metric_key.

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 and resource — "Compute running performance from recorded activities with fixed rules (no AI)" — and immediately narrows the metric space (5K best time, tempo/Zone 2 pace, long-run distance, interval count) plus the time basis (period_days and the preceding window). This is enough for an agent to distinguish it from reporting tools like get_coach_weekly_report or get_activities without opening the schema.

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?

Gives concrete selection rules for scope: connected account, one athlete, or a group, with the explicit note that a coach with one group may omit group_id and that multiple groups yield status needs_group_choice with names and ids. It does not name any sibling tool as an alternative or state when another analysis tool should be preferred, so it stops short of full when/when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources