Add costume
add_costumeAdd an image file as a costume to a Scratch sprite or stage, specifying target, name, and path. Supports PNG, SVG, JPG and optional rotation center.
Instructions
Add a costume to a sprite (or the stage) from an image file on disk.
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": "<name>",
"path": "<path>"
},
"name": "add_costume"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes | Path to the image file (PNG/SVG/JPG). | |
| target | Yes | Sprite name, or "Stage". | |
| dataFormat | No | Override the detected file type. | |
| rotationCenterX | No | ||
| rotationCenterY | No |