Skip to main content
Glama

photoshop_edit_smart_object_contents

Open a Smart Object's embedded contents to edit pixels non-destructively. The embedded .psb becomes active until you save and close it.

Instructions

Open a Smart Object for editing (double-click / Edit Contents). The embedded .psb becomes the active document until you save and close it.

Users often say: edit smart object, open embedded file, double-click smart layer.

Use when: modifying pixels inside an embedded Smart Object non-destructively. Do NOT use when: replacing the whole asset — use photoshop_replace_smart_object_contents.

Returns: JSON { ok, summary, details: { parent_document, embedded_document, layer_name } }. Preconditions: Smart Object layer active or named. Side effects: active document switches to the embedded .psb — save/close it to return to the parent document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layer_nameNoOptional exact Smart Object layer name. Default: active layer.
document_idYesPhotoshop 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.33
    • changedInput schema / properties / document_id / description
      Previous value: -"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null to use the active document. A number activates that document before the tool runs."New value: +"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."
  2. Changed4 schema fields changedv1.7.32
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / document_id / description
      Previous value: -"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."New value: +"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null to use the active document. A number activates that document before the tool runs."
    • changedInput schema / properties / document_id / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • addedInput schema / required
      Added value: +[
      +  "document_id"
      +]
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the generic safety profile (readOnly=false, destructive=false, idempotent=false); the description goes well beyond them by disclosing the document-state side effect (active document switches to the embedded .psb, requiring save/close to return), a precondition, and the return payload shape. This is exactly the kind of context annotations cannot carry.

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

Conciseness4/5

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

Front-loads the action and effect in the first sentence, then organizes usage, routing, returns, preconditions and side effects into scannable labeled lines. The 'Users often say' paraphrase line is retrieval-oriented filler but short enough to be defensible.

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?

Covers everything an agent needs to call this stateful tool correctly: precondition, side effect on the active document, the required save/close follow-up, and the return JSON shape in lieu of an output schema. No meaningful gap remains.

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

Parameters3/5

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

Schema description coverage is 100%, so both document_id and layer_name are already fully documented in the schema, making 3 the baseline. The description adds only the 'Smart Object layer active or named' precondition, which is a precondition rather than added parameter meaning.

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?

States a concrete verb+resource ('Open a Smart Object for editing') and immediately disambiguates from the closest sibling by naming photoshop_replace_smart_object_contents. An agent can distinguish it from convert_to_smart_object, create_smart_object_via_copy, and replace_smart_object_contents without opening any schema.

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?

Explicit 'Use when' condition (modifying pixels inside an embedded Smart Object non-destructively) paired with an explicit 'Do NOT use when' that routes to the correct alternative tool. Nothing about tool selection is left to inference.

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