photoshop_recipe_remove_background
Removes the background from the active Photoshop document by unlocking the Background layer, running native background removal, falling back to Select Subject or Color Range, with one undo.
Instructions
THE tool for "remove background" / "arka planı sil" / cut out / isolate subject. Call this once and stop. Unlocks a locked Background layer, then runs Photoshop native Remove Background (Select Subject / Color Range only if native is unavailable). One undo reverts everything.
Use when: the user wants the background gone. Hair, busy interiors, product shots — still this tool. Do NOT rasterize, duplicate, hide layers, select_subject, create_layer_mask, or execute_script instead of this recipe.
Returns: { ok, summary, undo_history_states_consumed, details.method = remove_background | remove_layer_background | select_subject | color_range_fallback }.
Preconditions: an active document. Native Remove Background needs a current Photoshop; Select Subject fallback needs PS ≥ 23. Side effects: may unlock/rename the Background layer; attaches a pixel mask; no pixels destroyed; one undo reverts everything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feather_px | No | Edge feather in pixels (0-20). 0 = hard edge (default for product shots), 1-3 = soft edge for portraits. | |
| 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. | |
| keep_shadow | No | Reserved for a future iteration; currently recorded in the response but no shadow layer is created yet. | |
| use_generative | No | After masking, run generative edge cleanup on inverted background selection (default false) |