Create point-in-time snapshots of filesystem state and restore to previous states...
Create point-in-time snapshots of filesystem state and restore to previous states. Snapshots enable safe experimentation, rollback capabilities, and state management for ToolFS operations.
ToolFS Path:
POST /toolfs/snapshots/create
Example:
POST /toolfs/snapshots/create
Content-Type: application/json
{
"name": "before-migration-001",
"description": "Snapshot before database migration"
}
// Response
{
"success": true,
"snapshot": {
"name": "before-migration-001",
"created_at": "2024-01-15T15:30:00Z",
"size": 1048576,
"file_count": 42
}
}
ToolFS Path:
POST /toolfs/snapshots/rollback
Example:
POST /toolfs/snapshots/rollback
Content-Type: application/json
{
"name": "before-migration-001"
}
// Response
{
"success": true,
"message": "Rolled back to snapshot 'before-migration-001'",
"files_restored": 42,
"rollback_time": "2024-01-15T16:00:00Z"
}
ToolFS Path:
GET /toolfs/snapshots
Example:
GET /toolfs/snapshots
// Response
{
"snapshots": [
{
"name": "before-migration-001",
"created_at": "2024-01-15T15:30:00Z",
"size": 1048576,
"file_count": 42
},
{
"name": "initial-state",
"created_at": "2024-01-15T10:00:00Z",
"size": 512000,
"file_count": 25
}
]
}
ToolFS Path:
GET /toolfs/snapshots/<name>
Example:
GET /toolfs/snapshots/before-migration-001
// Response
{
"name": "before-migration-001",
"created_at": "2024-01-15T15:30:00Z",
"size": 1048576,
"file_count": 42,
"base_snapshot": "initial-state",
"changes_since_base": 17
}
ToolFS Path:
DELETE /toolfs/snapshots/<name>
Example:
DELETE /toolfs/snapshots/old-snapshot-001
// Response
{
"success": true,
"message": "Snapshot 'old-snapshot-001' deleted"
}
Use Snapshot skill when you need to:
Common use cases:
Each snapshot includes:
Snapshot operations return standardized result structures:
{
"type": "snapshot",
"source": "/toolfs/snapshots/<name>",
"content": {
"name": "...",
"created_at": "...",
"size": 0,
"file_count": 0
},
"success": true,
"error": "error message if failed"
}
When presenting snapshot results:
ā Snapshot created successfully
Name: before-migration-001
Created: 2024-01-15T15:30:00Z
Files: 42
Size: 1.0 MB
Description: Snapshot before database migration
ā Rollback completed
Restored to: before-migration-001
Files restored: 42
Rollback time: 2024-01-15T16:00:00Z
Available snapshots (2):
1. before-migration-001
Created: 2024-01-15T15:30:00Z
Files: 42 | Size: 1.0 MB
2. initial-state
Created: 2024-01-15T10:00:00Z
Files: 25 | Size: 500 KB
If snapshot creation fails:
If rollback fails:
If snapshot operations fail:
ToolFS uses copy-on-write for efficient snapshot storage:
This skill is part of ToolFS. See main SKILL.md for overview.
