Skip to main content
Glama

photoshop_recipe_prepare_for_web

Export a web-optimized JPEG or PNG from the active Photoshop document, leaving the source PSD unchanged. It duplicates, converts to sRGB, downscales, sharpens, and saves the file.

Instructions

Export a web-optimized version of the active document: duplicate, convert to sRGB, downscale longest edge, sharpen for screen, save to disk. The source PSD stays untouched.

Use when: the user wants a shareable JPEG/PNG sized for the web from the current artwork. Do NOT use when: the user wants multiple platform-specific exports — use photoshop_recipe_export_social_variants. Do NOT call photoshop_save_document afterwards; this recipe already wrote the file.

Returns: { ok, summary, output_paths, undo_history_states_consumed }.

Preconditions: active document. Format is jpeg (default) or png. Side effects: writes one file to disk; the source document is unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoOptional output path. Absolute paths used as-is. Relative paths resolve under ~/.photoshop-mcp/exports[/<chat-id>]. Omit to auto-generate.
formatNoOutput format: jpeg (default) or png.jpeg
qualityNoJPEG quality on the Photoshop 1-12 scale. Default 9. Ignored for png.
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.
max_dimension_pxNoLongest-edge pixel cap (default 2048). Min 64, max 8192.

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.5/5.0
Behavior4/5

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

Annotations declare readOnly=false, destructive=false, openWorld=false, idempotent=false; the description goes beyond this by naming the side effect ('writes one file to disk'), the precondition (active document), and that 'the source PSD stays untouched'. It stops short of stating that repeated calls write additional files rather than overwriting, which is the main behavioral consequence of idempotentHint=false.

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?

Front-loads the operation in one dense sentence, then organizes guidance into labeled Use when / Do NOT use / Returns / Preconditions / Side effects blocks. Every sentence carries non-redundant information; nothing needs trimming.

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?

With no output schema, the description compensates by documenting the return shape ({ ok, summary, output_paths, undo_history_states_consumed }) and by covering preconditions and side effects. For a 5-parameter, file-writing recipe, nothing an agent needs to invoke it correctly is missing.

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 the schema already documents path, format, quality, document_id, and max_dimension_px in detail. The description only restates default format (jpeg/png) and the downscale concept, adding no syntax or constraint information beyond the schema — the baseline 3 applies.

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?

Names a specific verb+resource ('Export a web-optimized version of the active document') and enumerates the pipeline steps (duplicate, sRGB, downscale longest edge, sharpen, save). It is clearly distinguishable from generic siblings like photoshop_export_as or photoshop_save_document because it is a composite web-export recipe.

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' and 'Do NOT use when' clauses name the alternative sibling (photoshop_recipe_export_social_variants) for the multi-platform case. It also explicitly forbids a follow-up call ('Do NOT call photoshop_save_document afterwards'), which prevents a real error mode.

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