photoshop_recipe_remove_background
Removes the background from the active Photoshop document by unlocking the Background layer and running Photoshop’s native background removal; one undo reverts the edit.
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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "photoshop_recipe_remove_background"
}
}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 | No | Optional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit. | |
| 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) |