photoshop_close_document
Close an open Photoshop document tab or a specific file by ID, optionally saving unsaved changes first. Use it to clean up tabs after listing documents.
Instructions
Close a Photoshop document tab. Defaults to the active document; pass document_id to close a specific open file.
Use when: the user is done with a file, or when cleaning up extra open tabs after photoshop_list_documents. Do NOT use when: you only need to switch tabs — use photoshop_set_active_document.
Returns: confirmation that the document closed. Preconditions: target document is open. Side effects: closes that tab; save=true writes unsaved changes first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Whether to save changes before closing | |
| 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. |