Skip to content

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.

ActionWritesNotes
listnolimit defaults to 20.
infonoRequires backup_id.
comparenoRequires backup_id. Optional file_path.
cleanupyes, unless dry-rundry_run defaults to true. older_than_days defaults to 7.
restoreyes, unless previewRequires the full backup_id. preview defaults to false.
undo_lastyes, unless previewOptional file_path walks that file’s chain.
undo_chainnoRequires file_path.
list_trashnoNeeds --backup-dir.
restore_trashyesRequires sd_id.
purge_trashyes, unless dry-rundry_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.