Skip to main content
Glama

Update activity

update_activity
DestructiveIdempotent

Update fields on an existing activity. Provide the id and any subset of fields to change. If you change duration or intensity on a planned workout, recompute load with (duration_seconds / 3600) × effort² × 100 and then call get_training_status to see the new projection. SWIM STEPS: the watch reads swimDrill, swimEquipment and swimStroke, never displayName. Set swimDrill on every drill ('drill'), kick ('kick') and pull ('pull') step, which keeps its normal stepType (usually 'interval'; 'drill' is never a stepType), swimEquipment to the one piece of kit that step uses, and swimStroke on every step whose stroke is named. When the athlete names their pool ("50m pool", "25 yard pool"), set poolLength. STRENGTH: write lifting, circuits and Hyrox as exercises, never as steps: items {type 'exercise', exercise, sets: one entry per set with reps and weightKg in kg, so 3x8 is three entries} and {type 'cardio', sport ('run', 'bike', 'skierg' or 'row'), distanceM or durationSec} for the runs and ergs between stations. Set sportType 'strength'. YOGA, pilates and mobility routines with named moves are exercises too, with sportType 'yoga': one exercise item per move, its sets time only (durationSec: cat-cow 2 min is one set of 120, 2x30s is two sets of 30, 1 min each side is two sets of 60), a move done on each side one set per side with 'each side' in notes, no reps or weight. Only exercises or moves the athlete named, never invented ones: "Strength 45 min" or "30 min yoga" is the duration with no exercises. Keep duration when there are exercises. An activity has exercises or steps, never both. On a planned activity exercises is the plan; on a completed one, what was done. When the athlete tells you what they did in a planned session ("I did 3x8 at 62.5", "log today's session"), call complete_activity with its plannedActivityId instead: updating the planned activity overwrites the plan.

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": {
      "id": "<id>"
    },
    "name": "update_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
dateNoCalendar day as YYYY-MM-DD. A date, never a timestamp: no time, no 'Z', no UTC offset. Time of day goes in startTime.
loadNoTraining load (TSS). Set this on every planned workout — without it the session does not appear on the load chart or in get_training_status's projection. Estimate as (duration_seconds / 3600) × effort² × 100, where effort is 0.25 recovery, 0.5 easy, 0.75 tempo, 1.0 threshold, 1.25 VO2, 1.5 race. A 60-minute easy run is ~25; a 4-hour moderate ride (~0.65) is ~169. Omit only on completed activities that a device will score, or strength with no endurance load.
powerNoAverage power in watts.
speedNoAverage speed in meters per second.
stepsNo
titleNo
targetNoWhat the workout is built around: "distance" when only a distance is given, "time" when only a duration, "pace" when both, "steps" for structured intervals. Set the matching distance/duration fields too — target alone carries no values.
distanceNoTotal distance in METERS (8 km = 8000). Never kilometers or miles — convert first.
durationNoTotal duration in SECONDS (45 min = 2700, 4 hours = 14400). Never minutes.
completedNo
exercisesNo
heartRateNoAverage heart rate in beats per minute.
sportTypeNo
startTimeNoLocal wall-clock start time as HH:mm on a 24-hour clock (07:00 = 7am, 17:30 = 5:30pm), in the athlete's own time. ONLY set this when the athlete actually states a time. If they do not mention one, omit the field entirely: never infer, default, or guess a time, because an invented value turns an all-day plan into a timed event in their calendar. Never attach a timezone or offset: 07:00 means 7am where they are, and a UTC instant cannot express that.
orderOnDayNo
poolLengthNoSet this whenever the athlete names the pool size of a swim: "in a 25 yard pool" or short course yards = "25yd", "50m pool" or long course = "50m", "25m pool" or short course meters = "25m", "33m pool" = "33m", "20m pool" = "20m", "any" = no pool size. It is sent to their Garmin watch, which counts lengths with it. Omit only when no pool is mentioned: their saved pool from settings is used instead.
descriptionNo
elevationGainNoTotal elevation gain in METERS.

Output Schema

NameRequiredDescriptionDefault
noteNoPresent when the write may not be what was meant, saying what to call instead. Read it before answering.
activityYesRecorded fields (calories, elapsedTime, maxima, cadence, running dynamics, extras...) are left out when the source reported none: never estimated, never zero.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sportType / enum
      Previous value: -[
      -  "run",
      -  "bike",
      -  "swim",
      -  "hike",
      -  "yoga",
      -  "tennis",
      -  "golf",
      -  "soccer",
      -  "skiing",
      -  "nordicski",
      -  "skierg",
      -  "row",
      -  "kayak",
      -  "strength",
      -  "surf",
      -  "other"
      -]New value: +[
      +  "run",
      +  "bike",
      +  "swim",
      +  "hike",
      +  "yoga",
      +  "tennis",
      +  "golf",
      +  "soccer",
      +  "skiing",
      +  "nordicski",
      +  "skierg",
      +  "row",
      +  "kayak",
      +  "climb",
      +  "strength",
      +  "surf",
      +  "other"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description still adds real behavioral context beyond them: it establishes partial-update semantics ('any subset of fields to change'), warns that editing a planned activity overwrites the plan, and states the mutual exclusivity of `exercises` and `steps`. It says nothing about permissions, failure modes, or whether omitted fields are preserved versus cleared, which keeps it short of a 5.

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

Conciseness3/5

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

The dense labelled blocks (SWIM STEPS, STRENGTH, YOGA) are readable and mostly earn their place given the nested schema, but substantial text restates what the schema already documents for swimDrill, swimEquipment and exercises. More importantly, the highest-value routing instruction — use complete_activity for completed sessions — is buried in the final sentence rather than front-loaded next to the purpose statement.

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?

For a 19-parameter mutation with deep nested structures, the description covers the hard parts: field-level modeling for swim, strength and yoga, load calculation, and the alternative tool for logging completed sessions. An output schema exists, so return values need no explanation, and the remaining gaps (permission requirements, merge-vs-replace semantics for omitted fields) are secondary.

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

Parameters4/5

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

With 19 parameters at 58% schema coverage, the description carries real weight: it explains how to encode swim drills, equipment and strokes, how to expand lifting sets into one entry per set, and how to represent timed yoga moves. Much of this duplicates the already-verbose schema descriptions for `steps` and `exercises`, so it is additive rather than essential, but the cross-field composition rules (exercises or steps, never both; keep duration when there are exercises) genuinely go beyond the schema.

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?

Opens with a specific verb and resource ('Update fields on an existing activity') and immediately scopes the call ('Provide the id and any subset of fields to change'). It also names the sibling it is most likely to be confused with (complete_activity) and the condition that selects it, so an agent can route correctly without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-not: if the athlete reports what they did in a planned session, call complete_activity with the plannedActivityId instead, because updating would overwrite the plan. It also supplies positive workflow guidance (recompute `load` then call get_training_status) and per-sport rules for when to use `steps` versus `exercises`, which is exactly the decision an agent must make before calling.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources