Duplicate Layer
photopea_duplicate_layerDuplicate a layer in an active Photopea document. Specify the layer by name or index, and optionally assign a new display name to the copy. The duplicate becomes the active layer, placed above the original.
Instructions
Create a copy of a layer in the active document. The duplicate becomes the active layer and is placed above the original. Use newName to distinguish the copy from the original.
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": {
"target": "<target>"
},
"name": "photopea_duplicate_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Layer name (string) or index (number) | |
| newName | No | Display name for the duplicated layer (defaults to 'original name copy') |