FastAPI-based coaching analysis server that processes athlete training data from Intervals.icu, performs multi-tier audits (Tier-0 through Tier-3), computes derived metrics, and generates semantic JSON coaching reports.
This server exhibits severe definition quality issues across nearly all 20 tools. Tool names lack action verbs (run_report, run_tier0_pre_audit, run_tier1_controller, run_espe, run_adaptive_decision_engine, run_future_forecast are generic 'run_*' patterns). Descriptions are present but vague and lack LLM-actionable guidance on WHEN to use each tool vs. alternatives. Input schemas are visible but critically incomplete: most parameters lack type definitions (e.g., 'context' object params have no nested schema, 'df_activities' and 'df_events' are typed as 'object' with no field documentation). Output schemas are entirely undocumented, no tool declares what it returns. Parameters like 'context' and 'df_*' are opaque; LLMs cannot reason about their structure. Error handling is absent from all tool definitions. The sanitize() and normalize_prefetched_context() functions are utility helpers, not properly registered MCP tools with schemas. Overall, this reads as internal Python code exposed via FastAPI, not a production-grade MCP server.
Semantic JSON builder: constructs semantic graph representation of coaching report from context and computed metrics.
Tier-2 derived metrics: computes ACWR, Monotony, Strain, Polarisation, LoadVariabilityIndex, and other coaching-specific metrics from daily load data.
Tier-2 extended metrics: computes additional performance metrics including zone distributions, intensity analysis, and power curve metrics.
Tier-3 performance intelligence: generates advanced performance insights, trend analysis, and predictive coaching recommendations.
Tier-2 enforcement: computes canonical totalHours and totalTss from validated event data, ensures totals match raw Tier-0 data, and injects authoritative metrics into context.
Report schema guard: validates report structure against framework schema, ensures all required sections and keys are present.
Generic 'run_*' naming pattern (run_report, run_tier0_pre_audit, run_espe, run_adaptive_decision_engine, run_future_forecast) violates verb_noun convention. LLMs cannot infer intent from 'run' alone; these should be 'analyze_report', 'validate_tier0_data', 'estimate_event_readiness', 'generate_coaching_decisions', 'forecast_training_load'.
Input schemas critically incomplete: 'context' parameter typed as 'object' with no nested field documentation across 15+ tools. 'df_activities', 'df_events', 'df_daily', 'df_wellness' are opaque DataFrames with no schema. LLMs cannot reason about required fields or structure.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 28 | <=2025-11-25 | v2 |
Event readiness estimation: estimates target-event CTL/ATL using calendar-derived daily EWMA, seeds from latest valid calendar state, applies planned load on intervening days, and advances to event-day sunrise.
Tier-2 actions: evaluates coaching actions and recommendations based on computed metrics, training load, adaptation status, and athlete profile.
Athlete profile mapper: normalizes Intervals.icu athlete object into canonical athlete profile with identity, physiology, FTP, zones, and derived metrics.
Prefetch normalizer: normalizes prefetched payload from Cloudflare into local Python Tier-0 shape, validates athlete profile, detects STRAVA API stubs, and returns normalized context.
Template renderer: generates final report output in specified format (markdown, semantic JSON, etc.) from context and computed metrics.
Tier-3 adaptive decision engine: generates context-aware coaching decisions and recommendations based on athlete state, training load, and performance trends.
Tier-3 ESPE (Event-Specific Performance Estimation): estimates athlete readiness and performance metrics for upcoming calendar events.
Tier-3 future forecast: projects future training load, adaptation, and performance based on historical patterns and planned calendar events.
Centralized execution for all endpoints: Runs Tier-0 → Tier-1 → Tier-2 → Renderer. Returns (report, compliance, logs, context, semantic_graph). Supports multiple report types (weekly, summary, custom) with configurable audit modes, render modes, and output formats.
Tier-0 pre-audit: normalizes prefetched data into canonical format, validates athlete profile, detects STRAVA API stubs, fetches activities and wellness data with retry logic, applies timezone normalization, and returns normalized dataframes and context.
Tier-1 integrity controller: validates activity data schema, enforces numeric column types, detects and handles data quality issues, applies corrections, and returns validated dataframes.
Data sanitizer: recursively sanitizes objects for JSON serialization, handles pandas DataFrames/Series, numpy types, datetime objects, NaN/inf values, and circular references.
Tier-2 event completeness validation: validates calendar events against activity data, ensures event dates have corresponding activities, detects missing or incomplete event data, and returns validated event and daily summary dataframes.
Report validator: performs structural and logical validation of rendered reports against Unified Reporting Framework v5.1 specification.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required fields. E.g., run_report returns '(report, compliance, logs, context, semantic_graph)' but no schema defines these fields' types or structure.
No error handling guidance in any tool definition. No recovery hints, retryability classification, or actionable error messages. E.g., 'Athlete profile missing or invalid' error in normalize_prefetched_context() is hardcoded in Python, not exposed via tool schema.
Tool definitions appear inferred from code comments and function signatures, not explicitly registered via MCP protocol. No evidence of tool registration with capabilities, inputSchema, or outputSchema in FastAPI route handlers. sanitize() and normalize_prefetched_context() are utility functions, not MCP tools.