campaign_plan_delete
Delete a Campaign Plan and its Line Items. What they created stays live.
Ask the agent to delete a Campaign Plan. AdCrunch deletes it with each of its Line Items.
“Delete the spring sale Campaign Plan.”
The agent reads the Campaign Plan, then calls campaign_plan_delete with the revision of the Campaign Plan that it read. You see how many Line Items AdCrunch deleted with it. A campaign that a Line Item created stays live on Meta: to stop it, ask the agent to pause or archive it with meta_set_status. The record of what each Line Item created stays too.
Plan a campaign walks the whole job.
Reference
Delete a Campaign Plan and its Line Items. Pass base_revision from campaign_plan_get — the delete is refused if the plan changed since you read it. The record of what its lines already created is kept: those objects are live in an ad account and deleting a planning row does not retract them. A Campaign Plan is AdCrunch’s own planning document — it is not a campaign on Meta or Google. For those, use list_entities and get_entity.
Input
| Argument | Type | Required | Description |
|---|---|---|---|
base_revision |
integer | yes | The revision you last read via campaign_plan_get. Guards against writing over a change somebody else made since. |
campaign_plan_name |
string | yes | The Campaign Plan slug — its stable per-organization handle. |
Output
A successful call returns this object in structuredContent.
| Field | Type | Always present | Description |
|---|---|---|---|
campaignPlanName |
string | yes | The slug of the deleted Campaign Plan. A new Campaign Plan can use it. |
deleted |
true |
yes | |
lineItemsDeleted |
number | yes | How many Line Items AdCrunch deleted with the Campaign Plan. |
Failure codes
A failed call has isError set, and structuredContent.error holds one of these codes. Errors describes the shape of a failed call.
not_foundrevision_mismatchforbiddeninvalid_requestinternal_error
Scope
The token must hold campaign_plan:write. Auth & scopes lists each scope.
Annotations
A client reads these hints. A hint that the tool does not declare has the default value of the MCP specification.
- Writes. The tool can change data.
- Destructive. The tool can make a change that you cannot undo. A client can ask you to confirm before it calls the tool.
- Not idempotent. A second call with the same arguments can change more.
- Closed world. The tool reads and writes the data of AdCrunch only.
Example
The arguments:
{
"base_revision": 4,
"campaign_plan_name": "spring-sale"
}
The result, in structuredContent:
{
"campaignPlanName": "spring-sale",
"deleted": true,
"lineItemsDeleted": 1
}