layer_create
Creates a new vector, bone, group, switch, particle, text, or other layer directly inside a live Moho project, with optional parent, naming, and initial frame settings.
Instructions
Create a new layer live inside Moho (vector, image, bone, group, switch, framebyframe, particle, patch, text, note, audio). For framebyframe, auto-creates an initial child vector frame unless createInitialFrame=false.
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": {
"type": "<type>"
},
"name": "layer_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| type | Yes | ||
| editOnly | No | ||
| noteText | No | Text content when type='note' | |
| insertAtTop | No | ||
| sourceImage | No | Image file path when type='image' | |
| parentLayerId | No | ||
| parentLayerName | No | ||
| initialFrameName | No | For type='framebyframe': initial child vector layer name (default: 'Frame 1') | |
| createInitialFrame | No | For type='framebyframe': auto-create initial vector child layer (default: true) |