Backup
backup is registered on strict, agent, and ultra. Edits create backups automatically. This page is the tool. Recovery behavior is Undo.
Default action is list.
| Action | Writes | Notes |
|---|---|---|
list | no | limit defaults to 20. |
info | no | Requires backup_id. |
compare | no | Requires backup_id. Optional file_path. |
cleanup | yes, unless dry-run | dry_run defaults to true. older_than_days defaults to 7. |
restore | yes, unless preview | Requires the full backup_id. preview defaults to false. |
undo_last | yes, unless preview | Optional file_path walks that file’s chain. |
undo_chain | no | Requires file_path. |
list_trash | no | Needs --backup-dir. |
restore_trash | yes | Requires sd_id. |
purge_trash | yes, unless dry-run | dry_run defaults to true. |
--backup-dir defaults to the system temp directory (temp/mcp-batch-backups) when empty. --backup-max-age defaults to 7 days. --backup-max-count defaults to 100.
Backup ids allow only [A-Za-z0-9_-]. Temp files and backup metadata are written with mode 0600. Ids use crypto/rand, not a predictable timestamp.
server_info(action:"stats") is ultra only. It splits MCP calls from internal ops, and process backups from historical backups. It is not required to undo.