MCP tools

Save creative template

Save an html ad layout as a template for the active brand, with {{slot}} placeholders for the text that changes.

Tool name: save-creative-template.

Save an html ad layout as a template for the active brand, with {{slot}} placeholders for the text that changes. render-creative fills the slots later, so one layout makes many versions. Returns a templateId.

When to use

After a rendered layout works and the user wants more like it, or asks to save it as a template. List every {{slot}} in the html in slots. It writes, so it is unavailable in plan mode.

Access

PropertyValue
Required scopewrite
PublishesNo
Read-onlyNo
DestructiveNo
IdempotentNo
Open worldNo

Input

FieldTypeRequiredDescription
namestringYesA short name the user will recognise. At most 120 characters.
htmlstringYesThe layout as a complete html page, with {{slot}} wherever text changes between versions. At most 200000 characters.
slotsobject[]YesEvery {{slot}} in the html, each once, with what goes in it. At most 30 items.
slots[].namestringYesThe slot name, written in the html as {{name}}.
slots[].descriptionstringYesWhat goes in the slot, such as "the headline, six words at most". At most 300 characters.
aspectRatiostringYesThe aspect ratio the layout is designed for. One of 1:1, 4:5, 9:16.
referenceUrlstring (uri)NoThe ad or image the layout was modelled on, if any. At most 2000 characters.
previewCreativeIdintegerNoA library creative rendered from this template, shown as its preview.

Output

FieldTypeRequiredDescription
templateIdintegerYesPass this as templateId to render-creative.
namestringYes
aspectRatiostringYes
slotsobject[]Yes
referenceUrlstring | nullYes
previewCreativeIdinteger | nullYes
previewUrlstring | nullYes
htmlstringYes
createdAtstringYes

REST equivalent

POST /v1/brands/{brandId}/creative-templates, Save creative template. CLI: koast save-creative-template.

On this page