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. Four modes, and picking the right one is the whole job: • 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. • correct — a recorded number is FALSE ('Страва посчитала 42 км, а я пробежал 10'). Pass the corrected absolute values. 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 TSS, IF, work and time-in-zone and the confirmation card shows every before→after. 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.

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.
modeYes
timeNo`move`: the real start, HH:MM (24h); omit to keep the recorded time.
withIdNo`merge`: the id of the OTHER activity of the same session.
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. 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"
      +}
  2. 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"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations give destructiveHint=true/readOnlyHint=false, and the description goes well beyond them: `correct` removes distance records permanently, `merge` hides the later activity and rewrites NP/IF/TSS/charts/intervals, `revert` only unwinds the last merge, and provider syncs will not move a moved activity back. It also states post-edit locking (syncs stop overwriting measured fields) and downstream effects on week/load history/Records. This is the kind of consequence disclosure annotations cannot carry.

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 one-sentence thesis followed by mode-scoped bullets with consistent trigger→action shape; the athlete quotes earn their place by making mode selection concrete. It is long, and the 'Four modes' miscount plus a couple of parenthetical repeats cost it the top score.

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?

No output schema, but the description states what happens after the call (server recomputes TSS/IF/work/time-in-zone, confirmation card shows before→after) and what persists (edit reason from `ask`, corrected flag in week/load/Records). For a destructive 10-param mutation tool, nothing an agent needs to invoke it correctly is missing.

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 80%, but the description supplies the missing semantics for the highest-risk parameter — mode — by defining each enum value's meaning and required companions (withId only for merge, date/time only for move, absolute totals never deltas). It also constrains withId ('same sport, second starts after first ends, at most 3 h apart, from list_activities'). Slight gap: elevation and elapsedTime are never tied to a mode, and elevation's relationship to extend is unstated.

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?

States a concrete verb+resource+scope: correct ONE completed activity when the recording (measured numbers or filed day) is wrong, and enumerates the modes that do it. This is clearly distinguishable from rename_activity, set_activity_notes and tag_activity, which touch labels rather than measurements. Minor internal slip: it says 'Four modes' while five (extend/correct/move/merge/revert) are listed and in the enum — the enumeration itself still rescues clarity.

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 is gated on a concrete real-world condition with the athlete's own phrasing ('первые полчаса не записались', 'Страва посчитала 42 км'), which is exactly the when-to-use signal an agent needs. It also specifies ordering (merge first, then extend), a guard against guessing ('ask for whatever you're missing'), and a mandatory prerequisite ('get_activity first').

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