photoshop_get_history
Read the active document's history stack and current state to determine how many undo or redo steps you need.
Instructions
Read the history stack of the active document, including which state is current. Does not change pixels.
Use when: deciding how many steps photoshop_undo or photoshop_redo should take. Do NOT use when: you want to change the document — use photoshop_undo or photoshop_redo.
Returns: the history state list as text. Preconditions: active document. Side effects: none.
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": {
"document_id": "<document_id>"
},
"name": "photoshop_get_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call. |