Skip to main content
Glama
Loopback Training Server

Loopback Training Server

create_workout

Build a structured workout with interval blocks, goals, and pace or heart-rate alerts, then queue it to appear on the athlete's Apple Watch after the iPhone app syncs.

Instructions

Create a structured workout and queue it for the user's Apple Watch.

Full WorkoutKit support: repeatable interval blocks, warmup/cooldown steps, goals (distance / time / energy / open), and an optional per-step ALERT that coaches effort on the watch — pace/speed range, heart-rate range (BPM), heart-rate ZONE (1-5), cadence, or running power. E.g. a Zone 2 base run is a single time- or distance-goal step with alert {"type": "heartRateZone", "zone": 2}. WorkoutKit allows one alert per step.

The exact structure of blocks/steps/goals/alerts is defined in this tool's input schema. The workout appears on the watch after the iPhone app syncs.

Args: activity_type: Sport for the WorkoutKit session. display_name: Name shown on Apple Watch (e.g. "6x400m Intervals", "Tempo Run"). location: Where the workout happens (affects GPS). scheduled_date: When the workout should appear, ISO 8601 (e.g. "2026-03-18T07:00:00Z"). blocks: Interval blocks, each repeated iterations times. warmup: Optional warmup step (goal + optional alert). cooldown: Optional cooldown step (goal + optional alert). description: Optional text description of the workout. plan_id: Optional UUID of the training plan this workout belongs to.

Returns: The created queue item object, plus a validation list of schedule-soundness warnings (ramp rate vs the athlete's actual 4-week baseline, back-to-back hard days, guardrail breaches, …) covering the athlete's whole upcoming schedule. ALWAYS review it: resolve critical warnings (adjust and re-queue, or get the athlete's explicit sign-off); mention warn items to the athlete. Warnings never block creation.

Example — 6x400m intervals with 800m warmup and cooldown: activity_type: "running" display_name: "6x400m Intervals" location: "outdoor" scheduled_date: "2026-03-18T07:00:00Z" warmup: {"goal": {"type": "distance", "value": 800, "unit": "meters"}} blocks: [ { "iterations": 6, "steps": [ { "purpose": "work", "goal": {"type": "distance", "value": 400, "unit": "meters"}, "alert": {"type": "speed", "min": 4.5, "max": 5.0, "unit": "metersPerSecond"} }, { "purpose": "recovery", "goal": {"type": "distance", "value": 400, "unit": "meters"} } ] } ] cooldown: {"goal": {"type": "distance", "value": 800, "unit": "meters"}}

Example — 20-minute tempo run: activity_type: "running" display_name: "20min Tempo" location: "outdoor" scheduled_date: "2026-03-19T07:00:00Z" warmup: {"goal": {"type": "distance", "value": 1600, "unit": "meters"}} blocks: [ { "iterations": 1, "steps": [ { "purpose": "work", "goal": {"type": "time", "value": 20, "unit": "minutes"}, "alert": {"type": "heartRateZone", "zone": 4} } ] } ] cooldown: {"goal": {"type": "distance", "value": 1600, "unit": "meters"}}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "activity_type": "<activity_type>",
      "display_name": "<display_name>",
      "location": "<location>",
      "scheduled_date": "<scheduled_date>",
      "blocks": "<blocks>"
    },
    "name": "create_workout"
  }
}

Input Schema

NameRequiredDescriptionDefault
blocksYes
warmupNo
plan_idNo
cooldownNo
locationYes
descriptionNo
display_nameYes
activity_typeYes
scheduled_dateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the workout only appears on the watch after the iPhone app syncs, that warnings never block creation, that WorkoutKit permits only one alert per step, and what the return payload contains (queue item plus a validation list). It does not cover permissions, whether an identical workout can be queued twice, or how to recover a queued item.

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?

Front-loaded with purpose, then capability summary, then args, returns, and examples in a logical order. The two long examples are justified given the deeply nested undocumented schema, though the description is verbose enough that some trimming (e.g. the redundant recap of alert types already in the schema) would help.

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

Completeness5/5

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

A complex nine-parameter tool with nested object structure and no output schema, and the description covers purpose, every argument, the return payload including the validation list, and the async sync behavior. An agent has enough to invoke this correctly on the first try.

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?

Top-level schema coverage is 0%, so the Args section is doing essential work: it documents all nine parameters, including non-obvious semantics such as location affecting GPS and scheduled_date being ISO 8601 with a concrete example. Two fully worked examples additionally show the legal nesting of blocks/steps/goal/alert and concrete enum values, going well beyond the schema.

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

Purpose4/5

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

States a specific verb and resource plus its destination: creates a structured workout and queues it for the Apple Watch. This is far more informative than the bare name. It does not, however, distinguish itself from the sibling batch_create_workouts or explain when a single create is preferred over a batch.

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

Usage Guidelines3/5

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

The description gives post-call workflow guidance (always review the returned validation list, resolve critical warnings, mention warn items) but gives no when-to-use/when-not guidance relative to batch_create_workouts, edit_scheduled_workout, or update_queued_workout. Usage context is implied by the 'queue for the watch' framing rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.