Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview
On this page

line_item_creative_add

Give a Creative of your Library to a Line Item of a Campaign Plan.

Ask to use a Creative on a Line Item. The agent builds the ads of a Line Item from the Creatives of that Line Item.

“Use the summer creative on the Meta prospecting line.”

The agent calls line_item_creative_add with the slug of the Campaign Plan, the id of the Line Item and the id of the Creative. The answer is the Creatives of the Line Item after the call.

  • The Creative also goes into the pool of the Campaign Plan, when it is not there. A Creative of a Line Item is always in the pool of its plan.
  • One Creative can be on many Line Items. The agent calls the tool one time for each Line Item.
  • The Creative must be in your Library. An unknown Creative and a deleted Creative are refused with not_found.
  • A Creative with no Variation is valid.
  • The call is idempotent. A second call with the same Creative changes nothing.
  • A Line Item uses at most 20 Creatives, and a pool holds at most 50. The next add is refused with creative_limit, and nothing is written.
  • The Line Item does not change. Its revision stays, and a validated Line Item stays validated.

line_item_get lists the Creatives of a Line Item.

Reference

Give a Creative of the Library to a Line Item of a Campaign Plan. The answer is the Creatives of the Line Item after the call. A Campaign Plan holds a pool of Creatives of the Library, at most 50. Each Line Item picks its Creatives from the pool of its Campaign Plan, at most 20. A Line Item does not use the Creatives of the pool that it did not pick. When the Creative is not in the pool of the Campaign Plan, this call also puts it there. One Creative can be on many Line Items: call this Tool one time for each Line Item. Adding a Creative that the Line Item uses already changes nothing. A Creative with no Variation is valid. To build the ads of a Line Item, use only the Creatives that line_item_get lists for that Line Item: library_creative_get gives the Variations of a Creative, and each Variation has one Asset. The call does not change the revision or the status of the Campaign Plan or of a Line Item: a validated Line Item stays validated. A Creative of your Library is an ad idea of your organization, with its Variations. It is not the creative of an ad account, which list_creatives lists.

Input

Argument Type Required Description
campaign_plan_name string yes The Campaign Plan slug — its stable per-organization handle.
creative_id string yes The id of a Creative of the Library, crv_…. library_creative_list gives the Creatives of the organization.
line_item_id string yes The Line Item id, as returned by line_item_list.

Output

A successful call returns this object in structuredContent.

Field Type Always present Description
creatives array of object yes The Creatives of the Library that the Line Item uses, oldest first, at most 20. Build the ads of the Line Item from them. A Creative that was deleted in the Library is not listed.
creatives[].id string yes The id of the Creative in the Library, crv_….
creatives[].name string or null yes The name of the Creative, or null when it has none.
creatives[].variationCount number yes The number of Variations of the Creative. library_creative_get gives them.

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_found
  • creative_limit
  • organization_unentitled
  • forbidden
  • invalid_request
  • internal_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.
  • Not destructive. The tool makes only additive changes.
  • Idempotent. A second call with the same arguments changes nothing more.
  • Closed world. The tool reads and writes the data of AdCrunch only.

Example

The arguments:

{
  "campaign_plan_name": "spring-sale",
  "creative_id": "crv_8c2e47",
  "line_item_id": "lni_2d9e77"
}

The result, in structuredContent:

{
  "creatives": [
    {
      "id": "crv_8c2e47",
      "name": "Spring sale",
      "variationCount": 2
    }
  ]
}

Was this page helpful?