Skip to main content
Glama

create-workout

Upload structured workout data to Garmin Connect. Create custom workouts using JSON with support for steps, intervals, and target zones.

Instructions

Upload a workout from JSON data.

Creates a new workout in Garmin Connect from structured workout data.

IMPORTANT: Step types must use Garmin's DTO format:

  • Use "ExecutableStepDTO" for regular steps (warmup, interval, cooldown, recovery)

  • Use "RepeatGroupDTO" for repeat/interval groups with numberOfIterations

IMPORTANT: For heart rate zone targets, use "zoneNumber" (1-5), NOT targetValueOne/targetValueTwo. targetValueOne/targetValueTwo are only for absolute value ranges (e.g. pace in m/s, power in watts).

Sport type IDs: 1=running, 2=cycling, 3=swimming, 4=walking, 5=strength_training, 6=fitness_equipment, 7=hiking. Step type IDs: warmup (1), cooldown (2), interval (3), recovery (4), rest (5). End condition IDs: time (2, value in seconds), distance (3, value in meters), lap.button (7, no value), reps (10, value = rep count — use for strength exercises). Target type IDs: no.target (1), speed (2, m/s range via targetValueOne/targetValueTwo), heart.rate.zone (4, use zoneNumber 1-5), power.zone (11, use zoneNumber).

Available Templates: Instead of building workout JSON from scratch, use these MCP resources as starting points:

  • workout://templates/simple-run - Basic warmup/run/cooldown structure

  • workout://templates/interval-running - Interval training with repeat groups

  • workout://templates/tempo-run - Tempo run with heart rate zone targets

  • workout://templates/strength-circuit - Strength training circuit structure

  • workout://reference/structure - Complete JSON structure reference with all fields

Access these resources using your MCP client's resource reading capability, modify the template as needed, and pass the resulting JSON as the workout parameter.

Example workout structure with HR zone target: { "workoutName": "My Workout", "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSegments": [{ "segmentOrder": 1, "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSteps": [{ "type": "ExecutableStepDTO", "stepOrder": 1, "stepType": {"stepTypeId": 3, "stepTypeKey": "interval"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 1200.0, "targetType": {"workoutTargetTypeId": 4, "workoutTargetTypeKey": "heart.rate.zone"}, "zoneNumber": 3 }] }] }

Example with RepeatGroupDTO for intervals: { "workoutName": "Interval Run", "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSegments": [{ "segmentOrder": 1, "sportType": {"sportTypeId": 1, "sportTypeKey": "running"}, "workoutSteps": [ { "type": "ExecutableStepDTO", "stepOrder": 1, "stepType": {"stepTypeId": 1, "stepTypeKey": "warmup"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 600.0, "targetType": {"workoutTargetTypeId": 1, "workoutTargetTypeKey": "no.target"} }, { "type": "RepeatGroupDTO", "stepOrder": 2, "numberOfIterations": 6, "workoutSteps": [ { "type": "ExecutableStepDTO", "stepOrder": 1, "stepType": {"stepTypeId": 3, "stepTypeKey": "interval"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 60.0, "targetType": {"workoutTargetTypeId": 4, "workoutTargetTypeKey": "heart.rate.zone"}, "zoneNumber": 5 }, { "type": "ExecutableStepDTO", "stepOrder": 2, "stepType": {"stepTypeId": 4, "stepTypeKey": "recovery"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 90.0, "targetType": {"workoutTargetTypeId": 4, "workoutTargetTypeKey": "heart.rate.zone"}, "zoneNumber": 2 } ] }, { "type": "ExecutableStepDTO", "stepOrder": 3, "stepType": {"stepTypeId": 2, "stepTypeKey": "cooldown"}, "endCondition": {"conditionTypeId": 2, "conditionTypeKey": "time"}, "endConditionValue": 600.0, "targetType": {"workoutTargetTypeId": 1, "workoutTargetTypeKey": "no.target"} } ] }] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workoutYesJSON string of the workout object to create
Behavior3/5

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

Without annotations, the description carries full burden. It discloses that the tool creates a workout (write operation) and explains the precise input format. However, it does not mention what the tool returns (e.g., created workout ID) or any error behavior, leaving some behavioral aspects unclear.

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?

The description is long but well-structured: purpose, important notes, ID tables, template references, and examples. The length is justified by the complexity of the input format. It is front-loaded with key instructions and organized for readability.

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?

Given the single parameter and no output schema, the description thoroughly addresses the input format, supports with examples and templates, and lists necessary IDs. However, it lacks description of the tool's return value (e.g., confirmation or identifier), which would improve completeness.

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

Parameters5/5

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

The schema describes the single parameter 'workout' simply as 'JSON string of the workout object to create'. The tool description adds immense value by detailing the required JSON structure, DTO types, ID mappings, and providing complete examples. This goes far beyond the schema's minimal description.

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?

The description clearly states the tool's purpose: 'Upload a workout from JSON data. Creates a new workout in Garmin Connect from structured workout data.' This specific verb+resource combination distinguishes it from sibling tools like check-session, delete-workout, get-workout, etc.

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?

The description provides detailed usage context, including required JSON format, DTO types, IDs, and references to available templates as starting points. It implicitly suggests that the tool is for creation rather than other operations, but does not explicitly compare with alternatives like schedule-workout or update-workflow (if such exists).

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/etweisberg/garmin-connect-mcp'

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