Set loop
set_loopSet the project's loop section: the whole composition repeats once per value, with one field of one layer varying across the repeats. Builds one pass per value, each setting field of elementId to that value — e.g. a caption text layer cycling through several strings. Pass an empty values array to clear the loop (the comp plays once).
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>",
"values": "<values>",
"projectId": "<projectId>"
},
"name": "set_loop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | No | The layer field each pass overrides — e.g. "text", "text_color", "filename". Defaults to "text". | |
| values | Yes | One value per loop pass. Empty array clears the loop. | |
| elementId | Yes | Target layer — text.<id>, image.<id>, shapes.<id>, or video.<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. |