line_item_delete
Remove a line item from a plan. What it already created is kept.
Deletes a Line Item.
Input
| Field | Type | Required | Description |
|---|---|---|---|
campaign_plan_name |
string |
yes | The plan that owns the line. |
line_item_id |
lni_… |
yes | From campaign_plan_get. |
base_revision |
integer |
yes | The revision you last read. |
Requires the campaign_plan:write scope.
Reference
Delete a Line Item. Pass base_revision from campaign_plan_get. Removing a line returns an approved plan to draft, for the same reason adding one does. What the line already created is kept — those objects are live in an ad account and this does not retract them.
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. |
line_item_id |
string | yes | The Line Item id, as returned by campaign_plan_get. |
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.