photoshop_scale_layer
Scale the active layer by a percentage, with optional center anchoring. Use for precise layer resizing without altering the document canvas.
Instructions
Scale the active layer by a percentage (100 leaves the size unchanged). centerAnchor true (default) scales from the center; false scales from the top-left.
Use when: a numeric percent scale on one layer. Do NOT use when: the layer should fit the canvas automatically — use photoshop_fit_layer_to_document. Do NOT use when: the document dimensions should change — use photoshop_resize_image. Do NOT use when: the layer has no pixels yet — fill it first. An empty layer fails with an empty bounding rectangle.
Returns: the scale percent applied. Preconditions: active document and active layer. Side effects: transforms that layer, one history step. 100% does not change size; any other percent is not idempotent. Reversible with photoshop_undo.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scalePercent": "<scalePercent>",
"document_id": "<document_id>"
},
"name": "photoshop_scale_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call. | |
| centerAnchor | No | Scale from center (true) or top-left (false). Default: true | |
| scalePercent | Yes | Scale percentage (e.g., 50 for 50%, 200 for 200%) |