MCP tools

Edit structure template rules

Update an existing structure template's rules/audiences/settings.

Tool name: edit-structure-template-rules.

Update an existing structure template's rules/audiences/settings. Pass the full new StructureState in config (validated before save). Omit templateId to edit the template open in the builder. WRITE.

When to use

Apply a natural-language edit to a template by recomputing its StructureState and saving. Falls back to the bound structureTemplateId.

Access

PropertyValue
Required scopewrite
PublishesNo
Read-onlyNo
DestructiveYes
IdempotentNo
Open worldNo

Input

FieldTypeRequiredDescription
templateIdstringNoStructure template ID. Omit to read the template currently open in the builder from the Current Context block. Pass an explicit id only when acting on a different template than the one in scope.
namestringNo
configobjectNo
config.countModestringYesdynamic = use the real attached-creative count at apply; fixed = exactly n. One of dynamic, fixed.
config.nintegerYescreative count (for dynamic, a placeholder the engine substitutes at apply). Maximum 1000.
config.adsetsstringYesfixed = exactly k sets; distributed = ceil(n/per) sets of per. One of fixed, distributed.
config.kintegerYesnumber of ad sets when adsets=fixed (clamped 1..20). Maximum 20.
config.perintegerYescreatives per set when adsets=distributed. Maximum 20.
config.placementstringYesfixed-adsets only: broadcast = every set gets every creative; split = partition. One of broadcast, split.
config.splitModestringYesOne of even, weighted, roundrobin.
config.weightsnumber[] | nullYesAt most 20 items.
config.namestringYes
config.opsobject[] | nullYesfixed-N custom drag-drop ops: clone/move/remove/group/addset
config.remainderPolicystringNoOne of frontload, lastset, drop.
config.minPerSetintegerNoMinimum 0, maximum 50.
config.maxPerSetintegerNoMinimum 0, maximum 50.
audiencesobject[]NoTemplate-level audiences (targetingSet | customAudience | savedAudience). At least one is required to save or apply.
settingsobjectNo
scopestringNoOne of single, multiple.
statusstringNoOne of DRAFT, READY, NEEDS_ATTENTION.
accountsobject[]No
accounts[].adAccountIdstringYes
accounts[].settingsobjectNo
accounts[].statusstringNo

Output

The tool catalog does not declare an output schema for this tool.

REST equivalent

PATCH /v1/brands/{brandId}/structure-templates/{templateId}, Edit structure template rules. CLI: koast edit-structure-template-rules.

On this page