Undo changes
undo_last_changeRoll the tournament back. Without to_change_id: restore exactly how it was before the most recent change (tool call or courtside page entry). With to_change_id (an id from get_audit_log): restore to just before that change — it and every later change are discarded in one step, so a burst of unwanted calls unwinds with a single revert. Preview lists exactly what would be discarded; confirm: true applies. A follow-up plain undo restores what the previous undo discarded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Omit or false: return a preview of what would change. True: apply it. | |
| request_id | No | Optional idempotency id — retrying a call with the same id never applies it twice | |
| to_change_id | No | A change id from get_audit_log — restore to just before this change, discarding it and everything after it. Omit to undo only the latest change. | |
| tournament_key | Yes | The tournament's organiser key (starts with tk_) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | No | True when this is a preview — nothing was changed | |
| summary | Yes | What happened, in one line | |
| discarded | Yes | Every change this rollback discards, oldest first | |
| undone_at | Yes | ||
| undone_tool | Yes | Tool behind the earliest discarded change | |
| undone_summary | Yes | ||
| discarded_count | Yes |