caddy_revert
Restore previous Caddy config snapshots to undo changes. List, save, or apply snapshots to roll back after a bad config update.
Instructions
Manage config snapshots for rollback. Snapshots are auto-captured before caddy_load, and before a caddy_config_delete or caddy_config_set at the config root (any path that addresses the whole config), and before a caddy_config_by_id set or delete whose @id resolves to the root with no subpath (or a lone '...'); no other delete or set is snapshotted. Last 10. By default they live in memory only and are LOST when this server restarts -- set CADDY_MCP_SNAPSHOT_DIR to a writable directory to persist them across restarts (they contain full Caddy configs, so pick the location deliberately). Actions: 'list' shows snapshots with timestamps, 'save' manually captures the current config, 'apply' restores a snapshot (requires confirm=true).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Snapshot index for 'apply' (0 = most recent, default) | |
| action | Yes | Action to perform | |
| confirm | No | Must be true to actually apply a snapshot (safety) |