Skip to main content
Glama

edit_activity

Destructive

Correct one completed activity when the recording got it wrong — its MEASURED numbers (jammed GPS, a dropped sensor, a computer left running) or the DAY it was filed on. Picking the mode is the whole job: • create — the WHOLE session never recorded (no activity that day; the plan shows it missed) and the athlete knows its numbers ('бегал в понедельник 10 км за 52 минуты, часы не записали'). Pass id "new", date, sport (running / cycling / other), the TOTAL movingTime, and whatever else they said — distance, elevation, avgHr, maxHr, avgWatts, time, name; never estimate a number they did not give. list_activities for that day FIRST: if a recording is there, correct it instead. The row is marked entered by hand (one block, no trace, TSS only from pace or watts); revert removes it. • extend — part of the session DIDN'T RECORD and the athlete says it was like the rest ('первые полчаса не записались, ехал так же'). Pass the new TOTAL movingTime in seconds. Volume scales, intensity is kept, and the personal bests stand. Pass distance too if they know the real total (their usual loop); otherwise it follows the duration. • trim — the recording RAN ON after the session ended (the computer went into the car, the pocket, the walk home: 'после 1:45 запись шла в машине'). Pass endSec = the second of the recording it ended at, on the clock of get_activity_series rows — read it off the series (where the work stops), not off the athlete's watch. Everything after is cut and every number is read again from the record (work, NP, IF, TSS, zones, distance, the chart and the intervals); pass distance / elevation only if the athlete knows them better. Never correct for this. • laps — the DISTANCE of particular laps was wrong and the athlete knows the real one: a treadmill or track run measured by a foot pod, a run power meter or the watch ('работы были по 1600 м', 'на дорожке 5×1000'). Pass laps = [{ n, m }]: n = the lap's number as the Laps table shows it (Lap 5 → 5; read them from get_activity), m = its real metres. Inside each named lap the record's distance is calibrated to those metres; time, heart rate, power and cadence stay as measured. Every lap's pace, % and zone, the total distance, pace zones, TSS, the detected intervals and the distance records are read again. Laps not named stay as measured unless the athlete says the same sensor was off throughout — then others: 'scale' gives them the named laps' factor; ask about the warm-up and the recoveries rather than assume. Never correct for this. • correct — a recorded number is FALSE ('Страва посчитала 42 км, а я пробежал 10'). Pass the corrected absolute values; work and time-in-zone are what the stream measured and stay. Correcting the distance REMOVES this session's distance records — they were computed from the wrong track and the true splits can't be recovered — so tell the athlete that before they apply. • move — the recording's CLOCK was wrong, not its numbers: the device filed the session on the wrong day or hour ('записалась на 22 сентября, а ехал сегодня'). Pass date, and time only if the start time was wrong too. Nothing measured changes and syncs won't move it back; Strava and intervals.icu keep their own date — say so. • merge — ONE session that arrived as TWO activities (Zwift or a head unit restarted its recording, a watch saved mid-ride): 'объедини эти две'. Pass withId = the other half's id (both from list_activities, same sport, the second starting after the first ends, at most 3 h apart). The earlier one stays and absorbs the later (hidden): volume adds up, NP/IF/TSS recomputed, chart and intervals joined, note/RPE/tags carried. Three or more: merge two, then the result with the next. If the athlete ALSO says a stretch between them was not recorded, merge first, then extend the merged one. • revert — undo earlier corrections, a move or a merge included, and put the provider's original back ('верни как было'); a merge comes apart again (the last one merged). No values needed. All values are absolute NEW totals (seconds, metres), never deltas. You do NOT compute the consequences: the server recomputes them and the confirmation card shows every before→after — read it before saying what changes. Ask for whatever you're missing rather than guessing a number — and get_activity first, so you are correcting the real values. Once corrected, the session is the athlete's: syncs from Strava/intervals stop overwriting its measured fields, and it counts as corrected in the week, the load history and the Records tab.

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>",
      "mode": "<mode>",
      "ask": "<ask>"
    },
    "name": "edit_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
askYesWhat the athlete asked for, in THEIR words and language — stored with the edit and shown in the app as the reason this session is marked edited.
dateNo`move`: the real day, YYYY-MM-DD.
lapsNo`laps`: the laps whose real distance the athlete knows.
modeYes
nameNo`create`: its title, if the athlete gave one.
timeNo`move`: the real start, HH:MM (24h); omit to keep the recorded time.
avgHrNo`create`: average heart rate, if they know it.
maxHrNo`create`: maximum heart rate, if they know it.
sportNo`create`: what the session was.
endSecNo`trim`: the second of the recording the session ended at (get_activity_series' clock).
othersNo`laps`: laps not named stay as measured (keep, the default) or take the named laps' sensor factor (scale) — only when the athlete says so.
withIdNo`merge`: the id of the OTHER activity of the same session.
avgWattsNo`create`, a ride: average power, if they know it.
distanceNoNew total distance in METRES.
elevationNoNew total elevation gain in metres.
movingTimeNoNew TOTAL moving time in seconds (not a delta).
elapsedTimeNoNew total elapsed/wall-clock seconds. Usually omit — it follows movingTime.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / avgHr
      Added value: +{
      +  "description": "`create`: average heart rate, if they know it.",
      +  "maximum": 220,
      +  "minimum": 50,
      +  "type": "integer"
      +}
    • addedInput schema / properties / avgWatts
      Added value: +{
      +  "description": "`create`, a ride: average power, if they know it.",
      +  "maximum": 1500,
      +  "minimum": 20,
      +  "type": "integer"
      +}
    • addedInput schema / properties / maxHr
      Added value: +{
      +  "description": "`create`: maximum heart rate, if they know it.",
      +  "maximum": 230,
      +  "minimum": 60,
      +  "type": "integer"
      +}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "extend",
      -  "correct",
      -  "trim",
      -  "laps",
      -  "move",
      -  "merge",
      -  "revert"
      -]New value: +[
      +  "extend",
      +  "correct",
      +  "trim",
      +  "laps",
      +  "move",
      +  "merge",
      +  "revert",
      +  "create"
      +]
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "`create`: its title, if the athlete gave one.",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • addedInput schema / properties / sport
      Added value: +{
      +  "description": "`create`: what the session was.",
      +  "enum": [
      +    "running",
      +    "cycling",
      +    "other"
      +  ],
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / laps
      Added value: +{
      +  "description": "`laps`: the laps whose real distance the athlete knows.",
      +  "items": {
      +    "properties": {
      +      "m": {
      +        "description": "Its real distance in metres.",
      +        "maximum": 100000,
      +        "minimum": 1,
      +        "type": "number"
      +      },
      +      "n": {
      +        "description": "The lap's number as the Laps table shows it (Lap 5 → 5).",
      +        "maximum": 300,
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "n",
      +      "m"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 100,
      +  "type": "array"
      +}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "extend",
      -  "correct",
      -  "trim",
      -  "move",
      -  "merge",
      -  "revert"
      -]New value: +[
      +  "extend",
      +  "correct",
      +  "trim",
      +  "laps",
      +  "move",
      +  "merge",
      +  "revert"
      +]
    • addedInput schema / properties / others
      Added value: +{
      +  "description": "`laps`: laps not named stay as measured (keep, the default) or take the named laps' sensor factor (scale) — only when the athlete says so.",
      +  "enum": [
      +    "keep",
      +    "scale"
      +  ],
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / endSec
      Added value: +{
      +  "description": "`trim`: the second of the recording the session ended at (get_activity_series' clock).",
      +  "maximum": 172800,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "extend",
      -  "correct",
      -  "move",
      -  "merge",
      -  "revert"
      -]New value: +[
      +  "extend",
      +  "correct",
      +  "trim",
      +  "move",
      +  "merge",
      +  "revert"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "extend",
      -  "correct",
      -  "move",
      -  "revert"
      -]New value: +[
      +  "extend",
      +  "correct",
      +  "move",
      +  "merge",
      +  "revert"
      +]
    • addedInput schema / properties / withId
      Added value: +{
      +  "description": "`merge`: the id of the OTHER activity of the same session.",
      +  "maxLength": 40,
      +  "type": "string"
      +}
  5. Changed3 schema fields changed
    • addedInput schema / properties / date
      Added value: +{
      +  "description": "`move`: the real day, YYYY-MM-DD.",
      +  "maxLength": 10,
      +  "type": "string"
      +}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "extend",
      -  "correct",
      -  "revert"
      -]New value: +[
      +  "extend",
      +  "correct",
      +  "move",
      +  "revert"
      +]
    • addedInput schema / properties / time
      Added value: +{
      +  "description": "`move`: the real start, HH:MM (24h); omit to keep the recorded time.",
      +  "maxLength": 5,
      +  "type": "string"
      +}
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true and openWorldHint=false; the description goes far beyond by naming what is destroyed (correcting distance REMOVES the session's distance records, with an instruction to warn the athlete), what is hidden (merged later activity), and what a revert restores. It also discloses post-edit state — syncs stop overwriting measured fields, Strava/intervals keep their own date — and that the server, not the agent, computes consequences shown on a confirmation card.

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?

It is long, but the structure is disciplined: a one-sentence framing followed by a bullet per mode with the trigger first and the payload second. There is some redundancy ("Never `correct` for this" appears twice, and 'ask rather than guess' is stated at both the top and the bottom), which keeps it just short of a 5.

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?

For an 18-parameter, 8-mode destructive tool with no output schema, the description supplies everything needed to call it correctly: which mode to pick, required per-mode arguments, prerequisite reads, and confirmation of what the response card will contain so the agent needn't guess return values.

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?

Schema coverage is already 89%, yet the description still adds interpretation the schema cannot: id="new" for create, endSec must be read off get_activity_series' clock rather than the athlete's watch, laps.n maps to the Laps table numbering, and all values are absolute totals never deltas. Minor remaining gap is that a few fields (name, avgHr, avgWatts) are only lightly framed beyond 'if they know it'.

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 opening sentence names a specific verb and resource ("Correct one completed activity") and immediately scopes it to measured numbers or the filing day. It explicitly differentiates itself from list_activities/get_activity/get_activity_series by telling the agent to read those first, and the eight named modes carve the purpose into distinguishable sub-actions.

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?

Each mode states the triggering situation in athlete language ('после 1:45 запись шла в машине') plus the exact values to pass, and several modes carry explicit exclusions ('Never `correct` for this' under both trim and laps). Ordering rules are spelled out too: merge before extend, and 'merge two, then the result with the next' for three or more.

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