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
| Property | Value |
|---|---|
| Required scope | write |
| Publishes | No |
| Read-only | No |
| Destructive | No |
| Idempotent | No |
| Open world | No |
Input
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Template name. At most 191 characters. |
config | object | Yes | |
config.countMode | string | Yes | dynamic = use the real attached-creative count at apply; fixed = exactly n. One of dynamic, fixed. |
config.n | integer | Yes | creative count (for dynamic, a placeholder the engine substitutes at apply). Maximum 1000. |
config.adsets | string | Yes | fixed = exactly k sets; distributed = ceil(n/per) sets of per. One of fixed, distributed. |
config.k | integer | Yes | number of ad sets when adsets=fixed (clamped 1..20). Maximum 20. |
config.per | integer | Yes | creatives per set when adsets=distributed. Maximum 20. |
config.placement | string | Yes | fixed-adsets only: broadcast = every set gets every creative; split = partition. One of broadcast, split. |
config.splitMode | string | Yes | One of even, weighted, roundrobin. |
config.weights | number[] | null | Yes | At most 20 items. |
config.name | string | Yes | |
config.ops | object[] | null | Yes | fixed-N custom drag-drop ops: clone/move/remove/group/addset |
config.remainderPolicy | string | No | One of frontload, lastset, drop. |
config.minPerSet | integer | No | Minimum 0, maximum 50. |
config.maxPerSet | integer | No | Minimum 0, maximum 50. |
audiences | object[] | Yes | Template-level audiences (targetingSet | customAudience | savedAudience). At least one is required to save or apply. |
settings | object | No | Step-2 settings (objective, CBO+budget, attribution, performance goal, isAdCategorized), required to apply. |
scope | string | No | One of single, multiple. |
accounts | object[] | No | |
accounts[].adAccountId | string | Yes | |
accounts[].settings | object | No | |
accounts[].status | string | No |
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.