{"serverId":"mcp-registry/run.stas/stas","tools":[{"name":"create_note_event","fixed":{"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 review notes or 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 an","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["events","dry_run"],"properties":{"events":{"type":"array","items":{"type":"object","required":["category","name","start_date_local","end_date_local","description","external_id"],"properties":{"name":{"type":"string","minLength":1,"description":"Short note title."},"color":{"enum":["green","blue","orange"],"type":"string","description":"Optional. Usually omit for notes."},"category":{"type":"string","const":"NOTE","description":"Must be NOTE for calendar notes."},"for_week":{"type":"boolean","description":"Optional. Set true only for notes that apply to the whole week, such as weekly review notes. Do not stretch start/end over seven days; keep the note as a single all-day anchor date."},"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>."},"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."},"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."}},"additionalProperties":false},"minItems":1},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":612,"tokensAfter":612},{"name":"create_plan_event","fixed":{"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/Elliptica","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["events","dry_run"],"properties":{"events":{"type":"array","items":{"type":"object","required":["activity_type","name","start_date_local","end_date_local","stas_note","external_id"],"properties":{"name":{"type":"string","minLength":1,"description":"Short, specific workout name."},"color":{"enum":["green","blue","orange"],"type":"string","description":"Optional. Defaults to green for Run/Walk/Hike/Elliptical/NordicSki/HighIntensityIntervalTraining, blue for Ride/Swim, orange for Workout/WeightTraining/Yoga/Pilates/Stretching/Other."},"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."},"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>."},"moving_time":{"type":"integer","maximum":9007199254740991,"description":"Optional duration in seconds when it is known.","exclusiveMinimum":0},"activity_type":{"enum":["Run","Ride","Swim","Workout","WeightTraining","Yoga","Pilates","Stretching","Walk","Hike","Elliptical","NordicSki","HighIntensityIntervalTraining","Other"],"type":"string","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."},"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."},"workout_builder":{"type":"string","minLength":1,"description":"Native Intervals.icu Workout Builder text. Mandatory for interval/key workout saves; optional only for simple/easy workouts without structured steps. Use mainly for Run/Ride interval workouts with real steps. Do not include ## STAS or ## Workout; the server adds those wrappers."},"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."},"icu_training_load":{"type":"number","minimum":0,"description":"Optional estimated training load when it is known. Intervals.icu may store the load but exclude or partially weight non-cardio types such as WeightTraining, Yoga, Pilates, Stretching, Workout, or Other in Fitness/Fatigue depending on the athlete settings."}},"additionalProperties":false},"minItems":1,"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}]}"},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."}},"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}]}","additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":1459,"tokensAfter":1459},{"name":"delete_note_events","fixed":{"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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["dry_run"],"properties":{"newest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for full-window replacement deletes. Required unless external_ids is provided."},"oldest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for full-window replacement deletes. Required unless external_ids is provided."},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."},"external_id":{"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]+)*$"}],"description":"Compatibility alias for deleting one exact STAS event id. Prefer external_ids for multiple ids."},"external_ids":{"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]+)*$"}]},"maxItems":20,"minItems":1,"description":"Exact STAS event ids to delete. Use this for deleting specific workouts or notes without clearing the whole day/window."}},"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: true, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":479,"tokensAfter":479},{"name":"delete_plan_events","fixed":{"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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["dry_run"],"properties":{"newest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date for full-window replacement deletes. Required unless external_ids is provided."},"oldest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date for full-window replacement deletes. Required unless external_ids is provided."},"dry_run":{"type":"boolean","description":"Required. false writes to Intervals.icu; true only previews without writing."},"external_id":{"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]+)*$"}],"description":"Compatibility alias for deleting one exact STAS event id. Prefer external_ids for multiple ids."},"external_ids":{"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]+)*$"}]},"maxItems":20,"minItems":1,"description":"Exact STAS event ids to delete. Use this for deleting specific workouts or notes without clearing the whole day/window."}},"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: true, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":498,"tokensAfter":498},{"name":"get_activity_detail","fixed":{"name":"get_activity_detail","description":"Load a compact read-only passport for one completed workout after identifying its training_id with get_trainings. Use for detailed one completed workout questions about intervals, laps, splits, terrain, weather, efforts, segments, and data quality. 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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["training_id"],"properties":{"training_id":{"type":"string","minLength":1,"description":"Training id returned by get_trainings. Load get_trainings first to identify the exact workout."}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":230,"tokensAfter":230},{"name":"get_editable_goals_results","fixed":{"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. This tool does not change anything.","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":120,"tokensAfter":120},{"name":"get_goal_activity_candidates","fixed":{"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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["goalPublicId"],"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."}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":202,"tokensAfter":202},{"name":"get_planned_events","fixed":{"name":"get_planned_events","description":"Read only planned or scheduled events from the Intervals calendar in a date window, not completed activities. 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.","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["oldest","newest"],"properties":{"newest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"oldest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":171,"tokensAfter":171},{"name":"get_trainings","fixed":{"name":"get_trainings","description":"Use this for completed, finished, recorded, or uploaded activities, including workouts completed today. 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, reports, compact summaries, and choosing training_id; u","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"full":{"type":"boolean","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."},"limit":{"type":"integer","maximum":50,"minimum":1,"description":"Max trainings per page. Server cap is 50."},"newest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","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."},"offset":{"type":"integer","maximum":9007199254740991,"minimum":0,"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."},"oldest":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start boundary date in YYYY-MM-DD, inclusive."}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":505,"tokensAfter":505},{"name":"get_user_summary","fixed":{"name":"get_user_summary","description":"Start here for most conversations. Load the athlete's profile, goals, rules, recent load, current fitness context, performance evidence, optional bounded historical signals, planning guidance, and persistent STAS memory opportunities. 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 RE","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"section":{"enum":["profile","history","evidence","pace","plan"],"type":"string"}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":211,"tokensAfter":211},{"name":"get_wellness","fixed":{"name":"get_wellness","description":"Read all locally stored Intervals.icu wellness values for any requested date window; there is no fixed day cap and this read makes no live provider request. 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. healt","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["oldest","newest"],"properties":{"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."},"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."}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":311,"tokensAfter":311},{"name":"preview_goal_result_change","fixed":{"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. This never saves. Show the user the exact preview, including calendar/activity effects, and ask for explicit confirmation before commit_goal_result_change.","inputSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["expectedDataVersion","command"],"properties":{"command":{"anyOf":[{"type":"object","required":["type","operationId","title"],"properties":{"type":{"type":"string","const":"general_create","description":"Use exactly \"general_create\" as command.type."},"sport":{"anyOf":[{"enum":["run","ride","swim"],"type":"string"},{"type":"null"}]},"title":{"type":"string","maxLength":300,"minLength":1},"target":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}]},"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)$"},"deadlineDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"additionalProperties":false},{"type":"object","required":["type","operationId","goalPublicId"],"properties":{"type":{"type":"string","const":"general_update","description":"Use exactly \"general_update\" as command.type."},"sport":{"anyOf":[{"enum":["run","ride","swim"],"type":"string"},{"type":"null"}]},"title":{"type":"string","maxLength":300,"minLength":1},"target":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}]},"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)$"},"deadlineDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"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)$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","goalPublicId"],"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)$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","title","date","sport","distanceMeters","priority"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"type":{"type":"string","const":"start_create","description":"Use exactly \"start_create\" as command.type."},"sport":{"enum":["run","ride","swim"],"type":"string"},"title":{"type":"string","maxLength":300,"minLength":1},"target":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}:[0-5]\\d(?::[0-5]\\d)?$"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}]},"priority":{"enum":["A","B","C"],"type":"string"},"timezone":{"type":"string","maxLength":100,"minLength":1},"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)$"},"distanceMeters":{"type":"integer","maximum":1000000,"exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["type","operationId","goalPublicId"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"type":{"type":"string","const":"start_update","description":"Use exactly \"start_update\" as command.type."},"sport":{"enum":["run","ride","swim"],"type":"string"},"title":{"type":"string","maxLength":300,"minLength":1},"target":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}:[0-5]\\d(?::[0-5]\\d)?$"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}]},"priority":{"enum":["A","B","C"],"type":"string"},"timezone":{"type":"string","maxLength":100,"minLength":1},"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)$"},"distanceMeters":{"anyOf":[{"type":"integer","maximum":1000000,"exclusiveMinimum":0},{"type":"null"}]}},"additionalProperties":false},{"type":"object","required":["type","operationId","goalPublicId"],"properties":{"type":{"enum":["start_delete","start_cancel","start_dns"],"type":"string","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)$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","goalPublicId","resultKind","seconds"],"properties":{"type":{"type":"string","const":"result_set","description":"Use exactly \"result_set\" as command.type."},"seconds":{"type":"integer","maximum":604800,"exclusiveMinimum":0},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"resultKind":{"enum":["manual","official_chip","official_gun"],"type":"string"},"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)$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","goalPublicId","selectionId"],"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)$"},"selectionId":{"type":"string","pattern":"^[0-9a-f]{64}$"},"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)$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","goalPublicId"],"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)$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","sport","distanceMeters","seconds","actualDate"],"properties":{"type":{"type":"string","const":"manual_result_create","description":"Use exactly \"manual_result_create\" as command.type."},"sport":{"enum":["run","ride","swim"],"type":"string"},"seconds":{"type":"integer","maximum":604800,"exclusiveMinimum":0},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"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)$"},"distanceMeters":{"type":"integer","maximum":1000000,"exclusiveMinimum":0}},"description":"Create a standalone result. Multiple results for the same sport and distance are allowed.","additionalProperties":false},{"type":"object","required":["type","operationId","resultPublicId","sport","distanceMeters","seconds","actualDate"],"properties":{"type":{"type":"string","const":"manual_result_update","description":"Use exactly \"manual_result_update\" as command.type."},"sport":{"enum":["run","ride","swim"],"type":"string"},"seconds":{"type":"integer","maximum":604800,"exclusiveMinimum":0},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"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)$"},"distanceMeters":{"type":"integer","maximum":1000000,"exclusiveMinimum":0},"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)$"}},"description":"Update one existing standalone result. Use the resultPublicId returned in manualResults.","additionalProperties":false},{"type":"object","required":["type","operationId","resultPublicId"],"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)$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","expectedBestResultVersion","legacyToken","sport","distanceMeters","seconds","actualDate"],"properties":{"type":{"type":"string","const":"legacy_result_convert","description":"Use exactly \"legacy_result_convert\" as command.type."},"sport":{"enum":["run","ride","swim"],"type":"string"},"seconds":{"type":"integer","maximum":604800,"exclusiveMinimum":0},"actualDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"legacyToken":{"type":"string","pattern":"^[0-9a-f]{64}$"},"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)$"},"distanceMeters":{"type":"integer","maximum":1000000,"exclusiveMinimum":0},"expectedBestResultVersion":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"additionalProperties":false},{"type":"object","required":["type","operationId","expectedBestResultVersion","legacyToken"],"properties":{"type":{"type":"string","const":"legacy_result_delete","description":"Use exactly \"legacy_result_delete\" as command.type."},"legacyToken":{"type":"string","pattern":"^[0-9a-f]{64}$"},"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}$"}},"additionalProperties":false}],"description":"One exact goal, start, activity-link, or result change. Broad replace-all writes are not supported."},"expectedDataVersion":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Exact dataVersion returned by get_editable_goals_results. A stale version is rejected."}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":3648,"tokensAfter":3648},{"name":"preview_profile_section_change","fixed":{"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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["section","previousHash"],"properties":{"newText":{"type":"string","minLength":1,"description":"Legacy fallback full section text for rules or profile only."},"section":{"enum":["rules","profile"],"type":"string","description":"Profile memory section to update. Supports rules and profile when enabled by the server. Goals and results use preview_goal_result_change."},"structured":{"type":"object","properties":{"rules":{"type":"object","properties":{"offDays":{"type":"integer","maximum":7,"minimum":0,"description":"Exact single number for `Rest days per week`. Do not send ranges, minimums, maximums, or flexible wording here."},"restDays":{"type":"string","minLength":1,"description":"Fixed rest weekdays for `Rest days`, only when the user names fixed weekdays."},"additional":{"type":"string","minLength":1,"description":"Extra durable rule context that does not fit the other fields."},"customRules":{"type":"array","items":{"type":"string","minLength":1},"description":"Separate durable custom rules. The server writes one `Rule:` line per item."},"trainingsPerWeek":{"type":"integer","maximum":14,"minimum":1,"description":"Exact single number for `Training sessions per week`. Do not send ranges, minimums, maximums, or flexible wording here."}},"description":"Use only when section is rules. Server builds the exact web-profile text.","additionalProperties":false},"profile":{"type":"object","properties":{"ltHr":{"anyOf":[{"type":"integer","maximum":220,"minimum":100},{"type":"null"}],"description":"Lactate-threshold heart rate. Omit to preserve, null to clear."},"maxHr":{"anyOf":[{"type":"integer","maximum":220,"minimum":100},{"type":"null"}],"description":"Maximum heart rate. Omit to preserve, null to clear."},"gender":{"anyOf":[{"enum":["male","female"],"type":"string"},{"type":"null"}],"description":"Gender from the web profile form. Omit to preserve, null to clear."},"height":{"anyOf":[{"type":"integer","maximum":230,"minimum":130},{"type":"null"}],"description":"Height in cm. Omit to preserve, null to clear."},"weight":{"anyOf":[{"type":"integer","maximum":200,"minimum":30},{"type":"null"}],"description":"Weight in kg. Omit to preserve, null to clear."},"birthYear":{"anyOf":[{"type":"integer","maximum":2010,"minimum":1940},{"type":"null"}],"description":"Birth year. Omit to preserve, null to clear."},"additional":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Additional durable profile context. Omit to preserve, null to clear."},"otherSports":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Other sports. Omit to preserve, null to clear."},"raceResults":{"anyOf":[{"type":"array","items":{"type":"object","required":["distance","result"],"properties":{"date":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Optional race date or month. Send null only to omit it for this race result."},"result":{"type":"string","minLength":1,"description":"Finish result, for example 20:15 or 1:42:30."},"distance":{"type":"string","minLength":1,"description":"Race distance, for example 5 км, 10 km, half marathon, or marathon."}},"additionalProperties":false}},{"type":"null"}],"description":"Race PR list. If provided, replaces the whole list; [] or null clears it. Omit to preserve."}},"description":"Use only when section is profile. Server patches Athlete.info and builds the exact web-profile text. Do not send firstName.","additionalProperties":false}},"description":"Preferred input. For rules/profile, send only the matching object.","additionalProperties":false},"diffSummary":{"type":"string","minLength":1,"description":"Short internal summary of the factual change. Do not include raw chat transcript."},"previousHash":{"type":"string","minLength":1,"description":"Hash returned by read_profile_sections for the same section. Used to prevent overwriting newer profile data."}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":1229,"tokensAfter":1229},{"name":"read_profile_change_detail","fixed":{"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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["changeId"],"properties":{"changeId":{"type":"integer","maximum":9007199254740991,"description":"Change id returned by read_profile_change_history.","exclusiveMinimum":0}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":154,"tokensAfter":154},{"name":"read_profile_change_history","fixed":{"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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"limit":{"type":"integer","maximum":20,"minimum":1,"description":"Compact records per page. Default 10, maximum 20."},"cursor":{"type":"integer","maximum":9007199254740991,"description":"nextCursor from the previous history page.","exclusiveMinimum":0},"status":{"enum":["previewed","committed","restored","expired","conflict","rejected"],"type":"string"},"section":{"enum":["goals","rules","profile"],"type":"string"}},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":223,"tokensAfter":223},{"name":"read_profile_sections","fixed":{"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":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":110,"tokensAfter":110}],"toolsChanged":16,"tokensSaved":0,"todo":[{"tool":"create_note_event","params":["events"]},{"tool":"get_planned_events","params":["newest","oldest"]},{"tool":"get_user_summary","params":["section"]},{"tool":"read_profile_change_history","params":["status","section"]}],"note":"Deterministic fixes. Changes marked verify need a human look before shipping (renames, inferred annotations, inferred types, removed text). Parameter descriptions in `todo` need to be written by someone who knows the API."}