Set image filename
set_image_filenameRepoint an existing image layer at a different uploaded asset — keeps the layer's id, position, size, animations, and styles; only the bitmap changes. The image must already be uploaded (upload_image for a web URL or a file attached in the chat; the editor for a file from the person's disk); pass the filename the upload returned, and its name as the label. Use this to swap a layer's image WITHOUT losing its keyframes — remove_layer + add_image_layer would mint a new id and drop the animations.
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": {
"elementId": "<elementId>",
"filename": "<filename>",
"projectId": "<projectId>"
},
"name": "set_image_filename"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional label people see for the layer: pass the upload's returned `name`. Omit to keep the current label; null or an empty string clears it. | |
| filename | Yes | The uploaded file's id: the `filename` its upload returned. | |
| elementId | Yes | Image layer id, image.<id>. | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The payload, shaped by the tool. | |
| note | No | What to do next when not ready. | |
| error | No | Why it failed. | |
| status | No | For cache-backed readers: whether the answer was ready. | |
| editorUrl | No | Opens this project in the editor. |