Skip to main content
Glama
rbctmz

mcp-server-strava

analyze_training_load

Analyze training load from Strava activities to monitor workout intensity and optimize athletic performance.

Instructions

Анализ тренировочной нагрузки

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activitiesYes

Implementation Reference

  • The core handler function for the analyze_training_load MCP tool. Decorated with @mcp.tool() for automatic registration. Computes summary statistics including total distance, time, activity types distribution, and heart rate zone breakdown from a list of Strava activities.
    @mcp.tool()
    def analyze_training_load(activities: List[Dict]) -> Dict:
        """Анализ тренировочной нагрузки"""
        if not activities:
            return {
                "error": "Нет активностей для анализа",
                "activities_count": 0
            }
        summary = {
            "activities_count": len(activities),
            "total_distance": 0,
            "total_time": 0,
            "activities_by_type": {},
            "heart_rate_zones": {
                "easy": 0,  # ЧСС < 120
                "medium": 0,  # ЧСС 120-150
                "hard": 0,  # ЧСС > 150
            },
        }
    
        for activity in activities:
            activity_type = activity.get("type")
    
            # Обновляем счетчик типа активности
            if activity_type not in summary["activities_by_type"]:
                summary["activities_by_type"][activity_type] = 0
            summary["activities_by_type"][activity_type] += 1
    
            # Суммируем дистанцию и время
            summary["total_distance"] += activity.get("distance", 0)
            summary["total_time"] += activity.get("moving_time", 0)
    
            # Анализируем зоны ЧСС
            hr = activity.get("average_heartrate", 0)
            if hr:
                if hr < 120:
                    summary["heart_rate_zones"]["easy"] += 1
                elif hr < 150:
                    summary["heart_rate_zones"]["medium"] += 1
                else:
                    summary["heart_rate_zones"]["hard"] += 1
    
        # Конвертируем единицы измерения
        summary["total_distance"] = round(summary["total_distance"] / 1000, 2)  # в километры
        summary["total_time"] = round(summary["total_time"] / 3600, 2)  # в часы
    
        return summary
  • src/server.py:401-401 (registration)
    The @mcp.tool() decorator registers the analyze_training_load function as an MCP tool.
    @mcp.tool()
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. It doesn't indicate whether this is a read or write operation, what permissions might be required, whether it's computationally intensive, what format the analysis takes, or any behavioral characteristics. The single Russian phrase provides zero behavioral context beyond the literal meaning of 'analysis'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While technically concise with just two Russian words, this represents under-specification rather than effective conciseness. The description is too brief to be useful - it doesn't front-load important information or provide any meaningful structure. Every sentence should earn its place, but here there's essentially no content to evaluate for efficiency.

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

Completeness1/5

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

Given the complexity (analysis tool with object array input), no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It doesn't explain what the tool does, how to use it, what input it expects, what output it produces, or how it differs from sibling tools. For an analysis tool with complex input, this minimal description fails to provide necessary context.

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

Parameters1/5

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

The schema has 0% description coverage for its single parameter 'activities', and the tool description provides absolutely no information about what this parameter should contain. With a complex array of objects parameter, the description fails to explain what activities data is expected, what fields they should have, or how the analysis uses this input. The description adds zero value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Анализ тренировочной нагрузки' is a tautology that essentially restates the tool name 'analyze_training_load' in Russian. It doesn't specify what analysis is performed, what resource is analyzed, or how this differs from sibling tools like 'analyze_activity'. The description provides minimal value beyond the tool name itself.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance about when to use this tool versus alternatives. With sibling tools like 'analyze_activity', 'get_activity_by_id', and 'get_activity_recommendations', there's no indication of when this training load analysis tool is appropriate versus those other analysis/retrieval tools. No context, exclusions, or alternatives are mentioned.

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/rbctmz/mcp-server-strava'

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