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
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional output path. Absolute paths used as-is. Relative paths resolve under ~/.photoshop-mcp/exports[/<chat-id>]. Omit to auto-generate. | |
| format | No | Output format: jpeg (default) or png. | jpeg |
| quality | No | JPEG quality on the Photoshop 1-12 scale. Default 9. Ignored for png. | |
| 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. | |
| max_dimension_px | No | Longest-edge pixel cap (default 2048). Min 64, max 8192. |