Skip to main content
Glama

resolve_supported_strength_exercise

Look up supported strength exercises by query. Returns matching Garmin exercises for building strength workouts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function that exposes 'resolve_supported_strength_exercise' as a @mcp.tool. It delegates to resolve_strength_exercise from payloads.py.
    def resolve_supported_strength_exercise(query: str) -> dict:
        return resolve_strength_exercise(query)
  • The core resolve_strength_exercise function that performs alias lookup and fuzzy matching. First tries an exact normalized match against EXERCISE_ALIAS_MAP, then falls back to difflib.get_close_matches for suggestions.
    def resolve_strength_exercise(value: str) -> dict[str, Any]:
        normalized = _normalize_text(value)
        direct = EXERCISE_ALIAS_MAP.get(normalized)
        if direct:
            return {
                "query": value,
                "normalizedQuery": normalized,
                "matched": True,
                "mapping": direct,
                "suggestions": [],
            }
        suggestions = difflib.get_close_matches(normalized, EXERCISE_ALIAS_MAP.keys(), n=5, cutoff=0.5)
        return {
            "query": value,
            "normalizedQuery": normalized,
            "matched": False,
            "mapping": None,
            "suggestions": [
                {"alias": alias, "mapping": EXERCISE_ALIAS_MAP[alias]}
                for alias in suggestions
            ],
        }
  • Helper that normalizes a string by lowercasing, stripping, replacing hyphens/underscores with spaces, and collapsing whitespace.
    def _normalize_text(value: str) -> str:
        return " ".join(value.strip().lower().replace("-", " ").replace("_", " ").split())
  • The EXERCISE_ALIAS_MAP dictionary that maps normalized user-friendly names to Garmin exercise categories and exercise names.
    EXERCISE_ALIAS_MAP = {
        "bench press": {"category": "BENCH_PRESS", "exerciseName": "BENCH_PRESS"},
        "flat db press": {"category": "BENCH_PRESS", "exerciseName": "DUMBBELL_BENCH_PRESS"},
        "dumbbell bench press": {"category": "BENCH_PRESS", "exerciseName": "DUMBBELL_BENCH_PRESS"},
        "incline db press": {"category": "BENCH_PRESS", "exerciseName": "INCLINE_DUMBBELL_BENCH_PRESS"},
        "incline dumbbell bench press": {"category": "BENCH_PRESS", "exerciseName": "INCLINE_DUMBBELL_BENCH_PRESS"},
        "hack squat": {"category": "SQUAT", "exerciseName": "BARBELL_HACK_SQUAT"},
        "leg press": {"category": "SQUAT", "exerciseName": "LEG_PRESS"},
        "romanian deadlift": {"category": "DEADLIFT", "exerciseName": "BARBELL_STRAIGHT_LEG_DEADLIFT"},
        "rdl": {"category": "DEADLIFT", "exerciseName": "BARBELL_STRAIGHT_LEG_DEADLIFT"},
        "seated hamstring curl": {"category": "LEG_CURL", "exerciseName": "LEG_CURL"},
        "leg curl": {"category": "LEG_CURL", "exerciseName": "LEG_CURL"},
        "leg extension": {"category": "CRUNCH", "exerciseName": "LEG_EXTENSIONS"},
        "leg extensions": {"category": "CRUNCH", "exerciseName": "LEG_EXTENSIONS"},
        "t bar row": {"category": "ROW", "exerciseName": "T_BAR_ROW"},
        "seated cable row": {"category": "ROW", "exerciseName": "SEATED_CABLE_ROW"},
        "row": {"category": "ROW", "exerciseName": "ROW"},
        "lat pulldown": {"category": "PULL_UP", "exerciseName": "LAT_PULLDOWN"},
        "wide grip lat pulldown": {"category": "PULL_UP", "exerciseName": "WIDE_GRIP_LAT_PULLDOWN"},
        "pull up": {"category": "PULL_UP", "exerciseName": "PULL_UP"},
        "seated db shoulder press": {"category": "SHOULDER_PRESS", "exerciseName": "SEATED_DUMBBELL_SHOULDER_PRESS"},
        "shoulder press": {"category": "SHOULDER_PRESS", "exerciseName": "SHOULDER_PRESS"},
        "ez bar skull crusher": {"category": "TRICEPS_EXTENSION", "exerciseName": "LYING_EZ_BAR_TRICEPS_EXTENSION"},
        "skull crusher": {"category": "TRICEPS_EXTENSION", "exerciseName": "LYING_EZ_BAR_TRICEPS_EXTENSION"},
        "ez bar curl": {"category": "CURL", "exerciseName": "STANDING_EZ_BAR_BICEPS_CURL"},
        "db bicep curl": {"category": "CURL", "exerciseName": "STANDING_ALTERNATING_DUMBBELL_CURLS"},
        "dumbbell curl": {"category": "CURL", "exerciseName": "STANDING_ALTERNATING_DUMBBELL_CURLS"},
        "db lateral raise": {"category": "LATERAL_RAISE", "exerciseName": "LEANING_DUMBBELL_LATERAL_RAISE"},
        "dumbbell lateral raise": {"category": "LATERAL_RAISE", "exerciseName": "LEANING_DUMBBELL_LATERAL_RAISE"},
        "seated calf raise": {"category": "CALF_RAISE", "exerciseName": "SEATED_CALF_RAISE"},
        "cable crunch": {"category": "CRUNCH", "exerciseName": "KNEELING_CABLE_CRUNCH"},
        "crunch": {"category": "CRUNCH", "exerciseName": "CRUNCH"},
    }
  • Registration of the tool via the @mcp.tool decorator, which registers it with the FastMCP server (same as the handler location).
    @mcp.tool
    def resolve_supported_strength_exercise(query: str) -> dict:
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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?

Tool has no description.

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?

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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?

Tool has no description.

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/pranciskus/garmin-workouts-mcp'

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