{"serverInfo":{"name":"STAS Training Assistant for ChatGPT, Claude and Gemini","description":"Connect ChatGPT, Claude or Gemini to your workouts via Intervals.icu: review, plan, log strength.","version":"1.0.5"},"authentication":{"required":true,"schemes":["oauth2"]},"tools":[{"name":"get_workout_library","description":"Read/search the same ready-made workout library as the STAS calendar. Search with English query terms, sport=run/bike/swim/multisport or an exact template_id. Returns up to 3 complete recipes per page; use offset while hasMore=true. These are unpersonalized templates, not completed work or saved plans. Preserve variants, repeated steps, separate sport parts and selection restrictions. relativeLoad is qualitative and must never be copied into icu_training_load. Read the athlete's summary/history and known thresholds to choose suitable targets and load; never invent them. After the athlete agrees to a personalized version, save it with create_plan_event, with its required targets and numeric load. This tool does not save, fetch athlete data or call Intervals.icu.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"template_id":{"description":"Exact template id from an earlier library result.","type":"string","minLength":1,"maxLength":100},"query":{"description":"Search terms in English, the catalog language; searches names, purpose, goals and type codes.","type":"string","minLength":1,"maxLength":120},"sport":{"type":"string","enum":["run","bike","swim","multisport"]},"offset":{"default":0,"type":"integer","minimum":0,"maximum":1000},"limit":{"default":3,"type":"integer","minimum":1,"maximum":3}},"required":["offset","limit"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_user_summary","description":"Mandatory first step before any coaching analysis, readiness or recovery assessment, comparison, recommendation, or planning: it loads the athlete's profile, goals, rules, recent load, current fitness context, performance evidence, optional bounded historical signals, planning guidance, and persistent STAS memory opportunities. The summary does not replace workout history: follow it with a suitable get_trainings window before coaching conclusions. Skip it only for pure connection diagnostics (whoami) or when the user explicitly asks for raw data or CSV without coaching interpretation. weeklyHistory.recentKeySessionEvidence is the compact 42-day factual register for current planning. It includes all qualifying key sessions unless truncated=true; each row uses columns for date, saved name/type, sourceTrainingId, confirmed actual WORK, confirmed REST only when recorded, and wholeActivity only when no confirmed interval structure exists. It never invents recovery or interval rows; null recovery means no confirmed REST inside that activity. For older comparisons, use get_trainings with a bounded date range, then get_activity_detail for one exact workout. confirmedStructuredIntervals remains a separate verified structured-session index for its stated period; do not infer unshown measurements. If a STAS result contains conversationGuide, build that reply by it; nextStep is one sentence placed right before the footer.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"section":{"type":"string","enum":["profile","history","evidence","pace","plan"]},"locale":{"description":"Current reply language. Required to claim an AI research invite.","type":"string","enum":["zh","cs","nl","en","fr","de","hi","id","it","ja","ko","pl","pt","ru","es","th","tr","uk","vi"]}},"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_trainings","description":"Use this for completed, finished, recorded, or uploaded activities, including workouts completed today. It is the mandatory history step of every coaching analysis or plan: use it to find a workout or its training_id, to analyze or compare several workouts, and to load the history context required before any detailed breakdown (at least 14 days for analysis, about 60 days for planning and strategy, when data exists). To load one date D, always set oldest=D and newest=D+1 because newest is exclusive. It returns one bounded, size-safe chronological list of completed workouts plus historical calendar context (NOTE, SICK, INJURED, HOLIDAY). Context is not a workout and does not consume the training limit. Default mode is a rich index for chronology, load, workout notes, compact summaries, and choosing training_id. effectiveRpe is the RPE shown in the STAS calendar (userRpe from STAS, otherwise the Intervals.icu RPE) and rpeSource says which; when effectiveRpe is set the workout has an RPE even if userRpe is empty. Its userReport field contains athlete-written notes from the saved Intervals description and current STAS report. The current report is not appended again when its full text is already contained in the description; existing repeated text is preserved. Notes alone do not mean a STAS report was submitted; check reportStatus to confirm that. Use offset to continue beyond the first 50 completed workouts. Set full=true only for analysis-rich comparison across multiple workouts; it adds a bounded compact interval projection. Do not fetch get_activity_detail for every workout in the list; for one selected completed workout, use get_activity_detail for splits and richer detail. Kilometre splits are intentionally omitted from get_trainings in every mode. If listDetail.userReportTruncated=true for a workout, its notes were shortened only to keep the whole list within the response budget; call get_activity_detail with that training_id for the complete notes. If a note has noteDetail.textTruncated=true, request exactly that note's date (oldest=D, newest=D+1) to read its full text.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"oldest":{"description":"Start boundary date in YYYY-MM-DD, inclusive.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"newest":{"description":"End boundary date in YYYY-MM-DD, exclusive. Never use the last wanted date here; use the next calendar date. For one day D, set oldest=D and newest=D+1, for example oldest=2026-06-21 and newest=2026-06-22.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"description":"Max trainings per page. Server cap is 50.","type":"integer","minimum":1,"maximum":50},"offset":{"description":"Pagination offset for completed trainings. Use the next offset to continue the same bounded date window; calendar context is returned only on the first page.","type":"integer","minimum":0,"maximum":9007199254740991},"full":{"description":"Optional analysis-rich list mode for comparing multiple completed workouts in a bounded date window. It adds a size-safe compact interval projection, but is not raw data and is not the detailed view for one workout. Omit it when locating/listing workouts or choosing a training_id; use get_activity_detail after selecting one exact workout.","type":"boolean"}},"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_wellness","description":"Read all locally stored Intervals.icu wellness values for any requested date window; there is no fixed day cap. A window containing today joins a durable provider refresh and waits briefly; currentDayRefresh=checked confirms the provider check, while pending means saved values may be stale. Historical windows use local data only. Use it when the question needs day-by-day recovery, sleep, health, HRV, or readiness context beyond the compact summary; it complements but never replaces actual workout history from get_trainings. The response is column-oriented: dates[i] is the date for every series[field][i] and customSeries[field][i]. null means not recorded, never zero. Only fields with at least one value are returned. window=[oldest inclusive,newest exclusive]; missingRanges uses the same boundaries and names dates for which STAS has no stored wellness row. healthCoverage counts locally available weight/restingHr/hrv/sleep/steps days and reports the initial source-sync status; status=partial means the source history may still be incomplete. complete=true means the response is not truncated and includes all meaningful locally stored standard and custom wellness fields; it does not claim the watch/provider supplied every metric. source=intervals_icu_cached_by_stas means values may originate from a watch, another connected source, or manual Intervals.icu entry and are served from STAS cache. Interpret trends against this athlete's own baseline and together with workouts and reports; do not judge readiness or diagnose from one value. CTL is modeled longer-term training load, ATL shorter-term load, and CTL-ATL can be used as Form; higher or lower is not inherently good or bad. HRV is protocol/device dependent and is mainly useful relative to the athlete's own trend. Resting HR is also individual; acute deviation matters more than a universal threshold. sleepSecs is seconds. sleepQuality is 1=Excellent through 4=Poor. soreness/fatigue/stress are 0=None through 4=Extreme, higher is worse. mood/motivation are 1=Excellent through 4=Poor, higher is worse. providerUpdatedAt is the provider record update time, not the measurement time. Preserve custom field names exactly; if a custom field's unit or scale is unclear, do not invent it—describe only its observed trend or ask the user. If the complete response is too large, retry every exact non-overlapping window in suggestedWindows; if none are suggested, explain that one stored day itself cannot be split further by date. Never treat a partial window as the whole request.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"oldest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start boundary date in YYYY-MM-DD, inclusive. There is no fixed day limit."},"newest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End boundary date in YYYY-MM-DD, exclusive. There is no fixed day limit. If the complete result is too large, retry the exact non-overlapping suggested windows returned by the tool."}},"required":["oldest","newest"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_activity_detail","description":"Load a compact read-only passport for ONE selected completed workout. Do not call it standalone for coaching analysis: first load get_user_summary, then a suitable get_trainings window, and only then open the one workout whose exact execution matters, using its exact training_id. Standalone use is appropriate only when the user explicitly asks for raw data, CSV, laps, intervals, or technical metrics without a coaching assessment. Never call it for many workouts in a loop; compare workouts with get_trainings instead. Use for detailed one completed workout questions about intervals, laps, splits, terrain, weather, efforts, segments, and data quality. overview.userReport contains athlete-written notes from the saved Intervals description and current STAS report. The current report is not appended again when its full text is already contained in the description; existing repeated text is preserved. Notes alone do not mean a STAS report was submitted, so check reportStatus in get_trainings. The response omits source payloads, route coordinates, latlng, and raw stream arrays from JSON; when available, complete second-by-second metrics are embedded as CSV in the MCP result, with a signed link fallback.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"training_id":{"type":"string","minLength":1,"description":"Training id returned by get_trainings. Load get_trainings first to identify the exact workout."}},"required":["training_id"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_planned_events","description":"Read only planned or scheduled events from the Intervals calendar in a date window, not completed activities. Required for planning questions such as what to do today or next week, for plan reviews, and before any calendar change; pair it with get_user_summary and recent get_trainings history, because planned events are intentions and never replace completed workout facts. This must not be the only source when a request may mean today's completed workout: call get_trainings first. Use this before rewriting or replacing an existing STAS plan. Events may carry last_change (by: you | chatgpt | claude | ai_chat | intervals, action, at, reason): who changed the event last. If by is \"you\" (the athlete changed the workout manually) or \"intervals\" (changed in Intervals.icu), respect that change and do not silently overwrite it; ask the athlete first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"oldest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"newest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["oldest","newest"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"whoami","description":"Check which STAS user is currently authenticated. Use only for diagnostics or reconnect troubleshooting.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_editable_goals_results","description":"Read the complete bounded editing state for general goals, calendar-linked starts, race results, standalone results, and legacy results. Stable public IDs and dataVersion are required for every later preview. The snapshot also carries sportRoles.strength: discipline (a separate discipline with its own progression) or support (supports the athlete's endurance sports); change it with a sport_role_update command and explicit confirmation. This tool does not change anything.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_goal_activity_candidates","description":"Read safe nearby activity candidates for one exact start. Use the returned opaque selectionId when previewing result_link_activity. This tool does not change the start, activity, or result.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Stable public ID of one event goal returned by get_editable_goals_results."}},"required":["goalPublicId"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"preview_goal_result_change","description":"Preview one exact change to a general goal, calendar-linked start, activity pairing, race result, standalone result, or legacy result. Always load get_editable_goals_results first and send its exact dataVersion. The snapshot also carries sportRoles.strength: discipline (a separate discipline with its own progression) or support (supports the athlete's endurance sports); change it with a sport_role_update command and explicit confirmation. This stores only a preview artifact, without applying the proposed change. Show the user the exact preview, including calendar/activity effects, and ask for explicit confirmation before commit_goal_result_change.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedDataVersion":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Exact dataVersion returned by get_editable_goals_results. A stale version is rejected."},"command":{"description":"One exact goal, start, activity-link, or result change. Broad replace-all writes are not supported.","anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"general_create","description":"Use exactly \"general_create\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":300},"deadlineDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"sport":{"anyOf":[{"type":"string","enum":["run","ride","swim","strength"]},{"type":"null"}]},"target":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"required":["type","operationId","title"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"general_update","description":"Use exactly \"general_update\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":300},"deadlineDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"sport":{"anyOf":[{"type":"string","enum":["run","ride","swim","strength"]},{"type":"null"}]},"target":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"required":["type","operationId","goalPublicId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"general_archive","description":"Use exactly \"general_archive\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","operationId","goalPublicId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"start_create","description":"Use exactly \"start_create\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":300},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"timezone":{"type":"string","minLength":1,"maxLength":100},"sport":{"type":"string","enum":["run","ride","swim"]},"distanceMeters":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"distanceInput":{"type":"object","properties":{"version":{"type":"number","const":1},"value":{"type":"string","minLength":1,"maxLength":64},"unit":{"type":"string","enum":["m","km","mi","yd"]}},"required":["version","value","unit"],"additionalProperties":false},"priority":{"type":"string","enum":["A","B","C"]},"target":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}:[0-5]\\d(?::[0-5]\\d)?$"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"required":["type","operationId","title","date","sport","priority"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"start_update","description":"Use exactly \"start_update\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":300},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"timezone":{"type":"string","minLength":1,"maxLength":100},"sport":{"type":"string","enum":["run","ride","swim"]},"distanceMeters":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"distanceInput":{"type":"object","properties":{"version":{"type":"number","const":1},"value":{"type":"string","minLength":1,"maxLength":64},"unit":{"type":"string","enum":["m","km","mi","yd"]}},"required":["version","value","unit"],"additionalProperties":false},"priority":{"type":"string","enum":["A","B","C"]},"target":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}:[0-5]\\d(?::[0-5]\\d)?$"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"required":["type","operationId","goalPublicId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["start_delete","start_cancel","start_dns"],"description":"Use exactly start_delete, start_cancel, or start_dns as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","operationId","goalPublicId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"start_dnf","description":"Use exactly \"start_dnf\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"activityId":{"type":"string","minLength":1,"maxLength":200}},"required":["type","operationId","goalPublicId"],"additionalProperties":false,"description":"Record an incomplete distance for a past start. Optionally select an activity; otherwise keep its primary or candidate activity. This is a start fact, excluded from personal bests and pace/VDOT calculations."},{"type":"object","properties":{"type":{"type":"string","const":"result_set","description":"Use exactly \"result_set\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resultKind":{"type":"string","enum":["manual","official_chip","official_gun"]},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":604800},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","operationId","goalPublicId","resultKind","seconds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"result_delete","description":"Use exactly \"result_delete\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","operationId","goalPublicId"],"additionalProperties":false,"description":"Delete only the recorded result for this start. Keep the start itself."},{"type":"object","properties":{"type":{"type":"string","const":"result_link_activity","description":"Use exactly \"result_link_activity\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"selectionId":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","operationId","goalPublicId","selectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"result_detach_activity","description":"Use exactly \"result_detach_activity\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","operationId","goalPublicId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"manual_result_create","description":"Use exactly \"manual_result_create\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sport":{"type":"string","enum":["run","ride","swim"]},"distanceMeters":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"distanceInput":{"type":"object","properties":{"version":{"type":"number","const":1},"value":{"type":"string","minLength":1,"maxLength":64},"unit":{"type":"string","enum":["m","km","mi","yd"]}},"required":["version","value","unit"],"additionalProperties":false},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":604800},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"activityId":{"type":"string","minLength":1,"maxLength":200}},"required":["type","operationId","sport","seconds","actualDate"],"additionalProperties":false,"description":"Create a standalone result. Optionally link an owned completed activity by its activityId. Supply whole metres, or an exact value and unit such as 100 yd or 3 mi; multiple results for the same sport and distance are allowed."},{"type":"object","properties":{"type":{"type":"string","const":"manual_result_update","description":"Use exactly \"manual_result_update\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resultPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sport":{"type":"string","enum":["run","ride","swim"]},"distanceMeters":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"distanceInput":{"type":"object","properties":{"version":{"type":"number","const":1},"value":{"type":"string","minLength":1,"maxLength":64},"unit":{"type":"string","enum":["m","km","mi","yd"]}},"required":["version","value","unit"],"additionalProperties":false},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":604800},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"activityId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["type","operationId","resultPublicId","sport","seconds","actualDate"],"additionalProperties":false,"description":"Update one existing standalone result. Optionally set activityId to link an owned completed activity, or null to unlink it. Supply whole metres, or an exact value and unit. Use the resultPublicId returned in manualResults."},{"type":"object","properties":{"type":{"type":"string","const":"manual_result_delete","description":"Use exactly \"manual_result_delete\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resultPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","operationId","resultPublicId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"legacy_result_convert","description":"Use exactly \"legacy_result_convert\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedBestResultVersion":{"type":"string","pattern":"^[0-9a-f]{64}$"},"legacyToken":{"type":"string","pattern":"^[0-9a-f]{64}$"},"sport":{"type":"string","enum":["run","ride","swim"]},"distanceMeters":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":604800},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["type","operationId","expectedBestResultVersion","legacyToken","sport","distanceMeters","seconds","actualDate"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"legacy_result_delete","description":"Use exactly \"legacy_result_delete\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedBestResultVersion":{"type":"string","pattern":"^[0-9a-f]{64}$"},"legacyToken":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","operationId","expectedBestResultVersion","legacyToken"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sport_role_update","description":"Use exactly \"sport_role_update\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sport":{"type":"string","const":"strength"},"role":{"type":"string","enum":["discipline","support"]}},"required":["type","operationId","sport","role"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"start_duplicate_resolve","description":"Use exactly \"start_duplicate_resolve\" as command.type."},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"goalPublicId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"choice":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"link"},"providerEventId":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","providerEventId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"separate"}},"required":["kind"],"additionalProperties":false}]}},"required":["type","operationId","goalPublicId","choice"],"additionalProperties":false,"description":"Resolve a previously found similar Intervals race: link this start to that exact provider event, or create it as a separate race."}]}},"required":["expectedDataVersion","command"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"commit_goal_result_change","description":"Commit one previewed goal, start, activity-link, or result change. Call only after the user explicitly confirms the exact preview from preview_goal_result_change. The server rejects stale data and returns the new authoritative editing state.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"changeId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Preview id returned by preview_goal_result_change. Commit only after the user confirms that exact preview."}},"required":["changeId"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"create_plan_event","description":"Create or update planned WORKOUT events in Intervals. For changes to an existing STAS workout, keep the same external_id and call this tool again; do not delete the day/window just to edit time, name, note, load, color, or workout_builder. This tool is self-contained; do not look for SKILL.md or examples in the athlete's calendar. dry_run is required: false writes the event, true previews only. Send activity_type as Run/Ride/Swim/Workout/WeightTraining/Yoga/Pilates/Stretching/Walk/Hike/Elliptical/NordicSki/HighIntensityIntervalTraining/Other, stas_note for the human workout note, and external_id=plan:YYYY-MM-DD:<slug>. For WeightTraining never put exercises, sets, reps or weights in stas_note or name: create the event, then attach exercises with preview_strength_plan and commit_strength_plan. Do not send low-level Intervals fields category, type, sport, workoutType, target, description, workout_doc, icu_workout, filename, or file_contents. The server maps activity_type to Intervals type and category=WORKOUT and infers Intervals target=HR/PACE/POWER from Run/Ride workout_builder only. Use local datetimes without a timezone suffix, e.g. 2026-05-13T08:00:00, not 2026-05-13T08:00:00+03:00. A simple Run needs distance (metres) or moving_time (seconds), intensity_target (e.g. Z1 HR or 6:00/km Pace), and icu_training_load; workout_builder is not required. The server builds its single execution step. Interval/key workouts require workout_builder; each Run step needs distance or time and HR or Pace; explicit intensity=rest/recovery/cooldown steps may omit the target. Preserve native intensity tags for watch step types. Absolute bpm targets are rejected; use Z1 HR or 71-83% LTHR instead. If validation fails, inspect error.data.issues[].path, fix that exact event field, and retry only after changing the invalid field. If you use workout_builder, do not include ## STAS or ## Workout; the server adds wrappers. Builder headers and repeat headers are plain lines without '-', e.g. 'Warmup', 'Main Set 5x', 'Cooldown'. Actual step lines start flush-left with '- ' and contain duration/distance plus a target, e.g. '- 1km 4:25/km-4:35/km Pace', '- 10m 75%', or '- Recovery 90s Z1 HR'. For swim workouts, distance-led steps such as '- 400mtr easy' and '- 6 x 50mtr build' are allowed; swim distances also need mtr or yd because bare m means minutes in builder text for every sport. For HR-only workouts, every structured step target should use HR syntax like '- 10m Z2 HR' or '- 3m Z4 HR'. Do not write '- Warmup' followed by indented child bullets. Use '1km' or '1000mtr' for run/ride meters; bare m means minutes in builder text for every sport, so swim metres/yards must use mtr or yd, e.g. '- 400mtr easy' or '- 100yd easy'. icu_training_load is required for every planned workout, including strength; estimate it from comparable athlete history, never invent it. Intervals.icu can still return icu_atl/icu_ctl as null or exclude/partially weight non-cardio types in Fitness/Fatigue depending on athlete settings. workout_builder is the execution truth for Intervals and the watch; stas_note only explains it and must not carry steps or intensity changes that the builder lacks. Pick the step target from the prescription: run work prescribed by pace or race effort (10K effort, threshold, ladders) uses Pace targets from the athlete's performanceEvidence paces, which also lets the calendar estimate distance; do not switch to HR just because GPS may be unreliable, put the HR/RPE fallback in stas_note instead. When the session is meant to get faster or change intensity between work blocks, give each block its own target or range, e.g. '- 6m 4:40/km-4:45/km Pace', '- 5m 4:35/km-4:40/km Pace' ... '- 1m 4:05/km-4:15/km Pace' with '- Recovery 90s Z1 HR' between; identical work targets are rejected when name or stas_note says the intensity changes. An even ladder or pyramid by rep length at one target is fine. The server checks workout_doc.steps and the Intervals write response for volume, targets and load. Report every per-event warning to the user as saved with a discrepancy; do not automatically write again. Do not perform an extra calendar read unless the response is unconfirmed. Example real interval write arguments. Replace the date/time and paces, but keep this exact JSON shape. Use activity_type, stas_note, and mandatory workout_builder for interval/key workout saves. workout_builder contains only native Intervals.icu Workout Builder text: repeat headers do not start with \"-\", step lines are flush-left, and nested Markdown bullets are forbidden. {\"dry_run\":false,\"events\":[{\"activity_type\":\"Run\",\"name\":\"Intervals: 5x1000m\",\"start_date_local\":\"2026-05-13T08:00:00\",\"end_date_local\":\"2026-05-13T08:55:00\",\"stas_note\":\"Goal: controlled interval work without overreaching.\\nRule: if HR rises too fast or form breaks, stop after 4 reps.\",\"workout_builder\":\"Warmup\\n- 15m Z2 HR\\n\\nMain Set 5x\\n- 1km 4:25/km-4:35/km Pace\\n- Recovery 90s Z1 HR\\n\\nCooldown\\n- 10m Z1 HR\",\"external_id\":\"plan:2026-05-13:intervals-5x1000m\",\"color\":\"green\",\"moving_time\":3300,\"icu_training_load\":60}]}","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"minItems":1,"type":"array","items":{"type":"object","properties":{"activity_type":{"type":"string","enum":["Run","Ride","Swim","Workout","WeightTraining","Yoga","Pilates","Stretching","Walk","Hike","Elliptical","NordicSki","HighIntensityIntervalTraining","Other"],"description":"Required activity type for the planned workout. Use exactly one of Run, Ride, Swim, Workout, WeightTraining, Yoga, Pilates, Stretching, Walk, Hike, Elliptical, NordicSki, HighIntensityIntervalTraining, Other. Do not send category, type, sport, or workoutType."},"name":{"type":"string","minLength":1,"description":"Short, specific workout name."},"start_date_local":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2})?$","description":"Local start time, for example 2026-04-28T08:00:00."},"end_date_local":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2})?$","description":"Local end time, for example 2026-04-28T08:45:00."},"stas_note":{"type":"string","minLength":1,"description":"Required human-readable workout note. Use this for goal, adjustment rule, and simple workouts. Do not include a ## Workout block here."},"workout_builder":{"description":"Native Intervals.icu Workout Builder text. Required for interval/key workouts. For a simple Run, omit this and send distance or moving_time plus intensity_target. Each supplied Run step needs distance or time and an HR or Pace target. Use Z1 HR or 71-83% LTHR; bpm targets are rejected. Do not include ## STAS or ## Workout; the server adds those wrappers.","type":"string","minLength":1},"external_id":{"type":"string","pattern":"^plan:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Stable STAS id in the form plan:YYYY-MM-DD:<slug>."},"session_type":{"description":"Optional. The STAS workout type you planned (Easy, Long, Threshold, Interval, ...). STAS shows it on the calendar card. Omit when unsure.","type":"string","enum":["Easy","Recovery","Endurance","Tempo","Threshold","Marathon","Long","Interval","Repetition","VO2","Fartlek","Hills","SweetSpot","Anaerobic","Technique","Sprint","Race","Strength","CrossTraining"]},"color":{"description":"Optional. Defaults to green for Run/Walk/Hike/Elliptical/NordicSki/HighIntensityIntervalTraining, blue for Ride/Swim, orange for Workout/WeightTraining/Yoga/Pilates/Stretching/Other.","type":"string","enum":["green","blue","orange"]},"moving_time":{"description":"Duration in seconds. For a simple Run, send moving_time or distance plus intensity_target; no workout_builder is needed.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"distance":{"description":"Planned distance in metres, e.g. 8000 for 8 km. A simple Run needs distance or moving_time plus intensity_target.","type":"number","exclusiveMinimum":0},"intensity_target":{"description":"Simple Run target, e.g. Z1 HR, 71-83% LTHR or 6:00/km Pace. The server builds the single execution step; no manual workout_builder is needed.","type":"string","minLength":1},"planned_hr_min":{"description":"Optional original STAS heart-rate lower bound in bpm. This is stored locally; keep native builder HR targets in zones or percentages.","type":"integer","minimum":30,"maximum":250},"planned_hr_max":{"description":"Optional original STAS heart-rate upper bound in bpm. Stored locally, independently of Intervals targets.","type":"integer","minimum":30,"maximum":250},"icu_training_load":{"type":"number","minimum":0,"description":"Required planned training load for every workout, including strength. Use the athlete's comparable history; do not invent a value. Intervals may recalculate it; the server reports discrepancies."}},"required":["activity_type","name","start_date_local","end_date_local","stas_note","external_id","icu_training_load"],"additionalProperties":false},"description":"Example real interval write arguments. Replace the date/time and paces, but keep this exact JSON shape. Use activity_type, stas_note, and mandatory workout_builder for interval/key workout saves. workout_builder contains only native Intervals.icu Workout Builder text: repeat headers do not start with \"-\", step lines are flush-left, and nested Markdown bullets are forbidden. {\"dry_run\":false,\"events\":[{\"activity_type\":\"Run\",\"name\":\"Intervals: 5x1000m\",\"start_date_local\":\"2026-05-13T08:00:00\",\"end_date_local\":\"2026-05-13T08:55:00\",\"stas_note\":\"Goal: controlled interval work without overreaching.\\nRule: if HR rises too fast or form breaks, stop after 4 reps.\",\"workout_builder\":\"Warmup\\n- 15m Z2 HR\\n\\nMain Set 5x\\n- 1km 4:25/km-4:35/km Pace\\n- Recovery 90s Z1 HR\\n\\nCooldown\\n- 10m Z1 HR\",\"external_id\":\"plan:2026-05-13:intervals-5x1000m\",\"color\":\"green\",\"moving_time\":3300,\"icu_training_load\":60}]}"},"change_reason":{"description":"Optional. One short sentence in the user's words about why the plan changed, e.g. \"can't train Wednesday, work\". Omit if the reason is unknown. Whitespace is collapsed and text over 200 characters is shortened.","type":"string"},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"required":["events","dry_run"],"additionalProperties":false,"description":"Example real interval write arguments. Replace the date/time and paces, but keep this exact JSON shape. Use activity_type, stas_note, and mandatory workout_builder for interval/key workout saves. workout_builder contains only native Intervals.icu Workout Builder text: repeat headers do not start with \"-\", step lines are flush-left, and nested Markdown bullets are forbidden. {\"dry_run\":false,\"events\":[{\"activity_type\":\"Run\",\"name\":\"Intervals: 5x1000m\",\"start_date_local\":\"2026-05-13T08:00:00\",\"end_date_local\":\"2026-05-13T08:55:00\",\"stas_note\":\"Goal: controlled interval work without overreaching.\\nRule: if HR rises too fast or form breaks, stop after 4 reps.\",\"workout_builder\":\"Warmup\\n- 15m Z2 HR\\n\\nMain Set 5x\\n- 1km 4:25/km-4:35/km Pace\\n- Recovery 90s Z1 HR\\n\\nCooldown\\n- 10m Z1 HR\",\"external_id\":\"plan:2026-05-13:intervals-5x1000m\",\"color\":\"green\",\"moving_time\":3300,\"icu_training_load\":60}]}"},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"create_note_event","description":"Create or update NOTE events in Intervals. dry_run is required: false writes the note, true previews only. Send category=NOTE and external_id=note:YYYY-MM-DD:<slug>. Use all-day local times for normal notes, keep description short, and omit type, moving_time, icu_training_load, and workout_doc. For weekly reviews use save_week_review. For other notes that apply to the whole week, send for_week=true; omit it or use false for ordinary notes. Do not create a seven-day date range for weekly notes; keep one all-day anchor date and use for_week=true.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"minItems":1,"type":"array","items":{"type":"object","properties":{"category":{"type":"string","const":"NOTE","description":"Must be NOTE for calendar notes."},"name":{"type":"string","minLength":1,"description":"Short note title."},"start_date_local":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2})?$","description":"All-day notes use YYYY-MM-DDT00:00:00."},"end_date_local":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2})?$","description":"All-day notes end at the next day YYYY-MM-DDT00:00:00."},"description":{"type":"string","minLength":1,"description":"Short note text. Ordinary notes are normally 1-4 lines; weekly review notes use the 6-field coaching-memory format."},"external_id":{"type":"string","pattern":"^note:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Stable STAS id in the form note:YYYY-MM-DD:<slug>."},"color":{"description":"Optional. Usually omit for notes.","type":"string","enum":["green","blue","orange"]},"for_week":{"description":"Optional. For weekly reviews use save_week_review. For other notes that apply to the whole week, send for_week=true. Do not stretch start/end over seven days; keep the note as a single all-day anchor date.","type":"boolean"}},"required":["category","name","start_date_local","end_date_local","description","external_id"],"additionalProperties":false}},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"required":["events","dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"create_range_event","description":"Record an illness, an injury or a trip as ONE multi-day event in Intervals.icu, in the same format the STAS calendar writes: illness is SICK, injury is INJURED, trip is HOLIDAY, dates are whole days and `to` is inclusive. Use this instead of create_note_event for these; the AI chat cannot delete the event, the athlete removes it in the STAS calendar or in the connected training service. Send kind, from, to, an optional name in the athlete's language (max 200 characters; without it STAS uses the English default Illness, Injury or Trip), an optional text (max 20000 characters), and dry_run. The same from and kind always give the same fixed external_id, so a retry after a timeout updates the same event instead of creating a second one; to extend, shorten or rename the event, call again with the same from and kind. A different from creates a new event and the old one stays: tell the athlete to remove the old one in the STAS calendar. dry_run is required: false writes the event, true previews only.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["illness","injury","trip"],"description":"Kind of the multi-day event: illness, injury or trip. One event covers many days; do not use a NOTE for these."},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of the event in YYYY-MM-DD. Dates are whole days."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of the event in YYYY-MM-DD, inclusive: the event covers this day too. The event can cover at most 60 days counting both `from` and `to`, so `to` is at most 59 days after `from`."},"name":{"description":"Optional title in the athlete's language, max 200 characters. When omitted, STAS uses the English default Illness, Injury or Trip.","type":"string","maxLength":200},"text":{"description":"Optional description text, max 20000 characters.","type":"string","maxLength":20000},"change_reason":{"description":"Optional. One short sentence in the user's words about why the plan changed, e.g. \"can't train Wednesday, work\". Omit if the reason is unknown. Whitespace is collapsed and text over 200 characters is shortened.","type":"string"},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"required":["kind","from","to","dry_run"],"additionalProperties":false,"description":"Record an illness, injury or trip as ONE multi-day event in Intervals.icu, in the same format the STAS calendar writes. Use it instead of a note for these. The AI chat cannot delete this event; the athlete removes it in the STAS calendar or Intervals.icu."},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"save_week_review","description":"The only way to save a weekly review (week summary) to the STAS calendar. Send week_date (any date inside the week), a short title in the user's language, the summary text, and dry_run. STAS builds the note itself: the Sunday of that ISO week, external_id note:YYYY-MM-DD:weekly-review-wNN and for_week=true; do not build or send these fields. Calling it again for the same week updates the review; do not delete it first. If the result says the review was not changed, tell the user it was not applied and check with get_planned_events. dry_run is required: false saves, true previews only.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"week_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Any date inside the week to sum up (YYYY-MM-DD, local). STAS finds the ISO week (Monday to Sunday) itself."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"The week summary text to save, in the six labeled fields of the weekly review format."},"title":{"type":"string","minLength":1,"maxLength":120,"description":"Short note title in the user's language, for example 'Week May 18-24' or 'Итоги недели 18–24 мая'."},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"required":["week_date","text","title","dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"delete_plan_events","description":"Delete STAS plan events. For one specific workout, pass external_ids with the exact plan:YYYY-MM-DD:<slug> id; external_id as one string is accepted as a compatibility alias. Use oldest/newest window deletion only when the user is replacing the whole STAS plan in that date window. Do not use window deletion for simple edits; update with create_plan_event using the same external_id instead. dry_run is required: false deletes, true previews only.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"oldest":{"description":"Start date for full-window replacement deletes. Required unless external_ids is provided.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"newest":{"description":"End date for full-window replacement deletes. Required unless external_ids is provided.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"external_id":{"description":"Compatibility alias for deleting one exact STAS event id. Prefer external_ids for multiple ids.","anyOf":[{"type":"string","pattern":"^plan:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"string","pattern":"^note:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"}]},"external_ids":{"description":"Exact STAS event ids to delete. Use this for deleting specific workouts or notes without clearing the whole day/window.","minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","pattern":"^plan:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"string","pattern":"^note:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"}]}},"change_reason":{"description":"Optional. One short sentence in the user's words about why the plan changed, e.g. \"can't train Wednesday, work\". Omit if the reason is unknown. Whitespace is collapsed and text over 200 characters is shortened.","type":"string"},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"required":["dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"delete_note_events","description":"Delete STAS note events. For one specific note, pass external_ids with the exact note:YYYY-MM-DD:<slug> id; external_id as one string is accepted as a compatibility alias. Use oldest/newest window deletion only when replacing a whole note set in that date window. Do not delete user-created notes without a note: external_id. dry_run is required: false deletes, true previews only.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"oldest":{"description":"Start date for full-window replacement deletes. Required unless external_ids is provided.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"newest":{"description":"End date for full-window replacement deletes. Required unless external_ids is provided.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"external_id":{"description":"Compatibility alias for deleting one exact STAS event id. Prefer external_ids for multiple ids.","anyOf":[{"type":"string","pattern":"^plan:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"string","pattern":"^note:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"}]},"external_ids":{"description":"Exact STAS event ids to delete. Use this for deleting specific workouts or notes without clearing the whole day/window.","minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","pattern":"^plan:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"string","pattern":"^note:\\d{4}-\\d{2}-\\d{2}:[a-z0-9]+(?:-[a-z0-9]+)*$"}]}},"change_reason":{"description":"Optional. One short sentence in the user's words about why the plan changed, e.g. \"can't train Wednesday, work\". Omit if the reason is unknown. Whitespace is collapsed and text over 200 characters is shortened.","type":"string"},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"required":["dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"save_strategy","description":"Save the athlete preparation map only after explicit user confirmation. The map is the reusable result of long-horizon planning, not a calendar, weekly plan, workout prescription, or full coaching analysis. Target length is about 1800-4000 characters; hard maximum is 5000 characters. Required sections: Goal direction, Current phase, Preparation map, Durable boundaries, Review triggers / unknowns. Build from current goals, rules, profile, lastMetrics, wellness, training history, evidence, reports, and calendar first; treat previous strategy as historical context and contamination risk. Use at least 8 weeks of weekly/load history when available and 12-26 weeks for season direction, combined with exact bounded-list windows and selected detailed workout passports. Treat every dated goal as a real input and infer priority only when explicit. Store the agreed goal relationships, current phase purpose, a broad 3-6 phase route, what each phase develops/preserves/defers, transition conditions, durable boundaries, and causal review triggers. A phase may name its target capacity. Every Durable boundaries line must preserve a route-specific decision and must not repeat universal coaching, measurement, device, load-cost, or athlete rules. Local pain, sleep, recovery, illness, or execution signals change the near-term plan first and become map review triggers only when persistence would change phase feasibility, timing, sequence, or the goal route. Treat phase dates as approximate anchors and Transition when as review evidence, not hard gates; if unmet, consider adaptation, delayed or compressed transition, and remaining runway. Only the optional season field may contain phase dates, type, goal and an approximate weekly volume target as a revisable reference, not a prescription. Omit season to keep the saved phases; send the full season to replace them (copy profile.seasonPhases and change only what was agreed); send null only when the athlete agrees to remove them. Each phase starts Monday and ends Sunday (whole weeks). Do not store session frequency, easy/hard balance, weekly load targets, number of key workouts, default weekly stimuli, exact progression, workout formats/protocols, fixed taper depth, ready 2-4 week sequences, current Fitness/Fatigue/Form/TL, loaded windows, or live calendar state in Markdown. Old detailed strategies remain historical context: do not proactively ask the athlete to convert one merely because an internal audit calls it legacy. If profile.hasSeasonPhases is present and false (absent means the Season screen is not available: do not offer) and discussing season, preparation or strategy, offer once to add season phases (dates, type, goal, approximate weekly volume target) for the Season screen. Create or update the map only when the athlete asks for strategy/season work or explicitly agrees to a long-term route change. Before calling this tool, show the exact full markdown and ask for explicit confirmation. Never show one version and save another.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"strategy_md":{"type":"string","minLength":1,"maxLength":5000,"description":"Compact STAS preparation map: a saved result of long-horizon planning, not a calendar, weekly plan, workout prescription, or full coaching analysis. Target length is about 1800-4000 characters; hard maximum is 5000 characters. Required sections: Goal direction, Current phase, Preparation map, Durable boundaries, Review triggers / unknowns. Build from current goals, rules, profile, lastMetrics, wellness, reports, training history, evidence, and calendar first; do not copy or paraphrase previous_strategy unless current facts independently support the same durable decision. For strategy-level work, use at least 8 weeks of weekly/load history when available and 12-26 weeks for season direction; combine it with exact bounded-list windows and selected detailed workout passports instead of using only 2-4 weeks. Treat every dated goal as a real planning input by default; do not infer a single main goal from distance, later date, target result, profile order, or old strategy wording. Use priority only when it is explicit in the current profile, goal comment, athlete message, or current coaching decision. B/C/training-race/no-full-taper wording changes peak depth and risk; it does not mean the race should be ignored unless the athlete explicitly says the result does not matter. Store the agreed goal relationships, current phase purpose, a 3-6 phase seasonal route, what each phase develops/preserves/defers, broad transition conditions, durable boundaries, and causal review triggers. A phase may name the capacity it develops, but it must not prescribe exact weekly stimuli, workout formats, dose, load, support work, cuts, or taper. Do not store session frequency, easy/hard balance, weekly load targets, number of key workouts, default weekly stimulus, exact progression, workout protocols, fixed taper depth, ready 2-4 week sequences, or current Fitness/Fatigue/Form/TL. Every Durable boundaries line must preserve a route-specific decision that would be lost after reloading goals, athlete rules, and canonical planning rules; delete universal coaching, measurement, device, or load-cost rules from the map. Local pain, sleep, recovery, illness, or execution signals change the near-term plan first. Store them as map review triggers only when persistence or consequence would change phase feasibility, timing, sequence, or the goal route. Treat phase dates as approximate anchors and Transition when as review evidence, not hard gates. If a condition is unmet, consider adaptation, delayed or compressed transition, and remaining runway to the next goal instead of freezing the route. Old detailed strategies remain historical context. Do not proactively ask the athlete to convert one merely because it is legacy; create or update the map only when the athlete asks for strategy/season work or explicitly agrees to a long-term route change. Before save_strategy, show the user the exact full markdown and save only after explicit confirmation. Never show one version and save another."},"season":{"description":"Omit season to keep the saved phases; send the full season to replace them (copy profile.seasonPhases and change only what was agreed); send null only when the athlete agrees to remove them. Optional revisable season reference, not a prescription. Dates are YYYY-MM-DD; each phase starts Monday and ends Sunday (whole weeks). Targets use km, hours or metres per week according to measure. Include phase dates, type, optional goal and approximate weekly volume. When proposing season phases, show them in the same preview as the Markdown with a weekly_target range for every phase except rest and a goal of at most 120 characters. Measure: one road sport — distance or time; trail or mountain running — time with secondary elevation; more than one sport — time. Preview the reference with the strategy and save only after explicit confirmation.","anyOf":[{"type":"object","properties":{"measure":{"type":"string","enum":["distance","time","elevation"],"description":"More than one sport requires time; secondary elevation also requires time."},"secondary":{"description":"Elevation is allowed only when measure is time.","type":"string","const":"elevation"},"sports":{"minItems":1,"type":"array","items":{"type":"string","enum":["run","bike","swim","strength","other"]},"description":"More than one sport requires measure time."},"phases":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["base","build","specific","taper","recovery","rest"]},"title":{"type":"string","minLength":1,"maxLength":80},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Phase start date (YYYY-MM-DD) must be a Monday."},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Phase end date (YYYY-MM-DD) must be a Sunday."},"goal":{"type":"string","minLength":1,"maxLength":120},"weekly_target":{"description":"Required for every phase except rest; min must be less than or equal to max.","type":"object","properties":{"min":{"type":"number","minimum":0},"max":{"type":"number","minimum":0}},"required":["min","max"],"additionalProperties":false}},"required":["type","start_date","end_date"],"additionalProperties":false},"description":"Phases must be sorted and non-overlapping; the whole season is at most 12 months."}},"required":["measure","sports","phases"],"additionalProperties":false},{"type":"null"}]}},"required":["strategy_md"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"read_profile_sections","description":"Read controlled rules and profile memory with their hashes. Goals and results are available only through get_editable_goals_results. Use the returned hash as previousHash before previewing a rules/profile change.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"preview_profile_section_change","description":"Create a controlled preview for rules or profile memory. Goals, starts, activities, and results must use preview_goal_result_change so stable IDs and calendar links are preserved. This does not update the athlete profile. Before commit, show the user the exact full text from the preview and ask for explicit confirmation of that exact text.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"section":{"type":"string","enum":["rules","profile"],"description":"Profile memory section to update. Supports rules and profile when enabled by the server. Goals and results use preview_goal_result_change."},"structured":{"description":"Preferred input. For rules/profile, send only the matching object.","type":"object","properties":{"rules":{"description":"Use only when section is rules. Server builds the exact web-profile text.","type":"object","properties":{"trainingsPerWeek":{"description":"Exact single number for `Training sessions per week`. Do not send ranges, minimums, maximums, or flexible wording here.","type":"integer","minimum":1,"maximum":14},"offDays":{"description":"Exact single number for `Rest days per week`. Do not send ranges, minimums, maximums, or flexible wording here.","type":"integer","minimum":0,"maximum":7},"restDays":{"description":"Fixed rest weekdays for `Rest days`, only when the user names fixed weekdays.","type":"string","minLength":1},"customRules":{"description":"Complete replacement list of durable custom rules; include existing rules the athlete wants to keep. The server writes one `Rule:` line per item.","type":"array","items":{"type":"string","minLength":1}},"appendRules":{"description":"Add these durable custom rules to the current list. Use this for requests to add rules and keep the existing ones.","type":"array","items":{"type":"string","minLength":1}},"confirmRuleReplacement":{"description":"Set true only after the athlete explicitly confirms the replacement after being told which existing rules will be removed.","type":"boolean"},"additional":{"description":"Extra durable rule context that does not fit the other fields.","type":"string","minLength":1}},"additionalProperties":false},"profile":{"description":"Use only when section is profile. Server patches Athlete.info and builds the exact web-profile text; firstName is stored separately in the profile.","type":"object","properties":{"firstName":{"description":"Athlete first name shown in STAS. Non-empty; it cannot be cleared. Omit to preserve.","type":"string","minLength":1,"maxLength":100},"birthYear":{"description":"Birth year. Omit to preserve, null to clear.","anyOf":[{"type":"integer","minimum":1940,"maximum":2010},{"type":"null"}]},"gender":{"description":"Gender from the web profile form. Omit to preserve, null to clear.","anyOf":[{"type":"string","enum":["male","female"]},{"type":"null"}]},"height":{"description":"Height in cm. Omit to preserve, null to clear.","anyOf":[{"type":"integer","minimum":130,"maximum":230},{"type":"null"}]},"weight":{"description":"Weight in kg. Omit to preserve, null to clear.","anyOf":[{"type":"integer","minimum":30,"maximum":200},{"type":"null"}]},"heightInput":{"description":"Explicit height units. Use {value,unit:'in'} or {feet,inches,unit:'ft_in'} for US measurements; null clears. Omit to preserve.","anyOf":[{"anyOf":[{"type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","enum":["cm","in"]}},"required":["value","unit"],"additionalProperties":false},{"type":"object","properties":{"feet":{"type":"integer","minimum":0,"maximum":9007199254740991},"inches":{"type":"number","minimum":0,"exclusiveMaximum":12},"unit":{"type":"string","const":"ft_in"}},"required":["feet","inches","unit"],"additionalProperties":false}]},{"type":"null"}]},"weightInput":{"description":"Explicit weight units, for example {value:180,unit:'lb'}; null clears. Omit to preserve.","anyOf":[{"type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","enum":["kg","lb"]}},"required":["value","unit"],"additionalProperties":false},{"type":"null"}]},"maxHr":{"description":"Maximum heart rate. Omit to preserve, null to clear.","anyOf":[{"type":"integer","minimum":100,"maximum":220},{"type":"null"}]},"ltHr":{"description":"Lactate-threshold heart rate. Omit to preserve, null to clear.","anyOf":[{"type":"integer","minimum":100,"maximum":220},{"type":"null"}]},"raceResults":{"description":"Race PR list. If provided, replaces the whole list; [] or null clears it. Omit to preserve.","anyOf":[{"type":"array","items":{"type":"object","properties":{"distance":{"type":"string","minLength":1,"description":"Race distance, for example 5 км, 10 km, half marathon, or marathon."},"result":{"type":"string","minLength":1,"description":"Finish result, for example 20:15 or 1:42:30."},"date":{"description":"Optional race date or month. Send null only to omit it for this race result.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["distance","result"],"additionalProperties":false}},{"type":"null"}]},"otherSports":{"description":"Other sports. Omit to preserve, null to clear.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"additional":{"description":"Additional durable profile context. Omit to preserve, null to clear.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false},"newText":{"description":"Legacy fallback full section text for rules or profile only.","type":"string","minLength":1},"clear":{"description":"Clear the whole rules or profile section (it becomes empty; the first name stays). Use alone, without structured or newText, only when the user explicitly asks to remove everything in that section.","type":"boolean","const":true},"previousHash":{"type":"string","minLength":1,"description":"Hash returned by read_profile_sections for the same section. Used to prevent overwriting newer profile data."},"diffSummary":{"description":"Short internal summary of the factual change. Do not include raw chat transcript.","type":"string","minLength":1}},"required":["section","previousHash"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"commit_profile_section_change","description":"Commit a previously previewed rules or profile memory change. Call this only after the user explicitly confirms the exact full text shown for that preview. If preview returned noChange=true, do not call commit. The server updates the profile only if the section hash still matches the preview.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"changeId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Preview change id returned by preview_profile_section_change. Call only after the user explicitly confirms the exact full text shown for this preview."}},"required":["changeId"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"read_profile_change_history","description":"Read a compact paginated index of goals, rules, or profile memory changes. Text bodies and hashes are omitted. Use nextCursor for another page and read_profile_change_detail for one exact record.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"section":{"type":"string","enum":["goals","rules","profile"]},"status":{"type":"string","enum":["previewed","committed","restored","expired","conflict","rejected"]},"limit":{"description":"Compact records per page. Default 10, maximum 20.","type":"integer","minimum":1,"maximum":20},"cursor":{"description":"nextCursor from the previous history page.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"read_profile_change_detail","description":"Load the exact full text and hashes for one profile-memory record selected from read_profile_change_history. This is read-only and should be used only for details or before considering a restore.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"changeId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Change id returned by read_profile_change_history."}},"required":["changeId"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"restore_profile_change","description":"Restore a committed profile, goals, or rules profile memory change back to its previous text. First load the exact record with read_profile_change_detail. For goals, restoring old-format labels is blocked; rebuild a canonical goals preview instead. Call this only after the user explicitly confirms the exact full text that will be restored.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"changeId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Committed change id to restore. Call only after the user explicitly confirms the exact full text that will be restored. Restore only succeeds when the current section still matches that change."}},"required":["changeId"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"save_workout_rating","description":"Set RPE, the athlete's report and/or condition tags for one completed workout (same as the calendar on the site). Only the fields you send change: rpe-only keeps the report, report-only keeps RPE, condition_tags replaces only the tags (they stay in STAS and are not sent to Intervals.icu); rpe:null clears RPE. Use only the athlete's own words and numbers; never invent RPE or report text. First call with dry_run=true and show current -> new (current.effectiveRpe/rpeSource is the RPE the calendar shows now, possibly from Intervals.icu); call dry_run=false only after explicit confirmation. Result intervals: queued = saved in STAS, STAS sends it to Intervals.icu in the background, usually within a minute (do not call again); sent = Intervals.icu already has this value; none = RPE was not changed; unsupported = Strava-imported activity, RPE saved only in STAS (tell the athlete); not_connected = the connected training service needs reconnecting, RPE saved only in STAS. The report text is copied to the Intervals.icu description in the background; do not promise when.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"training_id":{"type":"string","minLength":1,"maxLength":64,"description":"Exact training_id of a completed workout from get_trainings."},"rpe":{"description":"RPE 1-10 the athlete stated. null clears RPE. Omit to keep the current RPE.","anyOf":[{"type":"integer","minimum":1,"maximum":10},{"type":"null"}]},"report":{"description":"The athlete's own report text, in their words. An empty string removes the report text. Omit to keep the current report.","type":"string","maxLength":20000},"no_report":{"description":"true marks «No report» (only when the report text is empty); false removes that mark. Omit to keep.","type":"boolean"},"condition_tags":{"description":"Condition tags the athlete stated for this workout; replaces the whole set. [] removes all tags. Omit to keep the current tags. Sport sets: WeightTraining/Workout/Crossfit/HighIntensityIntervalTraining: home, bodyweight, short_session, after_endurance, tired, pain, technique, test (max or rep-max), coached, unwell. Yoga/Pilates/Stretching: tired, pain, short_session, unwell. Other sports: heat, cold, weather, offroad, altitude, indoor, group, test, unwell. Any known code may be saved, including previously selected tags outside the sport set.","maxItems":17,"type":"array","items":{"type":"string","enum":["heat","cold","weather","offroad","altitude","indoor","group","test","unwell","home","short_session","after_endurance","tired","pain","technique","coached","bodyweight"]}},"dry_run":{"type":"boolean","description":"Required. true only shows what would change and writes nothing; false writes. Call with false only after the user explicitly confirms the shown change."}},"required":["training_id","dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"read_sport_thresholds","description":"Read run/ride/swim thresholds (LTHR, threshold pace, FTP, CSS). Values come from STAS's stored copy of the Intervals.icu sport settings (source intervals) or older STAS manual values (source stas), with syncedAt = when the copy was last updated. It is a stored copy, not a fresh read: do not call it live. Run pace is seconds per km, CSS seconds per 100 m. Max HR lives in the profile section (read_profile_sections), not here.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"save_sport_thresholds","description":"Change thresholds in the athlete's Intervals.icu sport settings, like the Thresholds card on the site: run lthr/pace_sec_per_km, ride ftp/lthr, swim css_sec_per_100m. This is the only place that changes LTHR in Intervals.icu (ltHr in the profile section changes only STAS text). HR zones are not recalculated. First dry_run=true: it shows the stored copy (with syncedAt; call it the saved copy, not fresh data) and the new values; then dry_run=false only after explicit confirmation. Outcomes: saved (readbackConfirmed:false means Intervals.icu accepted the write but STAS could not read it back: it IS saved, do not save again, check later with read_sport_thresholds); invalid; no_settings (no sport settings for this sport in Intervals.icu, nothing created); reconnect (the athlete must reconnect the connected training service); email_verification_required; failed = not saved, can be repeated later; rate_limited = not saved, repeat no sooner than retryAfterSec.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sport":{"type":"string","enum":["run","ride","swim"],"description":"Sport whose Intervals.icu sport settings change."},"lthr":{"description":"Lactate-threshold heart rate, bpm (run or ride).","type":"integer","minimum":80,"maximum":250},"pace_sec_per_km":{"description":"Run threshold pace in seconds per km (run only).","type":"number","minimum":120,"maximum":900},"ftp":{"description":"FTP in watts (ride only).","type":"integer","minimum":50,"maximum":2000},"css_sec_per_100m":{"description":"Swim CSS in seconds per 100 m (swim only).","type":"number","minimum":40,"maximum":400},"dry_run":{"type":"boolean","description":"Required. true only shows what would change and writes nothing; false writes. Call with false only after the user explicitly confirms the shown change."}},"required":["sport","dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"read_measurement_preferences","description":"Read the athlete's measurement units. preferences.stored holds the exact saved values (measurementSystem metric|us|null, swimUnitOverride m|yd|null; null = not chosen); pass them unchanged as expected_* to save_measurement_preferences. preferences.effective is what STAS shows; featureAvailable=false means unit choice is not available for this account yet.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"save_measurement_preferences","description":"Change measurement units (metric or us) and/or the pool unit override (m, yd or null = follow the system). First call read_measurement_preferences, then dry_run=true with expected_* copied from preferences.stored, show current -> new, and call dry_run=false with the same expected_* only after explicit confirmation (do not re-read in between). If both fields change, they are saved one after another; the second keeps the first. A conflict (HTTP 409) means the units changed elsewhere: show the new state and do not write again without a new confirmation. HTTP 403 means unit choice is not available for this account yet.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"measurement_system":{"description":"New measurement system.","type":"string","enum":["metric","us"]},"expected_measurement_system":{"description":"Required with measurement_system: preferences.stored.measurementSystem exactly as read_measurement_preferences returned it (null included).","anyOf":[{"type":"string","enum":["metric","us"]},{"type":"null"}]},"swim_unit_override":{"description":"New pool unit override; null removes the override (pool unit then follows the measurement system).","anyOf":[{"type":"string","enum":["m","yd"]},{"type":"null"}]},"expected_swim_unit_override":{"description":"Required with swim_unit_override: preferences.stored.swimUnitOverride exactly as read_measurement_preferences returned it (null included).","anyOf":[{"type":"string","enum":["m","yd"]},{"type":"null"}]},"dry_run":{"type":"boolean","description":"Required. true only shows what would change and writes nothing; false writes. Call with false only after the user explicitly confirms the shown change."}},"required":["dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"delete_strategy","description":"Delete the athlete's saved preparation map (strategy). Irreversible: the map cannot be restored from STAS. Only when the athlete explicitly asks to delete it. First dry_run=true shows the beginning of the map and when it was saved; show it and call dry_run=false only after explicit confirmation. deleted:false with reason no_strategy means there was nothing to delete. An error means the strategy was NOT deleted; never say it was.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"dry_run":{"type":"boolean","description":"Required. true only shows what would change and writes nothing; false writes. Call with false only after the user explicitly confirms the shown change."}},"required":["dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"mark_workout_done","description":"Record a completed workout like the calendar buttons on the site: kind=alreadyDone («Already done», a workout done without a device: date, time, type, duration_min required, distance optional) or kind=markDone («Mark as done» for a planned event from get_planned_events: event_id and date; time and duration default to the plan). This creates a real activity in Intervals.icu. Only on the athlete's explicit request and only with the athlete's own facts (type, time, duration, distance, RPE, report); ask for missing ones, never invent them. First dry_run=true and show what will be written; dry_run=false only after explicit confirmation. Repeating the same request does not create a second activity. Outcomes: saved (activityId); HTTP 403 calendar_done_disabled = not available for this account; 404 plan_missing; 409 failed with a reason (reconnect_required, conflict, ...); 429/503 delayed = it may or may not have been written: repeat the same call later (no sooner than retryAfterSec), it will not duplicate.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["alreadyDone","markDone"],"description":"alreadyDone records a workout done without a device and without a planned event; markDone marks a planned workout from get_planned_events as done."},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Day it was done, YYYY-MM-DD, as the athlete said."},"time":{"description":"Local start time HH:MM as the athlete said. Required for alreadyDone; for markDone the planned time is used when omitted (required when the plan has no time). Ask if unknown; never invent it.","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"type":{"description":"alreadyDone only, required: Intervals.icu activity type, for example Run, Ride, Swim, Walk.","type":"string","enum":["Run","VirtualRun","TrailRun","Walk","Hike","Ride","VirtualRide","GravelRide","MountainBikeRide","EBikeRide","EMountainBikeRide","TrackRide","Velomobile","Handcycle","Swim","OpenWaterSwim","Rowing","VirtualRow","Kayaking","Canoeing","StandUpPaddling","Surfing","Kitesurf","Windsurf","Sail","WaterSport","AlpineSki","NordicSki","BackcountrySki","RollerSki","VirtualSki","Snowboard","Snowshoe","IceSkate","WeightTraining","Workout","Crossfit","HighIntensityIntervalTraining","Elliptical","StairStepper","RockClimbing","Yoga","Pilates","Stretching","Soccer","Tennis","Badminton","Squash","TableTennis","Padel","Pickleball","Racquetball","Hockey","Rugby","Golf","InlineSkate","Skateboard","Wheelchair","Transition","Other"]},"name":{"description":"alreadyDone only: optional title; defaults to the type.","type":"string","minLength":1,"maxLength":200},"event_id":{"description":"markDone only, required: numeric id of the planned event from get_planned_events.","type":"string","pattern":"^\\d{1,15}$"},"duration_min":{"description":"Duration in minutes as the athlete said. Required for alreadyDone; for markDone the planned duration is used when omitted. Never invent it.","type":"integer","minimum":1,"maximum":1440},"distance_meters":{"description":"alreadyDone only: distance in meters, only if the athlete gave it.","type":"number","exclusiveMinimum":0,"maximum":1000000},"rpe":{"description":"RPE 1-10 only if the athlete gave it.","type":"integer","minimum":1,"maximum":10},"report":{"description":"The athlete's own report text, only if given.","type":"string","maxLength":20000},"no_report":{"description":"true marks «No report» when there is no report text.","type":"boolean"},"dry_run":{"type":"boolean","description":"Required. true only shows what would change and writes nothing; false writes. Call with false only after the user explicitly confirms the shown change."}},"required":["kind","date","dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"edit_calendar_item","description":"Edit one exact calendar item with {edit:{action:'set_race',activity_id,race}}, {edit:{action:'delete_manual_activity',activity_id}}, or {edit:{action:'move_event',event_id,to_date,expected_start_date_local?}}. Always call with dry_run=true first and show the returned preview. For move_event copy expected_start_date_local exactly from the preview; after explicit confirmation call with dry_run=false. The server rejects events changed since preview. Repeating a move to the same absolute date is safe and never shifts it twice. Only ordinary CALENDAR:WRITE grants move; race and manual deletion require ACTIVITY:WRITE. Agent Auth stays read-only. For WeightTraining never put exercises, sets, reps or weights in stas_note or name: create the event, then attach exercises with preview_strength_plan and commit_strength_plan.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"edit":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"set_race"},"activity_id":{"type":"string","pattern":"^i?\\d{1,15}$","description":"Completed Intervals activity id from get_trainings. Strava activities cannot be changed."},"race":{"type":"boolean","description":"true to mark as a race; false to remove the race mark."}},"required":["action","activity_id","race"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"delete_manual_activity"},"activity_id":{"type":"string","pattern":"^i?\\d{1,15}$","description":"Completed activity id from get_trainings. Only a manual activity entered in STAS can be deleted; imported activities and strength records are not eligible."}},"required":["action","activity_id"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"move_event"},"event_id":{"type":"string","pattern":"^\\d{1,15}$","description":"Exact numeric provider event id from get_planned_events."},"to_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Absolute destination calendar date, YYYY-MM-DD. Repeating the same request never moves the event a second time."},"expected_start_date_local":{"description":"Copy exactly from the move preview. Required for dry_run=false; omitted for preview. Prevents moving an event changed since preview.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2})?$"}},"required":["action","event_id","to_date"],"additionalProperties":false}]},"dry_run":{"type":"boolean","description":"Required. true only shows what would change and writes nothing; false writes. Call with false only after the user explicitly confirms the shown change."}},"required":["edit","dry_run"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_strength_exercises","description":"Available only to accounts with Strength Lab enabled. Read the strength exercise catalog available to this athlete, including recent personal usage and hasDescription per exercise (saved texts are in get_strength_plan). Filter by query (name, aliases, equipment), equipment, or category. imageUrl: picture of the exercise (catalog only); you may show it as an image when presenting the exercise. Use it to pick valid exerciseId values for strength plan tools. Fill missing descriptions via entry.description when composing a plan.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"category":{"description":"Filter by shared catalog category; personal exercises have no category.","type":"string","enum":["strength","core","mobility","running_drill","plyometric","balance","swim_dryland"]},"equipment":{"description":"Filter by equipment.","type":"string","enum":["barbell","dumbbell","kettlebell","machine","cable","bodyweight","band","other"]},"query":{"description":"Search exercise names and aliases in any supported language.","type":"string"}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_strength_sessions","description":"Available only to accounts with Strength Lab enabled. Read whole logged strength workouts with sets, plan and skipped sets. Use nextCursor to continue. For progression of one exercise use get_strength_exercise_history.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"type":"integer","minimum":1,"maximum":20},"cursor":{"description":"Use nextCursor from the previous page with the same date filters.","type":"string","minLength":1,"maxLength":1024}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_strength_exercise_history","description":"Available only to accounts with Strength Lab enabled. Read completed sets for one exercise, with numeric weight, reps or seconds and workout context. Pass exerciseIds (up to 10) to get the latest 12 workouts for each exercise in one call. For a batch result, continue one exercise by passing its exerciseId and nextCursor. A null planned field means there is no confirmed assignment for that exercise block.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"type":"integer","minimum":1,"maximum":20},"cursor":{"description":"Use nextCursor from the previous page with the same date filters.","type":"string","minLength":1,"maxLength":1024},"exerciseId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Stable exercise ID from get_strength_exercises."},"exerciseIds":{"description":"Load recent history for up to 10 exercises in one request. Each result has its own nextCursor, which can be passed with exerciseId to continue that exercise.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$","description":"Stable exercise ID from get_strength_exercises."}}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"get_strength_plan","description":"Available only to accounts with Strength Lab enabled. Read planned or in-progress strength sessions for one date (each with its sessionId), including hasDescription and the saved description per exercise. Works without Intervals access. Completed sessions are returned by get_strength_sessions or get_strength_exercise_history, which include their saved plan when available. Use its dataVersion before previewing or committing a strength plan.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["date"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"preview_strength_plan","description":"Available only to accounts with Strength Lab enabled. Search the library first (get_strength_exercises). Only if the movement is absent use newExercise; STAS draws its picture later (not instantly) from the name and description. name = movement + equipment. description = technique only (setup, movement, main mistake), 3–4 short lines; never sets, reps, weight, RPE, rest or warm-up. Attach an exercise plan to an existing planned WeightTraining event (create the event first with create_plan_event), or edit a planned workout by sessionId; when Intervals is not connected or its access is broken, plan a strength workout with date and title instead of an event (409 event_required means Intervals access exists: create the event first; intervals_not_connected or intervals_reconnect_required means this account cannot plan without Intervals: tell the athlete to connect or reconnect Intervals). Only strength can be planned without Intervals: for a run, ride or other plan say it is available after connecting Intervals. Moving or deleting a planned strength workout, or doing it on another day, is done on the website (after Intervals access is restored if it already has an event); a workout that has an event cannot be renamed. planned_session_exists returns the existing workout: change its exercises with sessionId; optionally set programId, sessionVariant A/B, and role build/maintain/protect/recovery when the athlete identifies them; never guess these labels. Never saves; show the athlete the exact preview and ask for explicit confirmation before commit_strength_plan. Include entry.description for newExercise and hasDescription:false; use the user's language, max 600 characters. Preserve existing descriptions unless the athlete asks to revise one; only then send description and updateDescription:true.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warmup":{"description":"Preferred: {\"text\": \"walk 5 min, hip circles\", \"minutes\": 18}; a plain string is accepted as text. One block with a plain-language sequence of movements in the athlete’s language. Track once. Omit to keep, null to remove. Do not split the block into exercise entries.","anyOf":[{"type":"string"},{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"minutes":{"type":"integer","minimum":1,"maximum":120}},"required":["text"],"additionalProperties":false},{"type":"null"}]},"cooldown":{"description":"Preferred: {\"text\": \"walk 5 min, hip circles\", \"minutes\": 18}; a plain string is accepted as text. One block with a plain-language sequence of movements in the athlete’s language. Track once. Omit to keep, null to remove. Do not split the block into exercise entries.","anyOf":[{"type":"string"},{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"minutes":{"type":"integer","minimum":1,"maximum":120}},"required":["text"],"additionalProperties":false},{"type":"null"}]},"eventId":{"description":"Stable public ID of the existing planned WeightTraining event. Pass exactly one of eventId, sessionId, date.","type":"string","minLength":1},"sessionId":{"description":"STAS session number (sessionId from get_strength_plan or get_strength_sessions) of a planned strength workout, to change its exercises.","type":"string","minLength":1},"date":{"description":"Day (YYYY-MM-DD) to plan a strength workout without an Intervals event; only when Intervals is not connected or its access is broken; title is then required. Repeating the same day and title returns the same workout.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"title":{"description":"Workout title. Required with date. Never changes the title of a workout that has an Intervals event.","type":"string","minLength":1},"programId":{"description":"Stable program or training-series ID. Keep it the same across related A/B sessions.","type":"string","minLength":1,"maxLength":64},"sessionVariant":{"description":"Variant of the recurring session in this program.","type":"string","enum":["A","B"]},"role":{"description":"Purpose of this strength session.","type":"string","enum":["build","maintain","protect","recovery"]},"change_reason":{"description":"Optional. One short sentence in the user's words about why the plan changed, e.g. \"can't train Wednesday, work\". Omit if the reason is unknown. Whitespace is collapsed and text over 200 characters is shortened.","type":"string"},"entries":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"exerciseId":{"type":"string","minLength":1},"newExercise":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"logType":{"type":"string","enum":["weight_reps","reps","time"]},"equipment":{"type":"string","enum":["barbell","dumbbell","kettlebell","machine","cable","bodyweight","band","other"]}},"required":["name","logType","equipment"],"additionalProperties":false},"sets":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"weightKg":{"type":"number","exclusiveMinimum":0},"reps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"description":{"description":"Technique only, 3–4 short lines in the user's language, max 600 characters. Required for newExercise; saved per athlete/exercise only on commit.","type":"string","minLength":1,"maxLength":600},"updateDescription":{"description":"Replace an existing description only when the athlete asks to revise it.","type":"boolean"}},"required":["sets"],"additionalProperties":false}},"dataVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","dataVersion"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"commit_strength_plan","description":"Available only to accounts with Strength Lab enabled. Search the library first (get_strength_exercises). Only if the movement is absent use newExercise; STAS draws its picture later (not instantly) from the name and description. name = movement + equipment. description = technique only (setup, movement, main mistake), 3–4 short lines; never sets, reps, weight, RPE, rest or warm-up. Call only after the athlete explicitly confirmed the exact preview; send the same arguments, including description/updateDescription, plus previewHash; the server rejects stale data. Descriptions are shared across this athlete's workouts. If descriptionFailures is returned, the plan was saved but descriptions for those exerciseId values were not; tell the athlete.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"warmup":{"description":"Preferred: {\"text\": \"walk 5 min, hip circles\", \"minutes\": 18}; a plain string is accepted as text. One block with a plain-language sequence of movements in the athlete’s language. Track once. Omit to keep, null to remove. Do not split the block into exercise entries.","anyOf":[{"type":"string"},{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"minutes":{"type":"integer","minimum":1,"maximum":120}},"required":["text"],"additionalProperties":false},{"type":"null"}]},"cooldown":{"description":"Preferred: {\"text\": \"walk 5 min, hip circles\", \"minutes\": 18}; a plain string is accepted as text. One block with a plain-language sequence of movements in the athlete’s language. Track once. Omit to keep, null to remove. Do not split the block into exercise entries.","anyOf":[{"type":"string"},{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"minutes":{"type":"integer","minimum":1,"maximum":120}},"required":["text"],"additionalProperties":false},{"type":"null"}]},"eventId":{"description":"Stable public ID of the existing planned WeightTraining event. Pass exactly one of eventId, sessionId, date.","type":"string","minLength":1},"sessionId":{"description":"STAS session number (sessionId from get_strength_plan or get_strength_sessions) of a planned strength workout, to change its exercises.","type":"string","minLength":1},"date":{"description":"Day (YYYY-MM-DD) to plan a strength workout without an Intervals event; only when Intervals is not connected or its access is broken; title is then required. Repeating the same day and title returns the same workout.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"title":{"description":"Workout title. Required with date. Never changes the title of a workout that has an Intervals event.","type":"string","minLength":1},"programId":{"description":"Stable program or training-series ID. Keep it the same across related A/B sessions.","type":"string","minLength":1,"maxLength":64},"sessionVariant":{"description":"Variant of the recurring session in this program.","type":"string","enum":["A","B"]},"role":{"description":"Purpose of this strength session.","type":"string","enum":["build","maintain","protect","recovery"]},"change_reason":{"description":"Optional. One short sentence in the user's words about why the plan changed, e.g. \"can't train Wednesday, work\". Omit if the reason is unknown. Whitespace is collapsed and text over 200 characters is shortened.","type":"string"},"entries":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"exerciseId":{"type":"string","minLength":1},"newExercise":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"logType":{"type":"string","enum":["weight_reps","reps","time"]},"equipment":{"type":"string","enum":["barbell","dumbbell","kettlebell","machine","cable","bodyweight","band","other"]}},"required":["name","logType","equipment"],"additionalProperties":false},"sets":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"weightKg":{"type":"number","exclusiveMinimum":0},"reps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"description":{"description":"Technique only, 3–4 short lines in the user's language, max 600 characters. Required for newExercise; saved per athlete/exercise only on commit.","type":"string","minLength":1,"maxLength":600},"updateDescription":{"description":"Replace an existing description only when the athlete asks to revise it.","type":"boolean"}},"required":["sets"],"additionalProperties":false}},"dataVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"previewHash":{"type":"string","minLength":1}},"required":["entries","dataVersion","previewHash"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"preview_strength_log","description":"Available only to accounts with Strength Lab enabled. Search the library first (get_strength_exercises). Only if the movement is absent use newExercise; STAS draws its picture later (not instantly) from the name and description. name = movement + equipment. description = technique only (setup, movement, main mistake), 3–4 short lines; never sets, reps, weight, RPE, rest or warm-up. Before logging a completed strength workout, read that day's trainings (get_trainings oldest=D, newest=D+1). If a watch activity for it exists, pass its trainingId instead of creating a new workout. Preview actual completed sets reported by the athlete; never invent numbers. Show the exact preview for confirmation. If session_started is returned, tell the athlete to finish or correct the workout in the app and do not retry the write. For a new manual (non-watch) log, durationSeconds is required; for a watch activity, durationSeconds is forbidden. Include entry.description for newExercise and hasDescription:false, in the user's language (max 600 characters). Preserve existing descriptions unless the athlete asks to revise one; then send updateDescription:true. If descriptionFailures is returned, tell the athlete those descriptions were not saved.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"eventId":{"type":"string","minLength":1},"sessionId":{"description":"Number of the planned STAS workout this log completes (from get_strength_plan or the preview's plannedSessions). Without it a planned workout is left untouched. The date must be the workout's own date.","type":"string","minLength":1},"trainingId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"entries":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"exerciseId":{"type":"string","minLength":1},"newExercise":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"logType":{"type":"string","enum":["weight_reps","reps","time"]},"equipment":{"type":"string","enum":["barbell","dumbbell","kettlebell","machine","cable","bodyweight","band","other"]}},"required":["name","logType","equipment"],"additionalProperties":false},"sets":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"weightKg":{"type":"number","exclusiveMinimum":0},"reps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"description":{"description":"Technique only, 3–4 short lines in the user's language, max 600 characters. Required for newExercise; saved per athlete/exercise only on commit.","type":"string","minLength":1,"maxLength":600},"updateDescription":{"description":"Replace an existing description only when the athlete asks to revise it.","type":"boolean"}},"required":["sets"],"additionalProperties":false}},"durationSeconds":{"type":"integer","minimum":60,"maximum":86400},"rpe":{"type":"integer","minimum":1,"maximum":10},"note":{"type":"string","maxLength":2000},"dataVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["date","entries","dataVersion"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"commit_strength_log","description":"Available only to accounts with Strength Lab enabled. Search the library first (get_strength_exercises). Only if the movement is absent use newExercise; STAS draws its picture later (not instantly) from the name and description. name = movement + equipment. description = technique only (setup, movement, main mistake), 3–4 short lines; never sets, reps, weight, RPE, rest or warm-up. Before logging a completed strength workout, read that day's trainings (get_trainings oldest=D, newest=D+1). If a watch activity for it exists, pass its trainingId instead of creating a new workout. Save only after confirmation of the exact preview. For corrections send the full corrected facts. If session_started is returned, tell the athlete to finish or correct the workout in the app and do not retry the write. For a new manual (non-watch) log, durationSeconds is required; for a watch activity, durationSeconds is forbidden. Include entry.description for newExercise and hasDescription:false, in the user's language (max 600 characters). Preserve existing descriptions unless the athlete asks to revise one; then send updateDescription:true. If descriptionFailures is returned, tell the athlete those descriptions were not saved.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"eventId":{"type":"string","minLength":1},"sessionId":{"description":"Number of the planned STAS workout this log completes (from get_strength_plan or the preview's plannedSessions). Without it a planned workout is left untouched. The date must be the workout's own date.","type":"string","minLength":1},"trainingId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"entries":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"exerciseId":{"type":"string","minLength":1},"newExercise":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"logType":{"type":"string","enum":["weight_reps","reps","time"]},"equipment":{"type":"string","enum":["barbell","dumbbell","kettlebell","machine","cable","bodyweight","band","other"]}},"required":["name","logType","equipment"],"additionalProperties":false},"sets":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"weightKg":{"type":"number","exclusiveMinimum":0},"reps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"description":{"description":"Technique only, 3–4 short lines in the user's language, max 600 characters. Required for newExercise; saved per athlete/exercise only on commit.","type":"string","minLength":1,"maxLength":600},"updateDescription":{"description":"Replace an existing description only when the athlete asks to revise it.","type":"boolean"}},"required":["sets"],"additionalProperties":false}},"durationSeconds":{"type":"integer","minimum":60,"maximum":86400},"rpe":{"type":"integer","minimum":1,"maximum":10},"note":{"type":"string","maxLength":2000},"dataVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"previewHash":{"type":"string","minLength":1}},"required":["date","entries","dataVersion","previewHash"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"preview_strength_log_delete","description":"Available only to accounts with Strength Lab enabled. Preview deletion of the logged strength record. If STAS created the Intervals activity, that activity is deleted too; a watch/imported activity always stays. Nothing is saved until the athlete confirms the exact preview.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionId":{"type":"string","minLength":1},"dataVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sessionId","dataVersion"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}},{"name":"commit_strength_log_delete","description":"Available only to accounts with Strength Lab enabled. Deletes the logged strength record. If STAS created the Intervals activity, that activity is deleted too; a watch/imported activity always stays. Call only after confirmation of the exact preview.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionId":{"type":"string","minLength":1},"dataVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"previewHash":{"type":"string","minLength":1}},"required":["sessionId","dataVersion","previewHash"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ACTIVITY:WRITE","WELLNESS:WRITE","CALENDAR:WRITE","CHATS:WRITE","LIBRARY:WRITE","SETTINGS:WRITE"]}]}}],"resources":[{"uri":"stas://guide/product-overview","name":"Product overview","description":"Use lastMetrics/current metrics, wellness, reports, evidence, workouts, and calendar facts; do not expect a generated or stored Condition.","mimeType":"text/markdown"},{"uri":"stas://guide/how-to-ask","name":"How to ask STAS","description":"Short guidance on how the user should phrase requests to get the best result.","mimeType":"text/markdown"},{"uri":"stas://guide/data-and-evidence","name":"Data and evidence rules","description":"How to load and interpret STAS data before analysis or planning.","mimeType":"text/markdown"},{"uri":"stas://guide/planning-process","name":"Planning process","description":"Coaching rules for weekly plans, revisions, disruptions, and safe progression.","mimeType":"text/markdown"},{"uri":"stas://guide/plans-and-calendar","name":"How STAS works with plans","description":"Rules for reading, replacing, and writing STAS plan items in the Intervals calendar.","mimeType":"text/markdown"},{"uri":"stas://guide/notes-and-weekly-review","name":"Notes and weekly review","description":"When to save calendar notes and how to write useful weekly review notes.","mimeType":"text/markdown"},{"uri":"stas://guide/strategy","name":"What the preparation map means in STAS","description":"Explains the reusable long-horizon preparation map and when it may be updated.","mimeType":"text/markdown"},{"uri":"stas://guide/profile-memory","name":"Profile memory","description":"Rules for saving profile (including first name), goals, rules, thresholds, and units through MCP tools.","mimeType":"text/markdown"}],"prompts":[{"name":"start_here","description":"Start a new STAS conversation the right way and ask for the next best step."},{"name":"show_current_fitness","description":"Explain current fitness, recent load, and what matters most right now."},{"name":"analyze_recent_trainings","description":"Review recent workouts and explain what they say about fitness and fatigue."},{"name":"build_next_week_plan","description":"Create next week's training plan from fitness, goals, rules, and current calendar context."},{"name":"rewrite_current_plan","description":"Read the current plan, rewrite it cleanly, and avoid duplicate STAS events."},{"name":"update_strategy","description":"Review the current context and prepare an updated long-term strategy."},{"name":"explain_stas","description":"Explain what STAS does and how to use it."},{"name":"save_profile_context","description":"Save durable profile, goals, or rules context through the correct dedicated preview flow."},{"name":"create_weekly_review_note","description":"Create a short weekly review note as future-coach memory, not a report."},{"name":"plan_after_disruption","description":"Adjust the plan after illness, missed training, travel, pain, or poor recovery."}]}
