Compare timeline what-ifs
compare_timeline_scenariosUse this when the user asks what happens to a project schedule if a task slips, takes longer or shorter, or starts later: for example "if Design slips 5 days, when do we finish?" or "does the critical path change?". Takes the same task list and calendar as plan_project_timeline plus 1 to 4 scenarios, each with changes (extra_days, a new duration, or a new start-no-earlier-than date). Returns the baseline and each scenario's end date, the delay in working and calendar days, the new critical path, tasks that became or stopped being critical, and how much of each slip was absorbed by float. Does not change or save the plan. Do not use for the first schedule of a project (use plan_project_timeline).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tasks | Yes | Tasks in any order (1 to 150), e.g. [{"id":"A","name":"Design","duration":5},{"id":"B","name":"Build","duration":10,"depends_on":["A"]}]. | |
| country | No | Country whose public holidays are skipped in business_days mode, as a 2-letter code or name, e.g. US, GB, DE, PL. | |
| calendar | No | business_days (default) counts Monday to Friday and skips public holidays of country; calendar_days counts every day. | |
| scenarios | Yes | 1 to 4 what-if scenarios compared with the baseline plan, e.g. [{"label":"Design +5","changes":[{"task":"Design","extra_days":5}]}]. | |
| start_date | No | Project start date YYYY-MM-DD, e.g. 2026-11-02. Defaults to today. Convert relative dates ("next Monday") to a date first. | |
| subdivision | No | State or region code for regional holidays, e.g. CA for California or BY for Bavaria. | |
| project_name | No | Project title for the chart and files, e.g. "Website relaunch". | |
| duration_unit | No | Default unit for every task duration: days (default) or weeks. | |
| non_working_dates | No | Extra days off such as a company shutdown, YYYY-MM-DD, e.g. ["2026-12-28", "2026-12-29"]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| baseline | Yes | ||
| warnings | Yes | ||
| scenarios | Yes | ||
| project_name | Yes | ||
| latest_finish | Yes |