Restore checkpoint (undo/redo)
gimp_restore_checkpointRestore an image to a saved checkpoint, replacing current state with new IDs and empty undo history. Use to revert destructive edits when a checkpoint exists.
Instructions
Replace the image with the state saved in a checkpoint. The restored image gets a NEW image id and new item ids (the old ones become invalid); GIMP windows showing it are reconnected; its file association is kept and it is marked as having unsaved changes; its GIMP undo history starts empty. Checkpoints are kept, so restoring a later one redoes. Destructive for the current state unless it was checkpointed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image": "<image>",
"checkpoint": "<checkpoint>"
},
"name": "gimp_restore_checkpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Image id from gimp_status, e.g. 'image:1@a1b2c3d4'. | |
| checkpoint | Yes | Checkpoint id from gimp_create_checkpoint. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| file | Yes | ||
| name | Yes | GIMP's display name (may be localized). | |
| dirty | Yes | ||
| image | Yes | Id of the restored image (a new id: all item ids changed). | |
| width | Yes | ||
| height | Yes | ||
| xcf_file | Yes | ||
| displayed | Yes | True when a GIMP window shows the image (GUI sessions only). | |
| layer_count | Yes | Number of top-level layers. | |
| previous_image | Yes | Id the image had before; it is no longer valid. |