Skip to main content
Glama

photoshop_recipe_remove_background

Removes a photo background non-destructively by creating a layer mask from Select Subject, with color-range fallback for studio shots. Keeps original pixels intact and wraps the edit in one undo step.

Instructions

One-shot background removal: Select Subject by default, with an automatic Color Range fallback for uniform/high-key studio backgrounds (product-on-white). Attaches a layer mask (source pixels kept). Wrapped in a single undoable history step.

Users often say: cut out, isolate subject, remove background, transparent background, arka planı sil.

Use when: the user wants the subject isolated from the background non-destructively. Do NOT use when: the subject is extremely fine-edged (hair against a busy background) — propose a manual Refine Edge pass afterwards.

Returns: { ok, summary, undo_history_states_consumed, details.method = select_subject | color_range_fallback }.

Preconditions: PS ≥ 23 (Select Subject v2) for the default path; Color Range fallback still runs on uniform studio shots if Select Subject is loose or empty. Side effects: attaches a pixel mask to the active layer; no pixels destroyed; one undo reverts everything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feather_pxNoEdge feather in pixels (0-20). 0 = hard edge (default for product shots), 1-3 = soft edge for portraits.
document_idNoOptional 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_shadowNoReserved for a future iteration; currently recorded in the response but no shadow layer is created yet.
use_generativeNoAfter masking, run generative edge cleanup on inverted background selection (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries full weight. It discloses the exact algorithm (Select Subject default, Color Range fallback for uniform backgrounds), the non-destructive layer mask attachment, that it is wrapped in a single undoable step, preconditions (PS version 23+), and side effects (no pixels destroyed, one undo reverts). This is exemplary transparency for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections: core behavior first, then usage guidance, return format, preconditions, and side effects. Each sentence earns its place; nothing is redundant. Despite length, it remains scannable and information-dense.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given there are no annotations and no output schema, the description provides everything an agent needs: the return object shape with its method field, preconditions, side effects, and when not to use it. It even covers edge cases like the fallback running on uniform shots when Select Subject is loose. This is fully sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds workflow context: feather_px gets recommended ranges for product vs. portrait; document_id explains why it's used (avoid UI tab retargeting); keep_shadow is explicitly flagged as reserved for future; use_generative explains its purpose as a post-masking cleanup. This adds real meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb and resource: 'One-shot background removal', names the primary method (Select Subject) and the fallback (Color Range), and states the outcome (layer mask attached). It clearly distinguishes itself from the many sibling recipe tools and generic selection tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Use when' and 'Do NOT use when', including a concrete exclusion (fine-edged hair on busy background) and a pointer to a manual Refine Edge pass. It also lists common user phrasings that should trigger this tool, making routing unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools