Prune snapshots
prune_snapshotsRemove old snapshots and live frames from an Inkscape document to reclaim disk space based on a configurable retention policy, while preserving the current working copy and original.
Instructions
Apply the snapshot + live-frame retention policy, pruning superseded server state.
When to use: reclaiming disk from old snapshots/frames. To roll back instead use
restore_snapshot; to list checkpoints use list_snapshots. No mutating tool triggers this
implicitly — it is an explicit maintenance sweep.
Key params: none beyond doc_id. Retains the last N snapshots and all within the keep-days
window (configurable), bounded by absolute hard caps on count and bytes; deletes the rest plus
orphaned Operation Records. In the SAME pass it prunes the doc root's loop/live render frames
by age + byte budget, never deleting a frame still referenced by a Live Operation
Record. The current working copy and original are never touched, so the restore chain stays
intact.
Return shape: PruneResult — pruned_snapshot_ids, pruned_operation_ids, and live_frames
(the frame pruning stats).
Example: prune_snapshots(doc_id)
Risk class: low (deletes only disposable, superseded server state under a deterministic policy; authoritative current state is never affected).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| freed_bytes | Yes | ||
| live_frames | No | ||
| retained_count | Yes | ||
| pruned_snapshot_ids | No | ||
| pruned_operation_ids | No |