Log a prediction before the fact (local ledger, immutable)
log_predictionRecords a dated prediction with a stated probability in a local ledger so future Suunto session, HRV and recovery outcomes can be scored and your forecasts evaluated later.
Instructions
Writes down a prediction BEFORE the fact, with a probability, in the local ledger ~/.suunto-mcp/predictions.json (SUUNTO_PREDICTIONS_PATH overrides it). Writes only that file, never contacts Suunto, needs no Suunto credentials. A prediction is immutable once logged: it cannot be edited or deleted, only voided (void_prediction, with a reason, on a day before its date). The server scores it itself later (score_predictions) from Suunto's data and the journal, and get_prediction_stats says whether the stated probabilities were any good. date is the local day the prediction is about: strictly AFTER today (the server's local date: a prediction is about the future, so today is refused too) and at most 60 days ahead. kind is one of: 'session_done' (a workout exists on date), 'hrv_in_band' (the night AFTER date, the one leading into the next morning, has an HRV within the user's own p25..p75 band as get_baselines shows it, edges included), 'recovery_morning_at_least' (plus threshold, a Balance from 0 to 1 where x100 is the watch's Resources %: the morning recovery after the night after date is at least that), 'reps_hit' (plus exercise, sets, reps and optionally kg: on date, at least that many sets reached that many reps at that weight or more; the watch records only the guide's text, so this is scored from log_session entries and can be 'unresolvable' until the sets are logged). probability 0 to 1 is how likely the prediction is to come true in the caller's honest judgement; rule optionally names the rule or skill that made it, for the per-rule statistics; note is free text. A prediction identical to one still open (same kind, date and kind-specific fields; probability, note and rule do not count) is refused with the id of the open one, because it would count twice in the statistics. A prediction is due, and scored, from the second day after date (a day's data may sync late). Unknown fields and fields that do not belong to the kind are refused. At most 2000 predictions. Output: { saved: { id, madeAt, date, kind, probability, ..., due }, predictions (the count), note }. Not read-only (writes the ledger), not destructive (adds an entry), not idempotent (the same call again adds another prediction, or is refused as a duplicate). In demo mode the ledger is kept in memory.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"date": "<date>",
"kind": "<kind>",
"probability": "<probability>"
},
"name": "log_prediction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kg | No | reps_hit: the weight, in kg, at which each set is predicted to reach the reps (that or more). Leave out for any weight. | |
| date | Yes | The local day the prediction is about, YYYY-MM-DD: after today, at most 60 days ahead. | |
| kind | Yes | What is predicted: session_done, hrv_in_band, recovery_morning_at_least or reps_hit. | |
| note | No | Free text, e.g. why. | |
| reps | No | reps_hit: reps per set. | |
| rule | No | The rule or skill that made the prediction, e.g. 'weekly-plan'. | |
| sets | No | reps_hit: how many sets are predicted to reach the reps. | |
| exercise | No | reps_hit: the exercise name as in get_exercise_history. | |
| threshold | No | recovery_morning_at_least: the Balance on waking, 0 to 1 (0.6 = 60% Resources). | |
| probability | Yes | How likely it is to come true, 0 to 1. |