get_athlete
Retrieve athlete profile data with sport-specific zones and performance thresholds to analyze training metrics and personalize workout plans.
Instructions
Get athlete profile including sport zones and thresholds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:25-28 (handler)The main handler function for the 'get_athlete' tool. Decorated with @mcp.tool(), it returns athlete profile data by calling the _get() helper with the athlete endpoint.
@mcp.tool() def get_athlete() -> dict: """Get athlete profile including sport zones and thresholds.""" return _get(f"/athlete/{ATHLETE_ID}") - main.py:25-25 (registration)The @mcp.tool() decorator that registers get_athlete as an MCP tool.
@mcp.tool() - main.py:14-22 (helper)Helper functions used by get_athlete. _client() creates an httpx client with authentication, and _get() performs the actual HTTP GET request and returns JSON.
def _client() -> httpx.Client: return httpx.Client(auth=("API_KEY", API_KEY), base_url=BASE_URL) def _get(path: str, params: dict[str, Any] | None = None) -> Any: with _client() as client: r = client.get(path, params=params) r.raise_for_status() return r.json()