{"at":"2026-11-23T03:00:19.463Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:00:19.814Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"photofresco","title":"PhotoFresco","version":"0.1.2","websiteUrl":"https://photofresco.com/"}},"cacheScope":"private","capabilities":{"resources":{},"tools":{"listChanged":true}},"instructions":"PhotoFresco is a Photoshop-class image editor. These tools drive a PhotoFresco window on this computer that the user watches and controls.\n1. Call photofresco_connect and tell the user the connection code it returns; they click Allow in the PhotoFresco window.\n2. The session starts with no permissions. Ask with photofresco_request_access (read, edit, export; external-write and spend only for cloud or paid AI) and explain why. Editing tools appear as the user grants them (tools/list_changed); photofresco_status shows grants.\n3. Open a file with photofresco_import_file (folders the person granted) or create one with doc_new; read doc_get_state first.\n4. Edit with the operation tools, check results with render_preview / render_region / render_mask (images), and undo with history_undo.\n5. Save with photofresco_export_file (granted folders) or export_artifact (an MCP resource).\nOperations run only while the target document is the active tab. If the user edits, agent edits pause until they press Resume. More operations: photofresco_list_tool_groups and photofresco_select_tool_groups.","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T03:00:19.814Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:00:19.817Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"photofresco","title":"PhotoFresco","version":"0.1.2","websiteUrl":"https://photofresco.com/"}},"cacheScope":"private","resultType":"complete","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false},"description":"Open PhotoFresco in its own browser window on this computer and ask the user to allow this agent. The window shows a connection code; tell the user the code returned here so they can check it before clicking Allow.\nInputs: access (optional) asks for permissions right away; document is \"active\" (default), \"none\" or a document_id; wait_seconds (default 40, at most 170) is how long this call waits for the user.\nReturns state \"connected\" with the session status, or state \"pairing\" with the code while the user has not decided yet: call photofresco_connect again to keep waiting (the request expires after 3 minutes). A session starts with no permissions; the editing tools appear (tools/list_changed) once the user grants them in the Permissions dialog.\nEffect: starts a browser process and loads photofresco.com on the first call; nothing is edited. Safe to call again while connected (returns the current status).","inputSchema":{"additionalProperties":false,"properties":{"access":{"additionalProperties":false,"description":"Permissions to ask the user for once connected. Asking grants nothing; the user decides in the PhotoFresco window","properties":{"budget_credits":{"description":"Credit budget for paid AI (required with spend)","maximum":100000,"minimum":1,"type":"integer"},"capabilities":{"description":"Permissions to ask for: read (see the document and previews), edit (change documents, open/close tabs), export (files leave the editor), external-write (send data to PhotoFresco services), spend (paid AI up to budget_credits)","items":{"enum":["read","edit","export","external-write","spend"],"type":"string"},"minItems":1,"type":"array","uniqueItems":true},"reason":{"description":"Why, shown to the user (at most 200 characters)","maxLength":200,"type":"string"}},"required":["capabilities"],"type":"object"},"document":{"description":"\"active\" (default), \"none\", or a document_id from photofresco_documents","maxLength":64,"type":"string"},"wait_seconds":{"description":"Seconds to wait for the user's decision before returning the pending code (default 40)","maximum":170,"minimum":0,"type":"number"}},"type":"object"},"name":"photofresco_connect","title":"Connect to PhotoFresco"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Connection state, the pending connection code, the session (target document_id, revision, granted permissions, pending permission request, credit budget, pause state), folders granted for import/export and the enabled tool groups.\nInputs: none. Effect: reads state only; never starts a browser.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"photofresco_status","title":"PhotoFresco status"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Ask the user for permissions in the PhotoFresco window (replaces any pending request). The user may grant fewer; nothing is granted until they click Allow there. Tools appear as permissions arrive (tools/list_changed); photofresco_status shows grants and the pending request.\nInputs: capabilities (required), budget_credits (required with spend, 1–100000 credits), reason (shown to the user, at most 200 characters).\nEffect: shows a request in the editor; changes no document. Needs a connected session.","inputSchema":{"additionalProperties":false,"properties":{"budget_credits":{"description":"Credit budget for paid AI (required with spend)","maximum":100000,"minimum":1,"type":"integer"},"capabilities":{"description":"Permissions to ask for: read (see the document and previews), edit (change documents, open/close tabs), export (files leave the editor), external-write (send data to PhotoFresco services), spend (paid AI up to budget_credits)","items":{"enum":["read","edit","export","external-write","spend"],"type":"string"},"minItems":1,"type":"array","uniqueItems":true},"reason":{"description":"Why, shown to the user (at most 200 characters)","maxLength":200,"type":"string"}},"required":["capabilities"],"type":"object"},"name":"photofresco_request_access","title":"Ask the user for permissions"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Open documents in the PhotoFresco window: document_id, name, whether it is the active tab, revision, which agent controls it and whether it is paused. Inputs: none. Effect: reads state only. Needs a connected session.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"photofresco_documents","title":"List open documents"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Make this session target another open document by document_id (from photofresco_documents). Operations run only while the target is the active tab, so ask the user to switch tabs if needed. Inputs: document (required). Effect: changes the session target; no document edit. Needs a connected session.","inputSchema":{"additionalProperties":false,"properties":{"document":{"description":"document_id to target","maxLength":64,"type":"string"}},"required":["document"],"type":"object"},"name":"photofresco_attach","title":"Target a document"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"End this session (same as the user pressing Stop): in-flight work is interrupted, permissions are cleared, applied edits stay in History. The window stays open for the user unless close_window is true. Reconnecting needs the user's Allow again. Inputs: close_window (optional). Effect: ends the session; edits nothing.","inputSchema":{"additionalProperties":false,"properties":{"close_window":{"description":"Also close the PhotoFresco browser window this server opened","type":"boolean"}},"type":"object"},"name":"photofresco_disconnect","title":"Disconnect from PhotoFresco"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"The op groups this server can list as tools, which are enabled, and how many tools each adds now. Inputs: none. Effect: reads server state only.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"photofresco_list_tool_groups","title":"List PhotoFresco tool groups"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Enable or disable op groups to change which PhotoFresco operations are listed as tools (sends tools/list_changed). Use it when a needed operation is not listed. Listing never grants permissions. Inputs: enable, disable (group IDs from photofresco_list_tool_groups, or \"all\"). Effect: changes this server's tool list only.","inputSchema":{"additionalProperties":false,"properties":{"disable":{"description":"Groups to remove","items":{"enum":["essentials","document","layers","selection","adjustments","painting","text","automation","workspace","cloud","other","all"],"type":"string"},"type":"array","uniqueItems":true},"enable":{"description":"Groups to add","items":{"enum":["essentials","document","layers","selection","adjustments","painting","text","automation","workspace","cloud","other","all"],"type":"string"},"type":"array","uniqueItems":true}},"type":"object"},"name":"photofresco_select_tool_groups","title":"Enable or disable tool groups"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Add a non-destructive adjustment layer above the active node. Types include brightness-contrast, levels, curves, exposure, hue-saturation, vibrance, color-balance, black-white, photo-filter, channel-mixer, gradient-map, selective-color, color-lookup, shadows-highlights, match-replace-color, invert, posterize, and threshold. Pass type-specific params in \"params\". Match color accepts source_layer_id/target_layer_id to sample RGB statistics. Set clipped=true (layer.set_props) to affect only the layer below.\n\nInputs: adjustment_type (required), params. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: adjust.add.","inputSchema":{"additionalProperties":false,"properties":{"adjustment_type":{"description":"Which adjustment","enum":["brightness-contrast","levels","curves","exposure","hue-saturation","vibrance","color-balance","black-white","photo-filter","channel-mixer","gradient-map","selective-color","color-lookup","shadows-highlights","match-replace-color","invert","posterize","threshold"],"type":"string"},"params":{"anyOf":[{"additionalProperties":false,"description":"brightness-contrast parameters","properties":{"brightness":{"description":"Brightness","maximum":150,"minimum":-150,"type":"number"},"contrast":{"description":"Contrast","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["brightness-contrast"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"levels parameters","properties":{"gamma":{"description":"Midtone gamma","maximum":9.99,"minimum":0.1,"type":"number"},"inBlack":{"description":"Input black point; keep below inWhite","maximum":253,"minimum":0,"type":"number"},"inWhite":{"description":"Input white point; keep above inBlack","maximum":255,"minimum":2,"type":"number"},"outBlack":{"description":"Output black point","maximum":255,"minimum":0,"type":"number"},"outWhite":{"description":"Output white point","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["levels"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"curves parameters","properties":{"channels":{"additionalProperties":false,"description":"Per-channel curves, applied after the composite points curve. Replaces the channels object; omitted channels are identity curves.","properties":{"blue":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"green":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"red":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"}},"required":[],"type":"object"},"points":{"description":"Composite RGB curve. One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["curves"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"exposure parameters","properties":{"exposure":{"description":"Exposure in stops","maximum":20,"minimum":-20,"type":"number"},"gamma":{"description":"Gamma correction","maximum":9.99,"minimum":0.01,"type":"number"},"offset":{"description":"Offset","maximum":0.5,"minimum":-0.5,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["exposure"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"hue-saturation parameters","properties":{"hue":{"description":"Hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Lightness (%)","maximum":100,"minimum":-100,"type":"number"},"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["hue-saturation"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"vibrance parameters","properties":{"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["vibrance"],"type":"string"},"vibrance":{"description":"Vibrance (%)","maximum":100,"minimum":-100,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-balance parameters","properties":{"highlights":{"description":"Highlight color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"midtones":{"description":"Midtone color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"shadows":{"description":"Shadow color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-balance"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"black-white parameters","properties":{"blues":{"description":"Blue contribution (%)","maximum":300,"minimum":-200,"type":"number"},"cyans":{"description":"Cyan contribution (%)","maximum":300,"minimum":-200,"type":"number"},"greens":{"description":"Green contribution (%)","maximum":300,"minimum":-200,"type":"number"},"magentas":{"description":"Magenta contribution (%)","maximum":300,"minimum":-200,"type":"number"},"reds":{"description":"Red contribution (%)","maximum":300,"minimum":-200,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["black-white"],"type":"string"},"yellows":{"description":"Yellow contribution (%)","maximum":300,"minimum":-200,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"photo-filter parameters","properties":{"color":{"description":"Filter color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"density":{"description":"Filter density (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["photo-filter"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"channel-mixer parameters","properties":{"blue":{"description":"Blue output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"gray":{"description":"Monochrome output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"green":{"description":"Green output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"monochrome":{"description":"Use the gray row for monochrome output","type":"boolean"},"red":{"description":"Red output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["channel-mixer"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"gradient-map parameters","properties":{"stops":{"description":"Replacement gradient stops sorted by position. Empty array gives black-to-white; endpoint colors are extended to 0 and 1.","items":{"additionalProperties":false,"description":"Gradient stop","properties":{"color":{"description":"Stop color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"pos":{"description":"Position along luminance gradient","maximum":1,"minimum":0,"type":"number"}},"required":["pos","color"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["gradient-map"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"selective-color parameters","properties":{"colors":{"additionalProperties":false,"description":"Replacement color-range map, not a deep merge. Omitted ranges have no correction.","properties":{"blacks":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"blues":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"cyans":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"greens":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"magentas":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"neutrals":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"reds":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"whites":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"yellows":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"}},"required":[],"type":"object"},"method":{"description":"Relative or absolute CMYK correction","enum":["relative","absolute"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["selective-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-lookup parameters","properties":{"intensity":{"description":"Lookup intensity (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preset":{"description":"Built-in color lookup table","enum":["identity","warm","cool","cross-process","bw-contrast"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-lookup"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"shadows-highlights parameters","properties":{"color":{"description":"Color correction (%)","maximum":100,"minimum":-100,"type":"number"},"highlightsAmount":{"description":"Highlight darkening amount (%)","maximum":100,"minimum":0,"type":"number"},"highlightsRadius":{"description":"Highlight local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"highlightsTone":{"description":"Highlight tonal width (%)","maximum":100,"minimum":0,"type":"number"},"midtone":{"description":"Midtone contrast (%)","maximum":100,"minimum":-100,"type":"number"},"shadowsAmount":{"description":"Shadow brightening amount (%)","maximum":100,"minimum":0,"type":"number"},"shadowsRadius":{"description":"Shadow local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"shadowsTone":{"description":"Shadow tonal width (%)","maximum":100,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["shadows-highlights"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"match-replace-color parameters","properties":{"colorIntensity":{"description":"Match color intensity (%)","maximum":200,"minimum":0,"type":"number"},"fade":{"description":"Match fade (%)","maximum":100,"minimum":0,"type":"number"},"fuzziness":{"description":"Replace color selection fuzziness","maximum":200,"minimum":0,"type":"number"},"hue":{"description":"Replacement hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Replacement lightness (%)","maximum":100,"minimum":-100,"type":"number"},"luminance":{"description":"Match luminance (%)","maximum":200,"minimum":0,"type":"number"},"mode":{"description":"Match source statistics or replace a sampled color","enum":["match","replace"],"type":"string"},"sample":{"description":"Color to replace in replace mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"saturation":{"description":"Replacement saturation (%)","maximum":100,"minimum":-100,"type":"number"},"sourceMean":{"description":"Source mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"sourceStdDev":{"description":"Source standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"source_layer_id":{"description":"Pixel-layer id for match mode; computes source statistics and overrides sourceMean/sourceStdDev.","type":"string"},"targetMean":{"description":"Target mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"targetStdDev":{"description":"Target standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"target_layer_id":{"description":"Pixel-layer id used with source_layer_id in match mode; computes target statistics, defaulting to the active pixel layer.","type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["match-replace-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"invert parameters (no configurable fields)","properties":{"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["invert"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"posterize parameters","properties":{"levels":{"description":"Number of tonal levels (whole number)","maximum":32,"minimum":2,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["posterize"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"threshold parameters","properties":{"level":{"description":"Threshold intensity","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["threshold"],"type":"string"}},"required":[],"type":"object"}],"description":"Adjustment parameter patch. Choose the branch matching adjustment_type for adjust.add, or the existing adjustment type for adjust.set_params; type may be omitted. Only supplied top-level fields change. Nested objects and arrays replace the previous value, not deep-merge. Bounds describe supported UI controls and are enforced at admission: the op rejects fields, ranges, array lengths or a type outside the branch for the target adjustment.","type":"object"}},"required":["adjustment_type"],"type":"object"},"name":"adjust_add","title":"Adjustment: Add"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Update the active adjustment layer’s parameters (same shapes as adjust.add). Undoable.\n\nInputs: params (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: adjust.set_params.","inputSchema":{"additionalProperties":false,"properties":{"params":{"anyOf":[{"additionalProperties":false,"description":"brightness-contrast parameters","properties":{"brightness":{"description":"Brightness","maximum":150,"minimum":-150,"type":"number"},"contrast":{"description":"Contrast","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["brightness-contrast"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"levels parameters","properties":{"gamma":{"description":"Midtone gamma","maximum":9.99,"minimum":0.1,"type":"number"},"inBlack":{"description":"Input black point; keep below inWhite","maximum":253,"minimum":0,"type":"number"},"inWhite":{"description":"Input white point; keep above inBlack","maximum":255,"minimum":2,"type":"number"},"outBlack":{"description":"Output black point","maximum":255,"minimum":0,"type":"number"},"outWhite":{"description":"Output white point","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["levels"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"curves parameters","properties":{"channels":{"additionalProperties":false,"description":"Per-channel curves, applied after the composite points curve. Replaces the channels object; omitted channels are identity curves.","properties":{"blue":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"green":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"red":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"}},"required":[],"type":"object"},"points":{"description":"Composite RGB curve. One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["curves"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"exposure parameters","properties":{"exposure":{"description":"Exposure in stops","maximum":20,"minimum":-20,"type":"number"},"gamma":{"description":"Gamma correction","maximum":9.99,"minimum":0.01,"type":"number"},"offset":{"description":"Offset","maximum":0.5,"minimum":-0.5,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["exposure"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"hue-saturation parameters","properties":{"hue":{"description":"Hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Lightness (%)","maximum":100,"minimum":-100,"type":"number"},"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["hue-saturation"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"vibrance parameters","properties":{"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["vibrance"],"type":"string"},"vibrance":{"description":"Vibrance (%)","maximum":100,"minimum":-100,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-balance parameters","properties":{"highlights":{"description":"Highlight color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"midtones":{"description":"Midtone color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"shadows":{"description":"Shadow color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-balance"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"black-white parameters","properties":{"blues":{"description":"Blue contribution (%)","maximum":300,"minimum":-200,"type":"number"},"cyans":{"description":"Cyan contribution (%)","maximum":300,"minimum":-200,"type":"number"},"greens":{"description":"Green contribution (%)","maximum":300,"minimum":-200,"type":"number"},"magentas":{"description":"Magenta contribution (%)","maximum":300,"minimum":-200,"type":"number"},"reds":{"description":"Red contribution (%)","maximum":300,"minimum":-200,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["black-white"],"type":"string"},"yellows":{"description":"Yellow contribution (%)","maximum":300,"minimum":-200,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"photo-filter parameters","properties":{"color":{"description":"Filter color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"density":{"description":"Filter density (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["photo-filter"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"channel-mixer parameters","properties":{"blue":{"description":"Blue output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"gray":{"description":"Monochrome output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"green":{"description":"Green output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"monochrome":{"description":"Use the gray row for monochrome output","type":"boolean"},"red":{"description":"Red output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["channel-mixer"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"gradient-map parameters","properties":{"stops":{"description":"Replacement gradient stops sorted by position. Empty array gives black-to-white; endpoint colors are extended to 0 and 1.","items":{"additionalProperties":false,"description":"Gradient stop","properties":{"color":{"description":"Stop color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"pos":{"description":"Position along luminance gradient","maximum":1,"minimum":0,"type":"number"}},"required":["pos","color"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["gradient-map"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"selective-color parameters","properties":{"colors":{"additionalProperties":false,"description":"Replacement color-range map, not a deep merge. Omitted ranges have no correction.","properties":{"blacks":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"blues":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"cyans":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"greens":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"magentas":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"neutrals":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"reds":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"whites":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"yellows":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"}},"required":[],"type":"object"},"method":{"description":"Relative or absolute CMYK correction","enum":["relative","absolute"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["selective-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-lookup parameters","properties":{"intensity":{"description":"Lookup intensity (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preset":{"description":"Built-in color lookup table","enum":["identity","warm","cool","cross-process","bw-contrast"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-lookup"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"shadows-highlights parameters","properties":{"color":{"description":"Color correction (%)","maximum":100,"minimum":-100,"type":"number"},"highlightsAmount":{"description":"Highlight darkening amount (%)","maximum":100,"minimum":0,"type":"number"},"highlightsRadius":{"description":"Highlight local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"highlightsTone":{"description":"Highlight tonal width (%)","maximum":100,"minimum":0,"type":"number"},"midtone":{"description":"Midtone contrast (%)","maximum":100,"minimum":-100,"type":"number"},"shadowsAmount":{"description":"Shadow brightening amount (%)","maximum":100,"minimum":0,"type":"number"},"shadowsRadius":{"description":"Shadow local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"shadowsTone":{"description":"Shadow tonal width (%)","maximum":100,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["shadows-highlights"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"match-replace-color parameters","properties":{"colorIntensity":{"description":"Match color intensity (%)","maximum":200,"minimum":0,"type":"number"},"fade":{"description":"Match fade (%)","maximum":100,"minimum":0,"type":"number"},"fuzziness":{"description":"Replace color selection fuzziness","maximum":200,"minimum":0,"type":"number"},"hue":{"description":"Replacement hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Replacement lightness (%)","maximum":100,"minimum":-100,"type":"number"},"luminance":{"description":"Match luminance (%)","maximum":200,"minimum":0,"type":"number"},"mode":{"description":"Match source statistics or replace a sampled color","enum":["match","replace"],"type":"string"},"sample":{"description":"Color to replace in replace mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"saturation":{"description":"Replacement saturation (%)","maximum":100,"minimum":-100,"type":"number"},"sourceMean":{"description":"Source mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"sourceStdDev":{"description":"Source standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"source_layer_id":{"description":"Pixel-layer id for match mode; computes source statistics and overrides sourceMean/sourceStdDev.","type":"string"},"targetMean":{"description":"Target mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"targetStdDev":{"description":"Target standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"target_layer_id":{"description":"Pixel-layer id used with source_layer_id in match mode; computes target statistics, defaulting to the active pixel layer.","type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["match-replace-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"invert parameters (no configurable fields)","properties":{"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["invert"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"posterize parameters","properties":{"levels":{"description":"Number of tonal levels (whole number)","maximum":32,"minimum":2,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["posterize"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"threshold parameters","properties":{"level":{"description":"Threshold intensity","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["threshold"],"type":"string"}},"required":[],"type":"object"}],"description":"Adjustment parameter patch. Choose the branch matching adjustment_type for adjust.add, or the existing adjustment type for adjust.set_params; type may be omitted. Only supplied top-level fields change. Nested objects and arrays replace the previous value, not deep-merge. Bounds describe supported UI controls and are enforced at admission: the op rejects fields, ranges, array lengths or a type outside the branch for the target adjustment.","type":"object"}},"required":["params"],"type":"object"},"name":"adjust_set_params","title":"Adjustment: Set params"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Change canvas size without resampling; content shifts by (dx, dy) px (e.g. dx=(newW−oldW)/2 to center). Clears the selection. Undoable.\n\nInputs: width (required), height (required), dx, dy. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: canvas.resize.","inputSchema":{"additionalProperties":false,"properties":{"dx":{"description":"Content shift x (default 0)","type":"number"},"dy":{"description":"Content shift y (default 0)","type":"number"},"height":{"description":"New height px","type":"number"},"width":{"description":"New width px","type":"number"}},"required":["width","height"],"type":"object"},"name":"canvas_resize","title":"Canvas: Resize"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Apply pending crop or set a rectangle then apply. Undoable.\n\nInputs: x, y, width, height. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: crop.apply.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"Height","type":"number"},"width":{"description":"Width","type":"number"},"x":{"description":"Document x","type":"number"},"y":{"description":"Document y","type":"number"}},"required":[],"type":"object"},"name":"crop_apply","title":"Crop: Apply"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Get the full document state: document_id and content revision (agent sessions), dimensions, color mode, the layer tree (ids, names, kinds, blend modes, opacity, visibility, locks, pixel bounds), the active node id, and the current selection bounds. Call this first to orient yourself.\n\nInputs: none.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.get_state.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"doc_get_state","title":"Document: Get state"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Return 256-bin histogram counts for the flattened visible document, restricted to the active selection when one exists. mode defaults to luminosity; rgb returns composite plus red/green/blue counts.\n\nInputs: mode. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.histogram.","inputSchema":{"additionalProperties":false,"properties":{"mode":{"description":"rgb, red, green, blue, or luminosity","enum":["rgb","red","green","blue","luminosity"],"type":"string"}},"required":[],"type":"object"},"name":"doc_histogram","title":"Document: Histogram"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Create a new document tab. Width/height use unit (px, in, cm, mm) and resolution; background is white, transparent, or color.\n\nInputs: name, width, height, unit, resolution, background, background_color, preset. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Opens, closes, duplicates or reverts documents (tabs); history_undo does not reverse it.\nUndo: not reversible with history_undo.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.new.","inputSchema":{"additionalProperties":false,"properties":{"background":{"description":"Background contents","enum":["white","transparent","color"],"type":"string"},"background_color":{"description":"[r,g,b] when background=color","type":"array"},"height":{"description":"Height in the selected unit","type":"number"},"name":{"description":"Document name (default Untitled)","type":"string"},"preset":{"description":"Preset id for UI bookkeeping","type":"string"},"resolution":{"description":"Pixels per inch for physical units","type":"number"},"unit":{"description":"Measurement unit","enum":["px","in","cm","mm"],"type":"string"},"width":{"description":"Width in the selected unit","type":"number"}},"required":[],"type":"object"},"name":"doc_new","title":"Document: New"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Read the flattened composite color at document coordinate (x, y). Returns RGB, RGBA, and HSB; does not change the foreground color.\n\nInputs: x (required), y (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.sample_color.","inputSchema":{"additionalProperties":false,"properties":{"x":{"description":"Doc x","type":"number"},"y":{"description":"Doc y","type":"number"}},"required":["x","y"],"type":"object"},"name":"doc_sample_color","title":"Document: Sample color"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Fill the selection (or the whole canvas if none) on the active layer. Default contents=color uses color [r,g,b] or the current foreground; contents=pattern uses the active pattern or pattern_id.\n\nInputs: contents, color, pattern_id, blend_mode, opacity. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: edit.fill.","inputSchema":{"additionalProperties":false,"properties":{"blend_mode":{"description":"Pattern blend mode (default normal)","enum":["normal","dissolve","darken","multiply","color-burn","linear-burn","lighten","screen","color-dodge","linear-dodge","overlay","soft-light","hard-light","vivid-light","linear-light","difference","exclusion","pin-light","hard-mix","subtract","divide","darker-color","lighter-color","hue","saturation","color","luminosity"],"type":"string"},"color":{"description":"[r, g, b] each 0-255","type":"array"},"contents":{"description":"color (default) or pattern","enum":["color","pattern"],"type":"string"},"opacity":{"description":"Pattern opacity 0..1 (default 1)","type":"number"},"pattern_id":{"description":"Pattern preset id; defaults to the active pattern when contents=pattern","type":"string"}},"required":[],"type":"object"},"name":"edit_fill","title":"Edit: Fill"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Export the active document and keep the file in the editor as a retrievable artifact instead of starting a browser download. format \"png\" is the flattened visible composite (or, with layer_id, that layer's own pixels at its content bounds); \"psd\" is the layered Photoshop interchange file from File > Save; \"pfd\" is PhotoFresco's native editable document from Save to My Documents. Returns { artifact_id, format, mime_type, filename, byte_length, sha256, document_id, revision, width, height, layer_id, fidelity, loss, created_at, expires_at }; read the bytes with artifact.read. Artifacts are bound to this caller and document, kept 10 minutes, at most 256.0 MiB each and 16 per caller (the oldest is evicted). Errors: export_failed, export_timeout (120 s), artifact_too_large, artifact_limit, stale_revision (the document changed during the export). Nothing is written to disk.\n\nThe result links an MCP resource (photofresco://artifact/<id>) holding the bytes; photofresco_export_file writes the export to a granted folder in one step.\nInputs: format (required), layer_id. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read + Export, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns when the operation has finished (it may take seconds).\nResults carry document_id and revision. PhotoFresco operation: export.artifact.","inputSchema":{"additionalProperties":false,"properties":{"format":{"description":"png (flattened or one layer), psd (layered interchange) or pfd (native, full fidelity)","enum":["png","psd","pfd"],"type":"string"},"layer_id":{"description":"PNG only: export this layer's own pixels instead of the composite","maxLength":128,"minLength":1,"type":"string"}},"required":["format"],"type":"object"},"name":"export_artifact","title":"Export: Artifact"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Apply a destructive filter to the active layer (selection restricts it). Types: gaussian-blur {radius px}, sharpen {amount 0..3, radius px}, sharpen-more, sharpen-edges, unsharp-mask {amount percent 1..500, radius px, threshold 0..255}, noise {amount 0..1}, box-blur {radius px}, motion-blur {angle deg, distance px}, radial-blur {amount 1..100, method spin|zoom}, average, median {radius 1..8}, mosaic {cellSize px}, high-pass {radius px}, ripple {amount px, wavelength px}, twirl {angle deg}, spherize {amount -100..100}, wave {amplitude px, wavelength px}, zigzag {amount px, ridges}, polar-coordinates {mode rect-to-polar|polar-to-rect}, crystallize {cellSize px}, pointillize {cellSize px}, facet, fragment, despeckle, dust-and-scratches {radius px, threshold 0..255}, emboss {angle deg, height px, amount 0..5}, find-edges, solarize, trace-contour {level 0..255, edge lower|upper}, wind {method wind|blast|stagger, direction left|right}, clouds, difference-clouds, lens-flare {brightness percent 10..300, centerX 0..1, centerY 0..1}, fibers {variance 1..64, strength 1..64}, maximum {radius px}, minimum {radius px}, offset {dx px, dy px}, custom {kernel 25 numbers, scale, offset}. Pass params in \"params\".\n\nInputs: filter_type (required), params. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: filter.apply.","inputSchema":{"additionalProperties":false,"properties":{"filter_type":{"description":"Which filter","enum":["gaussian-blur","sharpen","sharpen-more","sharpen-edges","unsharp-mask","noise","box-blur","motion-blur","radial-blur","average","median","mosaic","high-pass","ripple","twirl","spherize","wave","zigzag","polar-coordinates","crystallize","pointillize","facet","fragment","despeckle","dust-and-scratches","emboss","find-edges","solarize","trace-contour","wind","clouds","difference-clouds","lens-flare","fibers","maximum","minimum","offset","custom"],"type":"string"},"params":{"description":"Type-specific parameters","type":"object"}},"required":["filter_type"],"type":"object"},"name":"filter_apply","title":"Filter: Apply"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Redo the next edit. Returns the label of what was redone, or null.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: history.redo.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"history_redo","title":"History: Redo"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Undo the last edit. Returns the label of what was undone, or null.\n\nReverts the last History entry, including edits made by the user.\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: history.undo.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"history_undo","title":"History: Undo"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Resample the whole document to new pixel dimensions (bilinear). Undoable.\n\nInputs: width (required), height (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: image.resize.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"New height px","type":"number"},"width":{"description":"New width px","type":"number"}},"required":["width","height"],"type":"object"},"name":"image_resize","title":"Image: Resize"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Rotate the whole canvas by quarter turns: 1 = 90° clockwise, 2 = 180°, 3 = 90° counter-clockwise. Undoable.\n\nInputs: turns (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: image.rotate.","inputSchema":{"additionalProperties":false,"properties":{"turns":{"description":"1, 2, or 3 quarter turns","type":"number"}},"required":["turns"],"type":"object"},"name":"image_rotate","title":"Image: Rotate"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Add a new empty layer above the active node and make it active.\n\nInputs: name. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.add.","inputSchema":{"additionalProperties":false,"properties":{"name":{"description":"Layer name (default \"Layer N\")","type":"string"}},"required":[],"type":"object"},"name":"layer_add","title":"Layer: Add"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Delete the active node. Refused if it would leave no layers.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.delete.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"layer_delete","title":"Layer: Delete"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Duplicate the active node (deep for groups); the copy becomes active.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.duplicate.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"layer_duplicate","title":"Layer: Duplicate"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Set the active node (layers paint/transform; groups move as a unit).\n\nInputs: id (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Changes editor view or tool settings; not a document edit and not in History.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.set_active.","inputSchema":{"additionalProperties":false,"properties":{"id":{"description":"Node id from doc.get_state","type":"string"}},"required":["id"],"type":"object"},"name":"layer_set_active","title":"Layer: Set active"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Set properties on a node (default: the active one). Only provided fields change. blend_mode \"pass-through\" is groups-only.\n\nInputs: id, name, visible, opacity, blend_mode, locked, lock_pixels, lock_position, lock_transparency, clipped, blend_if, channel_mask, knockout, blend_interior_as_group, blend_clipped_as_group, transparency_shapes_layer, mask_hides_effects, vector_mask_hides_effects. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.set_props.","inputSchema":{"additionalProperties":false,"properties":{"blend_clipped_as_group":{"description":"Apply the clipping base blend/opacity to the whole clip unit","type":"boolean"},"blend_if":{"description":"Raster layer Blend If {channel,thisLayer:[b0,b1,w1,w0],underlying:[...]}; null clears it","type":["object","null"]},"blend_interior_as_group":{"description":"Blend fill and interior effects as one source","type":"boolean"},"blend_mode":{"description":"Blend mode","enum":["normal","dissolve","darken","multiply","color-burn","linear-burn","lighten","screen","color-dodge","linear-dodge","overlay","soft-light","hard-light","vivid-light","linear-light","difference","exclusion","pin-light","hard-mix","subtract","divide","darker-color","lighter-color","hue","saturation","color","luminosity","pass-through"],"type":"string"},"channel_mask":{"description":"Raster layer RGB write mask {r:boolean,g:boolean,b:boolean}","type":"object"},"clipped":{"description":"Clipping mask: confine rendering to the alpha of the layer below (⌥⌘G)","type":"boolean"},"id":{"description":"Target node id (default: active)","type":"string"},"knockout":{"description":"Knockout depth","enum":["none","shallow","deep"],"type":"string"},"lock_pixels":{"description":"Raster layer pixel lock","type":"boolean"},"lock_position":{"description":"Raster layer position lock","type":"boolean"},"lock_transparency":{"description":"Raster layer transparency lock","type":"boolean"},"locked":{"description":"Lock/unlock","type":"boolean"},"mask_hides_effects":{"description":"Apply the raster layer mask to generated effect output","type":"boolean"},"name":{"description":"Rename","type":"string"},"opacity":{"description":"0..1","type":"number"},"transparency_shapes_layer":{"description":"Use source transparency to shape fill and interior effects","type":"boolean"},"vector_mask_hides_effects":{"description":"Apply the vector mask to generated effect output","type":"boolean"},"visible":{"description":"Show/hide","type":"boolean"}},"required":[],"type":"object"},"name":"layer_set_props","title":"Layer: Set props"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Add a raster mask to the active layer. mode \"selection\" rasterizes the current selection (selected = visible); default is \"selection\" when one exists, else \"reveal\".\n\nInputs: mode. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: mask.add.","inputSchema":{"additionalProperties":false,"properties":{"mode":{"description":"Mask contents","enum":["reveal","hide","selection"],"type":"string"}},"required":[],"type":"object"},"name":"mask_add","title":"Mask: Add"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Delete the active layer’s mask (the layer becomes fully visible again).\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: mask.remove.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"mask_remove","title":"Mask: Remove"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Preview a mask over a document-space region as a grayscale PNG (black 0 = hidden/unselected, white 255 = shown/selected) with exact coverage statistics { pixels, nonzero, full, mean } computed at document resolution over the region. source \"layer\" (default) is a layer's raster mask (layer_id, default the active layer), placed at its document position; source \"selection\" is the current selection. Read-only. Returns image { mime_type: \"image/png\", data_base64, width, height, byte_length } plus document_id, revision (the document revision rendered), document { width, height }, requested and region { x, y, width, height } (region = requested clipped to the canvas; clipped: true when they differ), scale { x, y } and the coordinate convention. Errors carry code: invalid_region, region_out_of_bounds, preview_too_large, unknown_layer, unsupported_layer_kind, mask_unavailable, stale_revision (the document changed while rendering). Limits: output ≤ 2048 px per side and 4194304 px, PNG ≤ 8.0 MiB; the source is read in strips of ≤ 8.0 MiB so a small region of a huge document stays small.\n\nInputs: x, y, width, height, max_size, scale, source, layer_id. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns when the operation has finished (it may take seconds).\nResults carry document_id and revision. PhotoFresco operation: render.mask.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"Region height in document pixels (whole number; default: to the bottom canvas edge)","maximum":60000,"minimum":1,"type":"number"},"layer_id":{"description":"Layer whose raster mask to show (source layer; default the active layer)","maxLength":128,"minLength":1,"type":"string"},"max_size":{"description":"Fit the preview inside this many pixels per side, never magnifying (default 1024). Use scale instead for exact detail","maximum":2048,"minimum":1,"type":"number"},"scale":{"description":"Exact output pixels per document pixel (1 = actual pixels, 4 = 4× magnified with nearest sampling, 0.25 = area-averaged). Output is limited to 2048 px per side and 4194304 px","maximum":16,"minimum":0.0001,"type":"number"},"source":{"description":"layer: the raster mask of layer_id (default); selection: the active selection","enum":["layer","selection"],"type":"string"},"width":{"description":"Region width in document pixels (whole number; default: to the right canvas edge)","maximum":60000,"minimum":1,"type":"number"},"x":{"description":"Left edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"},"y":{"description":"Top edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"}},"required":[],"type":"object"},"name":"render_mask","title":"Preview: Mask"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Render the whole flattened composite to a PNG data URL, downscaled to fit max_size (never magnified). Use after edits to see the result. For a region at detail scale, one layer, a mask, or coordinate metadata use render.region / render.mask.\n\nInputs: max_size. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: render.preview.","inputSchema":{"additionalProperties":false,"properties":{"max_size":{"description":"Max width/height in px (default 512, at most 2048)","maximum":2048,"minimum":1,"type":"number"}},"required":[],"type":"object"},"name":"render_preview","title":"Preview: Preview"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Preview a document-space region at a chosen scale as a PNG, without rendering the whole document. Without layer_id it shows the flattened visible composite (same compositor as PNG export); with layer_id it shows that layer's own pixels (raster, text, shape or smart object) before its mask, opacity, blend mode and effects. Use scale 1–16 to inspect detail at actual or magnified pixels, or max_size to fit an overview. Read-only; nothing is added to history. Returns image { mime_type: \"image/png\", data_base64, width, height, byte_length } plus document_id, revision (the document revision rendered), document { width, height }, requested and region { x, y, width, height } (region = requested clipped to the canvas; clipped: true when they differ), scale { x, y } and the coordinate convention. Errors carry code: invalid_region, region_out_of_bounds, preview_too_large, unknown_layer, unsupported_layer_kind, mask_unavailable, stale_revision (the document changed while rendering). Limits: output ≤ 2048 px per side and 4194304 px, PNG ≤ 8.0 MiB; the source is read in strips of ≤ 8.0 MiB so a small region of a huge document stays small.\n\nInputs: x, y, width, height, max_size, scale, layer_id. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns when the operation has finished (it may take seconds).\nResults carry document_id and revision. PhotoFresco operation: render.region.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"Region height in document pixels (whole number; default: to the bottom canvas edge)","maximum":60000,"minimum":1,"type":"number"},"layer_id":{"description":"Optional layer id (doc.get_state) to preview that layer alone instead of the composite","maxLength":128,"minLength":1,"type":"string"},"max_size":{"description":"Fit the preview inside this many pixels per side, never magnifying (default 1024). Use scale instead for exact detail","maximum":2048,"minimum":1,"type":"number"},"scale":{"description":"Exact output pixels per document pixel (1 = actual pixels, 4 = 4× magnified with nearest sampling, 0.25 = area-averaged). Output is limited to 2048 px per side and 4194304 px","maximum":16,"minimum":0.0001,"type":"number"},"width":{"description":"Region width in document pixels (whole number; default: to the right canvas edge)","maximum":60000,"minimum":1,"type":"number"},"x":{"description":"Left edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"},"y":{"description":"Top edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"}},"required":[],"type":"object"},"name":"render_region","title":"Preview: Region"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Select the whole document.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.all.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"selection_all","title":"Selection: All"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Select an ellipse inscribed in the given rect (doc coordinates).\n\nInputs: x (required), y (required), w (required), h (required), mode, feather. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.ellipse.","inputSchema":{"additionalProperties":false,"properties":{"feather":{"description":"Feather radius in px (softens the edge)","type":"number"},"h":{"description":"Height","type":"number"},"mode":{"description":"How to combine with the existing selection","enum":["replace","add","subtract","intersect"],"type":"string"},"w":{"description":"Width","type":"number"},"x":{"description":"Left","type":"number"},"y":{"description":"Top","type":"number"}},"required":["x","y","w","h"],"type":"object"},"name":"selection_ellipse","title":"Selection: Ellipse"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Invert the current selection.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.invert.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"selection_invert","title":"Selection: Invert"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Deselect — clear the selection so edits affect the whole canvas again.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.none.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"selection_none","title":"Selection: None"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Select a rectangle in doc coordinates.\n\nInputs: x (required), y (required), w (required), h (required), mode, feather. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.rect.","inputSchema":{"additionalProperties":false,"properties":{"feather":{"description":"Feather radius in px (softens the edge)","type":"number"},"h":{"description":"Height","type":"number"},"mode":{"description":"How to combine with the existing selection","enum":["replace","add","subtract","intersect"],"type":"string"},"w":{"description":"Width","type":"number"},"x":{"description":"Left","type":"number"},"y":{"description":"Top","type":"number"}},"required":["x","y","w","h"],"type":"object"},"name":"selection_rect","title":"Selection: Rect"}],"ttlMs":0}}}
{"at":"2026-11-23T03:00:19.918Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:00:20.265Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"resources":{},"tools":{"listChanged":true}},"instructions":"PhotoFresco is a Photoshop-class image editor. These tools drive a PhotoFresco window on this computer that the user watches and controls.\n1. Call photofresco_connect and tell the user the connection code it returns; they click Allow in the PhotoFresco window.\n2. The session starts with no permissions. Ask with photofresco_request_access (read, edit, export; external-write and spend only for cloud or paid AI) and explain why. Editing tools appear as the user grants them (tools/list_changed); photofresco_status shows grants.\n3. Open a file with photofresco_import_file (folders the person granted) or create one with doc_new; read doc_get_state first.\n4. Edit with the operation tools, check results with render_preview / render_region / render_mask (images), and undo with history_undo.\n5. Save with photofresco_export_file (granted folders) or export_artifact (an MCP resource).\nOperations run only while the target document is the active tab. If the user edits, agent edits pause until they press Resume. More operations: photofresco_list_tool_groups and photofresco_select_tool_groups.","protocolVersion":"2025-11-25","serverInfo":{"name":"photofresco","title":"PhotoFresco","version":"0.1.2","websiteUrl":"https://photofresco.com/"}}}}
{"at":"2026-11-23T03:00:20.265Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:00:20.265Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:00:20.268Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false},"description":"Open PhotoFresco in its own browser window on this computer and ask the user to allow this agent. The window shows a connection code; tell the user the code returned here so they can check it before clicking Allow.\nInputs: access (optional) asks for permissions right away; document is \"active\" (default), \"none\" or a document_id; wait_seconds (default 40, at most 170) is how long this call waits for the user.\nReturns state \"connected\" with the session status, or state \"pairing\" with the code while the user has not decided yet: call photofresco_connect again to keep waiting (the request expires after 3 minutes). A session starts with no permissions; the editing tools appear (tools/list_changed) once the user grants them in the Permissions dialog.\nEffect: starts a browser process and loads photofresco.com on the first call; nothing is edited. Safe to call again while connected (returns the current status).","inputSchema":{"additionalProperties":false,"properties":{"access":{"additionalProperties":false,"description":"Permissions to ask the user for once connected. Asking grants nothing; the user decides in the PhotoFresco window","properties":{"budget_credits":{"description":"Credit budget for paid AI (required with spend)","maximum":100000,"minimum":1,"type":"integer"},"capabilities":{"description":"Permissions to ask for: read (see the document and previews), edit (change documents, open/close tabs), export (files leave the editor), external-write (send data to PhotoFresco services), spend (paid AI up to budget_credits)","items":{"enum":["read","edit","export","external-write","spend"],"type":"string"},"minItems":1,"type":"array","uniqueItems":true},"reason":{"description":"Why, shown to the user (at most 200 characters)","maxLength":200,"type":"string"}},"required":["capabilities"],"type":"object"},"document":{"description":"\"active\" (default), \"none\", or a document_id from photofresco_documents","maxLength":64,"type":"string"},"wait_seconds":{"description":"Seconds to wait for the user's decision before returning the pending code (default 40)","maximum":170,"minimum":0,"type":"number"}},"type":"object"},"name":"photofresco_connect","title":"Connect to PhotoFresco"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Connection state, the pending connection code, the session (target document_id, revision, granted permissions, pending permission request, credit budget, pause state), folders granted for import/export and the enabled tool groups.\nInputs: none. Effect: reads state only; never starts a browser.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"photofresco_status","title":"PhotoFresco status"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Ask the user for permissions in the PhotoFresco window (replaces any pending request). The user may grant fewer; nothing is granted until they click Allow there. Tools appear as permissions arrive (tools/list_changed); photofresco_status shows grants and the pending request.\nInputs: capabilities (required), budget_credits (required with spend, 1–100000 credits), reason (shown to the user, at most 200 characters).\nEffect: shows a request in the editor; changes no document. Needs a connected session.","inputSchema":{"additionalProperties":false,"properties":{"budget_credits":{"description":"Credit budget for paid AI (required with spend)","maximum":100000,"minimum":1,"type":"integer"},"capabilities":{"description":"Permissions to ask for: read (see the document and previews), edit (change documents, open/close tabs), export (files leave the editor), external-write (send data to PhotoFresco services), spend (paid AI up to budget_credits)","items":{"enum":["read","edit","export","external-write","spend"],"type":"string"},"minItems":1,"type":"array","uniqueItems":true},"reason":{"description":"Why, shown to the user (at most 200 characters)","maxLength":200,"type":"string"}},"required":["capabilities"],"type":"object"},"name":"photofresco_request_access","title":"Ask the user for permissions"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Open documents in the PhotoFresco window: document_id, name, whether it is the active tab, revision, which agent controls it and whether it is paused. Inputs: none. Effect: reads state only. Needs a connected session.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"photofresco_documents","title":"List open documents"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Make this session target another open document by document_id (from photofresco_documents). Operations run only while the target is the active tab, so ask the user to switch tabs if needed. Inputs: document (required). Effect: changes the session target; no document edit. Needs a connected session.","inputSchema":{"additionalProperties":false,"properties":{"document":{"description":"document_id to target","maxLength":64,"type":"string"}},"required":["document"],"type":"object"},"name":"photofresco_attach","title":"Target a document"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"End this session (same as the user pressing Stop): in-flight work is interrupted, permissions are cleared, applied edits stay in History. The window stays open for the user unless close_window is true. Reconnecting needs the user's Allow again. Inputs: close_window (optional). Effect: ends the session; edits nothing.","inputSchema":{"additionalProperties":false,"properties":{"close_window":{"description":"Also close the PhotoFresco browser window this server opened","type":"boolean"}},"type":"object"},"name":"photofresco_disconnect","title":"Disconnect from PhotoFresco"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"The op groups this server can list as tools, which are enabled, and how many tools each adds now. Inputs: none. Effect: reads server state only.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"photofresco_list_tool_groups","title":"List PhotoFresco tool groups"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Enable or disable op groups to change which PhotoFresco operations are listed as tools (sends tools/list_changed). Use it when a needed operation is not listed. Listing never grants permissions. Inputs: enable, disable (group IDs from photofresco_list_tool_groups, or \"all\"). Effect: changes this server's tool list only.","inputSchema":{"additionalProperties":false,"properties":{"disable":{"description":"Groups to remove","items":{"enum":["essentials","document","layers","selection","adjustments","painting","text","automation","workspace","cloud","other","all"],"type":"string"},"type":"array","uniqueItems":true},"enable":{"description":"Groups to add","items":{"enum":["essentials","document","layers","selection","adjustments","painting","text","automation","workspace","cloud","other","all"],"type":"string"},"type":"array","uniqueItems":true}},"type":"object"},"name":"photofresco_select_tool_groups","title":"Enable or disable tool groups"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Add a non-destructive adjustment layer above the active node. Types include brightness-contrast, levels, curves, exposure, hue-saturation, vibrance, color-balance, black-white, photo-filter, channel-mixer, gradient-map, selective-color, color-lookup, shadows-highlights, match-replace-color, invert, posterize, and threshold. Pass type-specific params in \"params\". Match color accepts source_layer_id/target_layer_id to sample RGB statistics. Set clipped=true (layer.set_props) to affect only the layer below.\n\nInputs: adjustment_type (required), params. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: adjust.add.","inputSchema":{"additionalProperties":false,"properties":{"adjustment_type":{"description":"Which adjustment","enum":["brightness-contrast","levels","curves","exposure","hue-saturation","vibrance","color-balance","black-white","photo-filter","channel-mixer","gradient-map","selective-color","color-lookup","shadows-highlights","match-replace-color","invert","posterize","threshold"],"type":"string"},"params":{"anyOf":[{"additionalProperties":false,"description":"brightness-contrast parameters","properties":{"brightness":{"description":"Brightness","maximum":150,"minimum":-150,"type":"number"},"contrast":{"description":"Contrast","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["brightness-contrast"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"levels parameters","properties":{"gamma":{"description":"Midtone gamma","maximum":9.99,"minimum":0.1,"type":"number"},"inBlack":{"description":"Input black point; keep below inWhite","maximum":253,"minimum":0,"type":"number"},"inWhite":{"description":"Input white point; keep above inBlack","maximum":255,"minimum":2,"type":"number"},"outBlack":{"description":"Output black point","maximum":255,"minimum":0,"type":"number"},"outWhite":{"description":"Output white point","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["levels"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"curves parameters","properties":{"channels":{"additionalProperties":false,"description":"Per-channel curves, applied after the composite points curve. Replaces the channels object; omitted channels are identity curves.","properties":{"blue":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"green":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"red":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"}},"required":[],"type":"object"},"points":{"description":"Composite RGB curve. One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["curves"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"exposure parameters","properties":{"exposure":{"description":"Exposure in stops","maximum":20,"minimum":-20,"type":"number"},"gamma":{"description":"Gamma correction","maximum":9.99,"minimum":0.01,"type":"number"},"offset":{"description":"Offset","maximum":0.5,"minimum":-0.5,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["exposure"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"hue-saturation parameters","properties":{"hue":{"description":"Hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Lightness (%)","maximum":100,"minimum":-100,"type":"number"},"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["hue-saturation"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"vibrance parameters","properties":{"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["vibrance"],"type":"string"},"vibrance":{"description":"Vibrance (%)","maximum":100,"minimum":-100,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-balance parameters","properties":{"highlights":{"description":"Highlight color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"midtones":{"description":"Midtone color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"shadows":{"description":"Shadow color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-balance"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"black-white parameters","properties":{"blues":{"description":"Blue contribution (%)","maximum":300,"minimum":-200,"type":"number"},"cyans":{"description":"Cyan contribution (%)","maximum":300,"minimum":-200,"type":"number"},"greens":{"description":"Green contribution (%)","maximum":300,"minimum":-200,"type":"number"},"magentas":{"description":"Magenta contribution (%)","maximum":300,"minimum":-200,"type":"number"},"reds":{"description":"Red contribution (%)","maximum":300,"minimum":-200,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["black-white"],"type":"string"},"yellows":{"description":"Yellow contribution (%)","maximum":300,"minimum":-200,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"photo-filter parameters","properties":{"color":{"description":"Filter color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"density":{"description":"Filter density (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["photo-filter"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"channel-mixer parameters","properties":{"blue":{"description":"Blue output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"gray":{"description":"Monochrome output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"green":{"description":"Green output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"monochrome":{"description":"Use the gray row for monochrome output","type":"boolean"},"red":{"description":"Red output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["channel-mixer"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"gradient-map parameters","properties":{"stops":{"description":"Replacement gradient stops sorted by position. Empty array gives black-to-white; endpoint colors are extended to 0 and 1.","items":{"additionalProperties":false,"description":"Gradient stop","properties":{"color":{"description":"Stop color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"pos":{"description":"Position along luminance gradient","maximum":1,"minimum":0,"type":"number"}},"required":["pos","color"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["gradient-map"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"selective-color parameters","properties":{"colors":{"additionalProperties":false,"description":"Replacement color-range map, not a deep merge. Omitted ranges have no correction.","properties":{"blacks":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"blues":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"cyans":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"greens":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"magentas":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"neutrals":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"reds":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"whites":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"yellows":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"}},"required":[],"type":"object"},"method":{"description":"Relative or absolute CMYK correction","enum":["relative","absolute"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["selective-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-lookup parameters","properties":{"intensity":{"description":"Lookup intensity (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preset":{"description":"Built-in color lookup table","enum":["identity","warm","cool","cross-process","bw-contrast"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-lookup"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"shadows-highlights parameters","properties":{"color":{"description":"Color correction (%)","maximum":100,"minimum":-100,"type":"number"},"highlightsAmount":{"description":"Highlight darkening amount (%)","maximum":100,"minimum":0,"type":"number"},"highlightsRadius":{"description":"Highlight local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"highlightsTone":{"description":"Highlight tonal width (%)","maximum":100,"minimum":0,"type":"number"},"midtone":{"description":"Midtone contrast (%)","maximum":100,"minimum":-100,"type":"number"},"shadowsAmount":{"description":"Shadow brightening amount (%)","maximum":100,"minimum":0,"type":"number"},"shadowsRadius":{"description":"Shadow local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"shadowsTone":{"description":"Shadow tonal width (%)","maximum":100,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["shadows-highlights"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"match-replace-color parameters","properties":{"colorIntensity":{"description":"Match color intensity (%)","maximum":200,"minimum":0,"type":"number"},"fade":{"description":"Match fade (%)","maximum":100,"minimum":0,"type":"number"},"fuzziness":{"description":"Replace color selection fuzziness","maximum":200,"minimum":0,"type":"number"},"hue":{"description":"Replacement hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Replacement lightness (%)","maximum":100,"minimum":-100,"type":"number"},"luminance":{"description":"Match luminance (%)","maximum":200,"minimum":0,"type":"number"},"mode":{"description":"Match source statistics or replace a sampled color","enum":["match","replace"],"type":"string"},"sample":{"description":"Color to replace in replace mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"saturation":{"description":"Replacement saturation (%)","maximum":100,"minimum":-100,"type":"number"},"sourceMean":{"description":"Source mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"sourceStdDev":{"description":"Source standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"source_layer_id":{"description":"Pixel-layer id for match mode; computes source statistics and overrides sourceMean/sourceStdDev.","type":"string"},"targetMean":{"description":"Target mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"targetStdDev":{"description":"Target standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"target_layer_id":{"description":"Pixel-layer id used with source_layer_id in match mode; computes target statistics, defaulting to the active pixel layer.","type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["match-replace-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"invert parameters (no configurable fields)","properties":{"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["invert"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"posterize parameters","properties":{"levels":{"description":"Number of tonal levels (whole number)","maximum":32,"minimum":2,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["posterize"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"threshold parameters","properties":{"level":{"description":"Threshold intensity","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["threshold"],"type":"string"}},"required":[],"type":"object"}],"description":"Adjustment parameter patch. Choose the branch matching adjustment_type for adjust.add, or the existing adjustment type for adjust.set_params; type may be omitted. Only supplied top-level fields change. Nested objects and arrays replace the previous value, not deep-merge. Bounds describe supported UI controls and are enforced at admission: the op rejects fields, ranges, array lengths or a type outside the branch for the target adjustment.","type":"object"}},"required":["adjustment_type"],"type":"object"},"name":"adjust_add","title":"Adjustment: Add"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Update the active adjustment layer’s parameters (same shapes as adjust.add). Undoable.\n\nInputs: params (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: adjust.set_params.","inputSchema":{"additionalProperties":false,"properties":{"params":{"anyOf":[{"additionalProperties":false,"description":"brightness-contrast parameters","properties":{"brightness":{"description":"Brightness","maximum":150,"minimum":-150,"type":"number"},"contrast":{"description":"Contrast","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["brightness-contrast"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"levels parameters","properties":{"gamma":{"description":"Midtone gamma","maximum":9.99,"minimum":0.1,"type":"number"},"inBlack":{"description":"Input black point; keep below inWhite","maximum":253,"minimum":0,"type":"number"},"inWhite":{"description":"Input white point; keep above inBlack","maximum":255,"minimum":2,"type":"number"},"outBlack":{"description":"Output black point","maximum":255,"minimum":0,"type":"number"},"outWhite":{"description":"Output white point","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["levels"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"curves parameters","properties":{"channels":{"additionalProperties":false,"description":"Per-channel curves, applied after the composite points curve. Replaces the channels object; omitted channels are identity curves.","properties":{"blue":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"green":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"red":{"description":"One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"}},"required":[],"type":"object"},"points":{"description":"Composite RGB curve. One point such as {\"x\":128,\"y\":142} maps every input to 142 (a flat curve). Points use 0–255 input/output values and are sorted by x. Missing x=0 and x=255 points retain the first and last y values, not implicit (0,0)/(255,255) endpoints. To preserve black and white, include {\"x\":0,\"y\":0} and {\"x\":255,\"y\":255}. Empty array gives the identity curve.","items":{"additionalProperties":false,"description":"Curve control point","properties":{"x":{"description":"Input intensity","maximum":255,"minimum":0,"type":"number"},"y":{"description":"Output intensity","maximum":255,"minimum":0,"type":"number"}},"required":["x","y"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["curves"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"exposure parameters","properties":{"exposure":{"description":"Exposure in stops","maximum":20,"minimum":-20,"type":"number"},"gamma":{"description":"Gamma correction","maximum":9.99,"minimum":0.01,"type":"number"},"offset":{"description":"Offset","maximum":0.5,"minimum":-0.5,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["exposure"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"hue-saturation parameters","properties":{"hue":{"description":"Hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Lightness (%)","maximum":100,"minimum":-100,"type":"number"},"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["hue-saturation"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"vibrance parameters","properties":{"saturation":{"description":"Saturation (%)","maximum":100,"minimum":-100,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["vibrance"],"type":"string"},"vibrance":{"description":"Vibrance (%)","maximum":100,"minimum":-100,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-balance parameters","properties":{"highlights":{"description":"Highlight color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"midtones":{"description":"Midtone color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"shadows":{"description":"Shadow color balance: [cyan–red, magenta–green, yellow–blue]; positive values add red, green, blue respectively.","items":{"description":"Component value","maximum":100,"minimum":-100,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-balance"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"black-white parameters","properties":{"blues":{"description":"Blue contribution (%)","maximum":300,"minimum":-200,"type":"number"},"cyans":{"description":"Cyan contribution (%)","maximum":300,"minimum":-200,"type":"number"},"greens":{"description":"Green contribution (%)","maximum":300,"minimum":-200,"type":"number"},"magentas":{"description":"Magenta contribution (%)","maximum":300,"minimum":-200,"type":"number"},"reds":{"description":"Red contribution (%)","maximum":300,"minimum":-200,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["black-white"],"type":"string"},"yellows":{"description":"Yellow contribution (%)","maximum":300,"minimum":-200,"type":"number"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"photo-filter parameters","properties":{"color":{"description":"Filter color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"density":{"description":"Filter density (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preserveLuminosity":{"description":"Preserve original luminosity","type":"boolean"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["photo-filter"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"channel-mixer parameters","properties":{"blue":{"description":"Blue output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"gray":{"description":"Monochrome output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"green":{"description":"Green output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"monochrome":{"description":"Use the gray row for monochrome output","type":"boolean"},"red":{"description":"Red output: [red %, green %, blue %, constant %].","items":{"description":"Component value","maximum":200,"minimum":-200,"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["channel-mixer"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"gradient-map parameters","properties":{"stops":{"description":"Replacement gradient stops sorted by position. Empty array gives black-to-white; endpoint colors are extended to 0 and 1.","items":{"additionalProperties":false,"description":"Gradient stop","properties":{"color":{"description":"Stop color, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"pos":{"description":"Position along luminance gradient","maximum":1,"minimum":0,"type":"number"}},"required":["pos","color"],"type":"object"},"type":"array"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["gradient-map"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"selective-color parameters","properties":{"colors":{"additionalProperties":false,"description":"Replacement color-range map, not a deep merge. Omitted ranges have no correction.","properties":{"blacks":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"blues":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"cyans":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"greens":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"magentas":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"neutrals":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"reds":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"whites":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"},"yellows":{"additionalProperties":false,"description":"CMYK corrections for this color range; supply all four components.","properties":{"black":{"description":"Black correction (%)","maximum":100,"minimum":-100,"type":"number"},"cyan":{"description":"Cyan correction (%)","maximum":100,"minimum":-100,"type":"number"},"magenta":{"description":"Magenta correction (%)","maximum":100,"minimum":-100,"type":"number"},"yellow":{"description":"Yellow correction (%)","maximum":100,"minimum":-100,"type":"number"}},"required":["cyan","magenta","yellow","black"],"type":"object"}},"required":[],"type":"object"},"method":{"description":"Relative or absolute CMYK correction","enum":["relative","absolute"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["selective-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"color-lookup parameters","properties":{"intensity":{"description":"Lookup intensity (0 = none, 1 = full)","maximum":1,"minimum":0,"type":"number"},"preset":{"description":"Built-in color lookup table","enum":["identity","warm","cool","cross-process","bw-contrast"],"type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["color-lookup"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"shadows-highlights parameters","properties":{"color":{"description":"Color correction (%)","maximum":100,"minimum":-100,"type":"number"},"highlightsAmount":{"description":"Highlight darkening amount (%)","maximum":100,"minimum":0,"type":"number"},"highlightsRadius":{"description":"Highlight local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"highlightsTone":{"description":"Highlight tonal width (%)","maximum":100,"minimum":0,"type":"number"},"midtone":{"description":"Midtone contrast (%)","maximum":100,"minimum":-100,"type":"number"},"shadowsAmount":{"description":"Shadow brightening amount (%)","maximum":100,"minimum":0,"type":"number"},"shadowsRadius":{"description":"Shadow local adaptation radius in pixels","maximum":250,"minimum":0,"type":"number"},"shadowsTone":{"description":"Shadow tonal width (%)","maximum":100,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["shadows-highlights"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"match-replace-color parameters","properties":{"colorIntensity":{"description":"Match color intensity (%)","maximum":200,"minimum":0,"type":"number"},"fade":{"description":"Match fade (%)","maximum":100,"minimum":0,"type":"number"},"fuzziness":{"description":"Replace color selection fuzziness","maximum":200,"minimum":0,"type":"number"},"hue":{"description":"Replacement hue shift in degrees","maximum":180,"minimum":-180,"type":"number"},"lightness":{"description":"Replacement lightness (%)","maximum":100,"minimum":-100,"type":"number"},"luminance":{"description":"Match luminance (%)","maximum":200,"minimum":0,"type":"number"},"mode":{"description":"Match source statistics or replace a sampled color","enum":["match","replace"],"type":"string"},"sample":{"description":"Color to replace in replace mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"saturation":{"description":"Replacement saturation (%)","maximum":100,"minimum":-100,"type":"number"},"sourceMean":{"description":"Source mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"sourceStdDev":{"description":"Source standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"source_layer_id":{"description":"Pixel-layer id for match mode; computes source statistics and overrides sourceMean/sourceStdDev.","type":"string"},"targetMean":{"description":"Target mean for match mode, in [red, green, blue] order (0–255).","items":{"description":"Component value","maximum":255,"minimum":0,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"targetStdDev":{"description":"Target standard deviations in [red, green, blue] order for match mode","items":{"description":"Component value","maximum":255,"minimum":1,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"target_layer_id":{"description":"Pixel-layer id used with source_layer_id in match mode; computes target statistics, defaulting to the active pixel layer.","type":"string"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["match-replace-color"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"invert parameters (no configurable fields)","properties":{"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["invert"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"posterize parameters","properties":{"levels":{"description":"Number of tonal levels (whole number)","maximum":32,"minimum":2,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["posterize"],"type":"string"}},"required":[],"type":"object"},{"additionalProperties":false,"description":"threshold parameters","properties":{"level":{"description":"Threshold intensity","maximum":255,"minimum":0,"type":"number"},"type":{"description":"Optional; must equal the adjustment type when supplied","enum":["threshold"],"type":"string"}},"required":[],"type":"object"}],"description":"Adjustment parameter patch. Choose the branch matching adjustment_type for adjust.add, or the existing adjustment type for adjust.set_params; type may be omitted. Only supplied top-level fields change. Nested objects and arrays replace the previous value, not deep-merge. Bounds describe supported UI controls and are enforced at admission: the op rejects fields, ranges, array lengths or a type outside the branch for the target adjustment.","type":"object"}},"required":["params"],"type":"object"},"name":"adjust_set_params","title":"Adjustment: Set params"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Change canvas size without resampling; content shifts by (dx, dy) px (e.g. dx=(newW−oldW)/2 to center). Clears the selection. Undoable.\n\nInputs: width (required), height (required), dx, dy. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: canvas.resize.","inputSchema":{"additionalProperties":false,"properties":{"dx":{"description":"Content shift x (default 0)","type":"number"},"dy":{"description":"Content shift y (default 0)","type":"number"},"height":{"description":"New height px","type":"number"},"width":{"description":"New width px","type":"number"}},"required":["width","height"],"type":"object"},"name":"canvas_resize","title":"Canvas: Resize"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Apply pending crop or set a rectangle then apply. Undoable.\n\nInputs: x, y, width, height. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: crop.apply.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"Height","type":"number"},"width":{"description":"Width","type":"number"},"x":{"description":"Document x","type":"number"},"y":{"description":"Document y","type":"number"}},"required":[],"type":"object"},"name":"crop_apply","title":"Crop: Apply"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Get the full document state: document_id and content revision (agent sessions), dimensions, color mode, the layer tree (ids, names, kinds, blend modes, opacity, visibility, locks, pixel bounds), the active node id, and the current selection bounds. Call this first to orient yourself.\n\nInputs: none.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.get_state.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"doc_get_state","title":"Document: Get state"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Return 256-bin histogram counts for the flattened visible document, restricted to the active selection when one exists. mode defaults to luminosity; rgb returns composite plus red/green/blue counts.\n\nInputs: mode. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.histogram.","inputSchema":{"additionalProperties":false,"properties":{"mode":{"description":"rgb, red, green, blue, or luminosity","enum":["rgb","red","green","blue","luminosity"],"type":"string"}},"required":[],"type":"object"},"name":"doc_histogram","title":"Document: Histogram"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Create a new document tab. Width/height use unit (px, in, cm, mm) and resolution; background is white, transparent, or color.\n\nInputs: name, width, height, unit, resolution, background, background_color, preset. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Opens, closes, duplicates or reverts documents (tabs); history_undo does not reverse it.\nUndo: not reversible with history_undo.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.new.","inputSchema":{"additionalProperties":false,"properties":{"background":{"description":"Background contents","enum":["white","transparent","color"],"type":"string"},"background_color":{"description":"[r,g,b] when background=color","type":"array"},"height":{"description":"Height in the selected unit","type":"number"},"name":{"description":"Document name (default Untitled)","type":"string"},"preset":{"description":"Preset id for UI bookkeeping","type":"string"},"resolution":{"description":"Pixels per inch for physical units","type":"number"},"unit":{"description":"Measurement unit","enum":["px","in","cm","mm"],"type":"string"},"width":{"description":"Width in the selected unit","type":"number"}},"required":[],"type":"object"},"name":"doc_new","title":"Document: New"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Read the flattened composite color at document coordinate (x, y). Returns RGB, RGBA, and HSB; does not change the foreground color.\n\nInputs: x (required), y (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: doc.sample_color.","inputSchema":{"additionalProperties":false,"properties":{"x":{"description":"Doc x","type":"number"},"y":{"description":"Doc y","type":"number"}},"required":["x","y"],"type":"object"},"name":"doc_sample_color","title":"Document: Sample color"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Fill the selection (or the whole canvas if none) on the active layer. Default contents=color uses color [r,g,b] or the current foreground; contents=pattern uses the active pattern or pattern_id.\n\nInputs: contents, color, pattern_id, blend_mode, opacity. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: edit.fill.","inputSchema":{"additionalProperties":false,"properties":{"blend_mode":{"description":"Pattern blend mode (default normal)","enum":["normal","dissolve","darken","multiply","color-burn","linear-burn","lighten","screen","color-dodge","linear-dodge","overlay","soft-light","hard-light","vivid-light","linear-light","difference","exclusion","pin-light","hard-mix","subtract","divide","darker-color","lighter-color","hue","saturation","color","luminosity"],"type":"string"},"color":{"description":"[r, g, b] each 0-255","type":"array"},"contents":{"description":"color (default) or pattern","enum":["color","pattern"],"type":"string"},"opacity":{"description":"Pattern opacity 0..1 (default 1)","type":"number"},"pattern_id":{"description":"Pattern preset id; defaults to the active pattern when contents=pattern","type":"string"}},"required":[],"type":"object"},"name":"edit_fill","title":"Edit: Fill"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Export the active document and keep the file in the editor as a retrievable artifact instead of starting a browser download. format \"png\" is the flattened visible composite (or, with layer_id, that layer's own pixels at its content bounds); \"psd\" is the layered Photoshop interchange file from File > Save; \"pfd\" is PhotoFresco's native editable document from Save to My Documents. Returns { artifact_id, format, mime_type, filename, byte_length, sha256, document_id, revision, width, height, layer_id, fidelity, loss, created_at, expires_at }; read the bytes with artifact.read. Artifacts are bound to this caller and document, kept 10 minutes, at most 256.0 MiB each and 16 per caller (the oldest is evicted). Errors: export_failed, export_timeout (120 s), artifact_too_large, artifact_limit, stale_revision (the document changed during the export). Nothing is written to disk.\n\nThe result links an MCP resource (photofresco://artifact/<id>) holding the bytes; photofresco_export_file writes the export to a granted folder in one step.\nInputs: format (required), layer_id. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read + Export, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns when the operation has finished (it may take seconds).\nResults carry document_id and revision. PhotoFresco operation: export.artifact.","inputSchema":{"additionalProperties":false,"properties":{"format":{"description":"png (flattened or one layer), psd (layered interchange) or pfd (native, full fidelity)","enum":["png","psd","pfd"],"type":"string"},"layer_id":{"description":"PNG only: export this layer's own pixels instead of the composite","maxLength":128,"minLength":1,"type":"string"}},"required":["format"],"type":"object"},"name":"export_artifact","title":"Export: Artifact"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Apply a destructive filter to the active layer (selection restricts it). Types: gaussian-blur {radius px}, sharpen {amount 0..3, radius px}, sharpen-more, sharpen-edges, unsharp-mask {amount percent 1..500, radius px, threshold 0..255}, noise {amount 0..1}, box-blur {radius px}, motion-blur {angle deg, distance px}, radial-blur {amount 1..100, method spin|zoom}, average, median {radius 1..8}, mosaic {cellSize px}, high-pass {radius px}, ripple {amount px, wavelength px}, twirl {angle deg}, spherize {amount -100..100}, wave {amplitude px, wavelength px}, zigzag {amount px, ridges}, polar-coordinates {mode rect-to-polar|polar-to-rect}, crystallize {cellSize px}, pointillize {cellSize px}, facet, fragment, despeckle, dust-and-scratches {radius px, threshold 0..255}, emboss {angle deg, height px, amount 0..5}, find-edges, solarize, trace-contour {level 0..255, edge lower|upper}, wind {method wind|blast|stagger, direction left|right}, clouds, difference-clouds, lens-flare {brightness percent 10..300, centerX 0..1, centerY 0..1}, fibers {variance 1..64, strength 1..64}, maximum {radius px}, minimum {radius px}, offset {dx px, dy px}, custom {kernel 25 numbers, scale, offset}. Pass params in \"params\".\n\nInputs: filter_type (required), params. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: filter.apply.","inputSchema":{"additionalProperties":false,"properties":{"filter_type":{"description":"Which filter","enum":["gaussian-blur","sharpen","sharpen-more","sharpen-edges","unsharp-mask","noise","box-blur","motion-blur","radial-blur","average","median","mosaic","high-pass","ripple","twirl","spherize","wave","zigzag","polar-coordinates","crystallize","pointillize","facet","fragment","despeckle","dust-and-scratches","emboss","find-edges","solarize","trace-contour","wind","clouds","difference-clouds","lens-flare","fibers","maximum","minimum","offset","custom"],"type":"string"},"params":{"description":"Type-specific parameters","type":"object"}},"required":["filter_type"],"type":"object"},"name":"filter_apply","title":"Filter: Apply"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Redo the next edit. Returns the label of what was redone, or null.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: history.redo.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"history_redo","title":"History: Redo"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Undo the last edit. Returns the label of what was undone, or null.\n\nReverts the last History entry, including edits made by the user.\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: history.undo.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"history_undo","title":"History: Undo"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Resample the whole document to new pixel dimensions (bilinear). Undoable.\n\nInputs: width (required), height (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: image.resize.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"New height px","type":"number"},"width":{"description":"New width px","type":"number"}},"required":["width","height"],"type":"object"},"name":"image_resize","title":"Image: Resize"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Rotate the whole canvas by quarter turns: 1 = 90° clockwise, 2 = 180°, 3 = 90° counter-clockwise. Undoable.\n\nInputs: turns (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: image.rotate.","inputSchema":{"additionalProperties":false,"properties":{"turns":{"description":"1, 2, or 3 quarter turns","type":"number"}},"required":["turns"],"type":"object"},"name":"image_rotate","title":"Image: Rotate"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Add a new empty layer above the active node and make it active.\n\nInputs: name. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.add.","inputSchema":{"additionalProperties":false,"properties":{"name":{"description":"Layer name (default \"Layer N\")","type":"string"}},"required":[],"type":"object"},"name":"layer_add","title":"Layer: Add"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Delete the active node. Refused if it would leave no layers.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.delete.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"layer_delete","title":"Layer: Delete"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Duplicate the active node (deep for groups); the copy becomes active.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.duplicate.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"layer_duplicate","title":"Layer: Duplicate"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Set the active node (layers paint/transform; groups move as a unit).\n\nInputs: id (required). Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Changes editor view or tool settings; not a document edit and not in History.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.set_active.","inputSchema":{"additionalProperties":false,"properties":{"id":{"description":"Node id from doc.get_state","type":"string"}},"required":["id"],"type":"object"},"name":"layer_set_active","title":"Layer: Set active"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Set properties on a node (default: the active one). Only provided fields change. blend_mode \"pass-through\" is groups-only.\n\nInputs: id, name, visible, opacity, blend_mode, locked, lock_pixels, lock_position, lock_transparency, clipped, blend_if, channel_mask, knockout, blend_interior_as_group, blend_clipped_as_group, transparency_shapes_layer, mask_hides_effects, vector_mask_hides_effects. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: layer.set_props.","inputSchema":{"additionalProperties":false,"properties":{"blend_clipped_as_group":{"description":"Apply the clipping base blend/opacity to the whole clip unit","type":"boolean"},"blend_if":{"description":"Raster layer Blend If {channel,thisLayer:[b0,b1,w1,w0],underlying:[...]}; null clears it","type":["object","null"]},"blend_interior_as_group":{"description":"Blend fill and interior effects as one source","type":"boolean"},"blend_mode":{"description":"Blend mode","enum":["normal","dissolve","darken","multiply","color-burn","linear-burn","lighten","screen","color-dodge","linear-dodge","overlay","soft-light","hard-light","vivid-light","linear-light","difference","exclusion","pin-light","hard-mix","subtract","divide","darker-color","lighter-color","hue","saturation","color","luminosity","pass-through"],"type":"string"},"channel_mask":{"description":"Raster layer RGB write mask {r:boolean,g:boolean,b:boolean}","type":"object"},"clipped":{"description":"Clipping mask: confine rendering to the alpha of the layer below (⌥⌘G)","type":"boolean"},"id":{"description":"Target node id (default: active)","type":"string"},"knockout":{"description":"Knockout depth","enum":["none","shallow","deep"],"type":"string"},"lock_pixels":{"description":"Raster layer pixel lock","type":"boolean"},"lock_position":{"description":"Raster layer position lock","type":"boolean"},"lock_transparency":{"description":"Raster layer transparency lock","type":"boolean"},"locked":{"description":"Lock/unlock","type":"boolean"},"mask_hides_effects":{"description":"Apply the raster layer mask to generated effect output","type":"boolean"},"name":{"description":"Rename","type":"string"},"opacity":{"description":"0..1","type":"number"},"transparency_shapes_layer":{"description":"Use source transparency to shape fill and interior effects","type":"boolean"},"vector_mask_hides_effects":{"description":"Apply the vector mask to generated effect output","type":"boolean"},"visible":{"description":"Show/hide","type":"boolean"}},"required":[],"type":"object"},"name":"layer_set_props","title":"Layer: Set props"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Add a raster mask to the active layer. mode \"selection\" rasterizes the current selection (selected = visible); default is \"selection\" when one exists, else \"reveal\".\n\nInputs: mode. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: mask.add.","inputSchema":{"additionalProperties":false,"properties":{"mode":{"description":"Mask contents","enum":["reveal","hide","selection"],"type":"string"}},"required":[],"type":"object"},"name":"mask_add","title":"Mask: Add"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Delete the active layer’s mask (the layer becomes fully visible again).\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: mask.remove.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"mask_remove","title":"Mask: Remove"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Preview a mask over a document-space region as a grayscale PNG (black 0 = hidden/unselected, white 255 = shown/selected) with exact coverage statistics { pixels, nonzero, full, mean } computed at document resolution over the region. source \"layer\" (default) is a layer's raster mask (layer_id, default the active layer), placed at its document position; source \"selection\" is the current selection. Read-only. Returns image { mime_type: \"image/png\", data_base64, width, height, byte_length } plus document_id, revision (the document revision rendered), document { width, height }, requested and region { x, y, width, height } (region = requested clipped to the canvas; clipped: true when they differ), scale { x, y } and the coordinate convention. Errors carry code: invalid_region, region_out_of_bounds, preview_too_large, unknown_layer, unsupported_layer_kind, mask_unavailable, stale_revision (the document changed while rendering). Limits: output ≤ 2048 px per side and 4194304 px, PNG ≤ 8.0 MiB; the source is read in strips of ≤ 8.0 MiB so a small region of a huge document stays small.\n\nInputs: x, y, width, height, max_size, scale, source, layer_id. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns when the operation has finished (it may take seconds).\nResults carry document_id and revision. PhotoFresco operation: render.mask.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"Region height in document pixels (whole number; default: to the bottom canvas edge)","maximum":60000,"minimum":1,"type":"number"},"layer_id":{"description":"Layer whose raster mask to show (source layer; default the active layer)","maxLength":128,"minLength":1,"type":"string"},"max_size":{"description":"Fit the preview inside this many pixels per side, never magnifying (default 1024). Use scale instead for exact detail","maximum":2048,"minimum":1,"type":"number"},"scale":{"description":"Exact output pixels per document pixel (1 = actual pixels, 4 = 4× magnified with nearest sampling, 0.25 = area-averaged). Output is limited to 2048 px per side and 4194304 px","maximum":16,"minimum":0.0001,"type":"number"},"source":{"description":"layer: the raster mask of layer_id (default); selection: the active selection","enum":["layer","selection"],"type":"string"},"width":{"description":"Region width in document pixels (whole number; default: to the right canvas edge)","maximum":60000,"minimum":1,"type":"number"},"x":{"description":"Left edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"},"y":{"description":"Top edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"}},"required":[],"type":"object"},"name":"render_mask","title":"Preview: Mask"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Render the whole flattened composite to a PNG data URL, downscaled to fit max_size (never magnified). Use after edits to see the result. For a region at detail scale, one layer, a mask, or coordinate metadata use render.region / render.mask.\n\nInputs: max_size. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: render.preview.","inputSchema":{"additionalProperties":false,"properties":{"max_size":{"description":"Max width/height in px (default 512, at most 2048)","maximum":2048,"minimum":1,"type":"number"}},"required":[],"type":"object"},"name":"render_preview","title":"Preview: Preview"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Preview a document-space region at a chosen scale as a PNG, without rendering the whole document. Without layer_id it shows the flattened visible composite (same compositor as PNG export); with layer_id it shows that layer's own pixels (raster, text, shape or smart object) before its mask, opacity, blend mode and effects. Use scale 1–16 to inspect detail at actual or magnified pixels, or max_size to fit an overview. Read-only; nothing is added to history. Returns image { mime_type: \"image/png\", data_base64, width, height, byte_length } plus document_id, revision (the document revision rendered), document { width, height }, requested and region { x, y, width, height } (region = requested clipped to the canvas; clipped: true when they differ), scale { x, y } and the coordinate convention. Errors carry code: invalid_region, region_out_of_bounds, preview_too_large, unknown_layer, unsupported_layer_kind, mask_unavailable, stale_revision (the document changed while rendering). Limits: output ≤ 2048 px per side and 4194304 px, PNG ≤ 8.0 MiB; the source is read in strips of ≤ 8.0 MiB so a small region of a huge document stays small.\n\nInputs: x, y, width, height, max_size, scale, layer_id. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Reads the document or editor state; changes nothing.\nPermission: Read, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns when the operation has finished (it may take seconds).\nResults carry document_id and revision. PhotoFresco operation: render.region.","inputSchema":{"additionalProperties":false,"properties":{"height":{"description":"Region height in document pixels (whole number; default: to the bottom canvas edge)","maximum":60000,"minimum":1,"type":"number"},"layer_id":{"description":"Optional layer id (doc.get_state) to preview that layer alone instead of the composite","maxLength":128,"minLength":1,"type":"string"},"max_size":{"description":"Fit the preview inside this many pixels per side, never magnifying (default 1024). Use scale instead for exact detail","maximum":2048,"minimum":1,"type":"number"},"scale":{"description":"Exact output pixels per document pixel (1 = actual pixels, 4 = 4× magnified with nearest sampling, 0.25 = area-averaged). Output is limited to 2048 px per side and 4194304 px","maximum":16,"minimum":0.0001,"type":"number"},"width":{"description":"Region width in document pixels (whole number; default: to the right canvas edge)","maximum":60000,"minimum":1,"type":"number"},"x":{"description":"Left edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"},"y":{"description":"Top edge in document pixels (whole number, default 0). May be negative; the region is clipped to the canvas","maximum":60000,"minimum":-60000,"type":"number"}},"required":[],"type":"object"},"name":"render_region","title":"Preview: Region"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Select the whole document.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.all.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"selection_all","title":"Selection: All"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Select an ellipse inscribed in the given rect (doc coordinates).\n\nInputs: x (required), y (required), w (required), h (required), mode, feather. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.ellipse.","inputSchema":{"additionalProperties":false,"properties":{"feather":{"description":"Feather radius in px (softens the edge)","type":"number"},"h":{"description":"Height","type":"number"},"mode":{"description":"How to combine with the existing selection","enum":["replace","add","subtract","intersect"],"type":"string"},"w":{"description":"Width","type":"number"},"x":{"description":"Left","type":"number"},"y":{"description":"Top","type":"number"}},"required":["x","y","w","h"],"type":"object"},"name":"selection_ellipse","title":"Selection: Ellipse"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Invert the current selection.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.invert.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"selection_invert","title":"Selection: Invert"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Deselect — clear the selection so edits affect the whole canvas again.\n\nInputs: none.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.none.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"selection_none","title":"Selection: None"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Select a rectangle in doc coordinates.\n\nInputs: x (required), y (required), w (required), h (required), mode, feather. Units, ranges and allowed values are in the input schema; the editor rejects arguments outside it before anything runs.\nEffect: Edits the document through an undoable command that appears in History.\nUndo: history_undo reverts it.\nPermission: Edit, granted by the user in the PhotoFresco window (ask with photofresco_request_access).\nReturns immediately with the result.\nResults carry document_id and revision. PhotoFresco operation: selection.rect.","inputSchema":{"additionalProperties":false,"properties":{"feather":{"description":"Feather radius in px (softens the edge)","type":"number"},"h":{"description":"Height","type":"number"},"mode":{"description":"How to combine with the existing selection","enum":["replace","add","subtract","intersect"],"type":"string"},"w":{"description":"Width","type":"number"},"x":{"description":"Left","type":"number"},"y":{"description":"Top","type":"number"}},"required":["x","y","w","h"],"type":"object"},"name":"selection_rect","title":"Selection: Rect"}]}}}
