MCP tools

Remove items from campaign tree

Remove one or many campaign/adset/ad nodes from the KOAST TREE only, this does NOT pause or delete the entity on the ad platform and does NOT stop spend on already-published ads.

Tool name: remove-nodes.

Remove one or many campaign/adset/ad nodes from the KOAST TREE only, this does NOT pause or delete the entity on the ad platform and does NOT stop spend on already-published ads. Pass nodes: [{ nodeId, nodeType }, ...]. Accepts a mix of node types; unknown ids return in notFound, the rest are removed from the Koast tree. To actually stop spend on a live ad/adset/campaign, use updateNode with properties: { status: "PAUSED" } instead. Destructive on the Koast tree and cannot be undone.

When to use

Remove 1-N campaign/adset/ad nodes from the Koast tree only. Does NOT pause or delete the live entity on the ad platform and does NOT stop spend. To stop spend on a live entity, use updateNode with properties.status: "PAUSED". The unified node-removal tool, handles single and bulk. Unknown ids return in notFound.

Access

PropertyValue
Required scopewrite
PublishesNo
Read-onlyNo
DestructiveYes
IdempotentNo
Open worldNo

Input

FieldTypeRequiredDescription
campaignLaunchIdstringYesCampaign launch ID (a.k.a. batch ID). Read it from the Current Context block when one is in scope, or resolve it from a mention via listAccountCampaigns / the campaign tree when the user @-mentioned a different launch.
nodesobject[]YesNodes to delete (1-200). Each entry names its nodeId and nodeType. At least 1 item, at most 200 items.
nodes[].nodeIdstringYesID of the node to delete
nodes[].nodeTypestringYesType of the node. One of campaign, adset, ad.

Output

FieldTypeRequiredDescription
removedIdsstring[]YesIds named in the request that existed and were removed. Cascaded children are not listed here.
deletedstring[]YesThe same ids as removedIds.
notFoundstring[]YesIds named in the request that did not exist in this launch. Nothing was removed for them.
countnumberYesHow many of the requested nodes were removed, the length of removedIds. Does not include cascaded children.
cascadedIdsstring[]YesIds of child nodes removed together with a removed parent. They were not named in the request.
totalRemovednumberYesTotal nodes removed, parents plus cascaded children, count plus the length of cascadedIds.
validationobjectNo

REST equivalent

POST /v1/brands/{brandId}/launches/{launchId}/nodes/remove, Remove items from campaign tree. CLI: koast remove-nodes.

On this page