smartchat

apply_landing_page_ops

Applies edit operations to the draft of the landing page, never to the live page. Free pages and pages in the page model take different operations: see get_landing_catalog. If one operation is rejected nothing changes.

Tool nameapply_landing_page_ops
Permissionlanding:write
readOnlyHintfalse
destructiveHintfalse
idempotentHinttrue
openWorldHintfalse
REST callPOST /v1/landing-page/operations

#What it does

  • Changes data in your account. It does not send messages to contacts.
  • Safe to repeat with the same idempotency_key.

#Input

The tool takes one flat object. Path, query and body fields of the REST call are merged into it.

NameTypeRequiredDescription
operationsarray of objectyesThe operations, applied in this order. up to 50 items
operations[].typestringyesKind of operation. See get_landing_catalog. one of: replace_text, set_page_title, set_page_description, set_design_token, add_section, update_section_data, change_variant, move_section, delete_section, set_style, set_settings, replace_media
operations[].findstringnoreplace_text: the text to find. It must occur exactly once in the page. up to 2000 characters
operations[].replacestringnoreplace_text: the new text (plain text). up to 2000 characters
operations[].textstringnoset_page_title (up to 160 characters), set_page_description (up to 300), replace_text in the page model (the new text). up to 2000 characters
operations[].tokenstringnoset_design_token: name of an existing design value, for example --brand-color. up to 41 characters
operations[].valuestringnoset_design_token: a color (#hex, rgb(), hsl()) or a length (px, rem, em, %). up to 60 characters
operations[].idstringnoPage model: id of the section or element (from get_landing_page include=sections). up to 40 characters
operations[].fieldstringnoPage model: field name, for example title or items[0].title. up to 100 characters
operations[].sectionobjectnoadd_section: the new section. kind block with type, variant and data, or kind free with layout and elements. See get_landing_catalog.
operations[].positionobjectnoadd_section: where the section goes. Default: at the end.
operations[].position.atstringnoThe start or the end of the page. one of: start, end
operations[].position.indexintegernoPlace number, counted from 0. 0 to 100
operations[].position.afterstringnoId of the section it goes after. up to 40 characters
operations[].position.beforestringnoId of the section it goes before. up to 40 characters
operations[].toobjectnomove_section: the new place.
operations[].to.atstringnoThe start or the end of the page. one of: start, end
operations[].to.indexintegernoPlace number, counted from 0. 0 to 100
operations[].to.afterstringnoId of the section it goes after. up to 40 characters
operations[].to.beforestringnoId of the section it goes before. up to 40 characters
operations[].dataobjectnoupdate_section_data: fields to change. A value null removes the field.
operations[].variantstringnochange_variant: the new variant of the section. up to 40 characters
operations[].styleobjectnoset_style: style values to change, for example palette or mood.
operations[].settingsobjectnoset_settings: settings to change. language sets the one language of the page.
operations[].urlstringnoreplace_media: address of the new image (https, from the media library of the account). up to 2000 characters
operations[].altstringnoreplace_media: short description of the image. up to 200 characters
operations[].decorativebooleannoreplace_media: true if the image only decorates.
operations[].originstringnoreplace_media: origin of the image. Always own. one of: own
dry_runbooleannoTrue: check and show the changes, write nothing.

Arguments added by the MCP server (see Special arguments)

NameTypeRequiredDescription
idempotency_keystringnoOptional. Unique key, for example a UUID. Same key and arguments within 24 hours: first result. up to 255 characters

#Result

The result has the same content as the REST answer. Lists have at most 50 items per page (default 20); use cursor for the next page.

Errors come back as a tool result with isError: true. The error codes are the ones in Errors.