Start a randomized self-experiment (pre-registered, schedule drawn up front)
start_experimentStarts a randomized self-experiment on a nightly sleep or recovery outcome, pre-registering the hypothesis and analysis plan and assigning balanced intervention/control days to test a habit's effect.
Instructions
Starts a randomized self-experiment on one nightly outcome, e.g. 'does no caffeine after noon change my sleep score?'. It PRE-REGISTERS the hypothesis and the analysis plan (stored in the result and the file) and draws the whole schedule up front: each day from the start is an intervention day, a control day, a washout day (the washout days after each intervention day, never analysed) or unassigned (a weekday not in eligible). Eligible days are paired in order and each pair holds one intervention and one control day in random order, drawn by a seeded generator (the seed is stored; the schedule is never redrawn), so the two arms are exactly balanced; a last unpaired day is dropped. The experiment starts tomorrow unless startDate (today or later, at most 60 days ahead) says otherwise; it needs at least 6 intervention and 6 control days (the least that can ever give a verdict) or it is refused. Only one active (upcoming or running) experiment per outcome metric at a time. Outcome metric is the night AFTER each assigned day, one of the per-night values get_baselines and get_tag_effects use: sleepDurationS, sleepScore, hrv, recoveryMorning. Follow it with get_experiment (today's assignment) and log_experiment_day (what really happened), then analyze_experiment after the planned end. Local file ~/.suunto-mcp/experiments.json (SUUNTO_EXPERIMENTS_PATH overrides it); never contacts Suunto, needs no credentials. Output: { saved (summary), experiment: { id, name, intervention, control, metric, days, washout, eligible, startDate, endDate, seed, hypothesis, analysisPlan, schedule: [{ date, arm ('intervention' | 'control' | 'washout' | 'none'), block }], log }, note }. Not read-only (writes the file), not destructive, not idempotent (each call starts another experiment). In demo mode it is kept in memory, and a finished demo experiment is already there.
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": {
"name": "<name>",
"intervention": "<intervention>",
"control": "<control>",
"metric": "<metric>",
"days": "<days>"
},
"name": "start_experiment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | How many calendar days the experiment lasts from its start. | |
| name | Yes | A short name, e.g. 'No caffeine after noon'. | |
| metric | Yes | The nightly outcome: sleepDurationS, sleepScore, hrv or recoveryMorning (read for the night after each assigned day). | |
| control | Yes | What to do on a control day, e.g. 'usual routine'. | |
| washout | No | Days after each intervention day that are left out, to let carry-over pass (default 0). | |
| eligible | No | Weekdays that may carry an intervention or control day (default: every day), e.g. ['mon','tue','wed','thu']. | |
| startDate | No | First day, YYYY-MM-DD (default tomorrow; today or later). | |
| intervention | Yes | What to do on an intervention day, in plain words. |