MCP tools

Create structure template

Create a new structure template from an engine StructureState you constructed for the user.

Tool name: author-structure-template.

Create a new structure template from an engine StructureState you constructed for the user. Validates the rules against the engine before saving and requires at least one audience. Use after translating the user's natural-language description into a representable StructureState (validate it first). WRITE.

When to use

Persist a representable StructureState as a new template. Never invent a distribution the engine cannot represent.

Access

PropertyValue
Required scopewrite
PublishesNo
Read-onlyNo
DestructiveNo
IdempotentNo
Open worldNo

Input

FieldTypeRequiredDescription
namestringYesTemplate name. At most 191 characters.
configobjectYes
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[]YesTemplate-level audiences (targetingSet | customAudience | savedAudience). At least one is required to save or apply.
settingsobjectNoStep-2 settings (objective, CBO+budget, attribution, performance goal, isAdCategorized), required to apply.
scopestringNoOne of single, multiple.
accountsobject[]No
accounts[].adAccountIdstringYes
accounts[].settingsobjectNo
accounts[].statusstringNo

Output

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

REST equivalent

POST /v1/brands/{brandId}/structure-templates, Create structure template. CLI: koast author-structure-template.

On this page