Skip to main content
Glama

Create Ad

adsap_create_ad

Create a Meta ad (image/video) in an ad set. Defaults to PAUSED. Creative: pass exactly ONE of creative_spec library filenames (feed_creative_name, or vertical_creative_name alone for a vertical-only ad, or a feed + vertical pair), image_hash / video_id (reuse an existing Meta image/video with new copy), creative_id (reuse a WHOLE existing creative as-is) or object_story_id (run an existing Page post as the ad) — the last two keep the original post and its likes/comments, and need no copy fields. ALWAYS call with dry_run: true first: it validates and renders a launch review card where the user confirms, creates (paused) and activates in-card — after it renders, reply with ONE short sentence and stop; do not call the real create from chat unless the user explicitly asks in a new message and the card's activity log shows nothing was created there. For App promotion (OUTCOME_APP_PROMOTION) ad sets: set link_url to the app's store URL (same as the ad set's promoted_object.object_store_url) and call_to_action to INSTALL_MOBILE_APP (or USE_MOBILE_APP/DOWNLOAD); the promoted app binding comes from the ad set. Shop (Meta sending people to the business's Facebook or Instagram shop instead of the website) is off unless the ad template or account_enhancements switches it on.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ad_set_id": "<ad_set_id>",
      "ad_account_id": "<ad_account_id>",
      "name": "<name>",
      "ad_format": "<ad_format>",
      "creative_spec": "<creative_spec>"
    },
    "name": "adsap_create_ad"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
statusNo
dry_runNoValidate only, no creation
ad_formatYes
ad_set_idYes
ad_account_idYes
creative_specYes
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / creative_spec / properties / partnership_instagram_user_id / description
      Added value: +"Partnership ad: Instagram account id of the PARTNER, the account shown second (asset_type partner_instagram_accounts). To show a creator first, put the creator's Instagram account in instagram_user_id (page_id may be left out, Adsap fills the creator's linked Facebook Page) and the business's own Instagram account here. A creator with no Facebook Page cannot be first yet; use it as the partner."
    • addedInput schema / properties / creative_spec / properties / partnership_page_id / description
      Added value: +"Partnership ad: Facebook Page id of the PARTNER, the account shown second (ids from adsap_list_meta_assets, asset_type partner_facebook_pages). The account shown FIRST is page_id / instagram_user_id. Either side can be first: to show a creator first, put the creator in page_id / instagram_user_id and the business's own Page here. A partnership-only creator cannot run alone, so one of the two partnership fields is then required."
  2. Changed1 schema field changed
    • addedInput schema / properties / creative_spec / properties / account_enhancements / description
      Added value: +"Enhancement switches used when no ad template is given: { enhancements: { <toggle_key>: true | false } }, keys as in adsap_list_ad_templates enhancement_flags. image_shop / video_shop true = Shop on; left out = Shop off."
  3. Changed3 schema fields changed
    • changedInput schema / properties / creative_spec / properties / call_to_action / description
      Previous value: -"CTA button. For profile visit ad sets (destination_type INSTAGRAM_PROFILE / FACEBOOK_PAGE / INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE) the CTA is dictated by the destination — VIEW_INSTAGRAM_PROFILE (Instagram), VISIT_PROFILE (Facebook), or BOTH auto-applied for the dual destination — and whatever is passed here is overridden."New value: +"CTA button. For profile visit ad sets (destination_type INSTAGRAM_PROFILE / FACEBOOK_PAGE / INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE) the CTA is dictated by the destination — VIEW_INSTAGRAM_PROFILE (Instagram), VISIT_PROFILE (Facebook), or BOTH auto-applied for the dual destination — and whatever is passed here is overridden. The same holds for WhatsApp ad sets (destination_type WHATSAPP): the button is always WHATSAPP_MESSAGE (Send WhatsApp Message)."
    • changedInput schema / properties / creative_spec / properties / call_to_action / enum
      Previous value: -[
      -  "SHOP_NOW",
      -  "LEARN_MORE",
      -  "SIGN_UP",
      -  "BOOK_NOW",
      -  "CONTACT_US",
      -  "DOWNLOAD",
      -  "GET_OFFER",
      -  "GET_QUOTE",
      -  "SUBSCRIBE",
      -  "APPLY_NOW",
      -  "ORDER_NOW",
      -  "BUY_NOW",
      -  "WATCH_MORE",
      -  "SEND_MESSAGE",
      -  "INSTALL_MOBILE_APP",
      -  "USE_MOBILE_APP",
      -  "VIEW_INSTAGRAM_PROFILE",
      -  "VISIT_PROFILE",
      -  "NO_BUTTON"
      -]New value: +[
      +  "SHOP_NOW",
      +  "LEARN_MORE",
      +  "SIGN_UP",
      +  "BOOK_NOW",
      +  "CONTACT_US",
      +  "DOWNLOAD",
      +  "GET_OFFER",
      +  "GET_QUOTE",
      +  "SUBSCRIBE",
      +  "APPLY_NOW",
      +  "ORDER_NOW",
      +  "BUY_NOW",
      +  "WATCH_MORE",
      +  "SEND_MESSAGE",
      +  "INSTALL_MOBILE_APP",
      +  "USE_MOBILE_APP",
      +  "VIEW_INSTAGRAM_PROFILE",
      +  "VISIT_PROFILE",
      +  "WHATSAPP_MESSAGE",
      +  "NO_BUTTON"
      +]
    • changedInput schema / properties / creative_spec / properties / link_url / description
      Previous value: -"Destination URL (https). Required unless awareness/engagement or lead gen."New value: +"Destination URL (https). Required unless awareness/engagement or lead gen. Leave it out on a WhatsApp ad set (destination_type WHATSAPP): the ad opens a WhatsApp chat, it has no landing page."
  4. Changed3 schema fields changed
    • changedInput schema / properties / creative_spec / properties / feed_creative_name / description
      Previous value: -"Feed creative filename (1080x1080) from the ADSAP creative library (adsap_list_creative_assets). Pass exactly ONE of feed_creative_name, image_hash or video_id."New value: +"Square (feed) creative filename from the ADSAP creative library (adsap_list_creative_assets), usually 1080x1080 or 4:5. Optional when vertical_creative_name (or horizontal_creative_name) is given: a vertical-only ad is valid, the vertical file becomes the ad's single asset and Meta fits it to the other placements. Library files, image_hash, video_id, creative_id and object_story_id are five ways to point at the creative: use exactly ONE way per call (the library way may name a square, a vertical, a horizontal file, or a square plus vertical/horizontal pair)."
    • changedInput schema / properties / creative_spec / properties / horizontal_creative_name / description
      Previous value: -"1200x628 filename"New value: +"Horizontal (16:9 or 1.91:1) creative filename from the library. Optional; alone it is accepted as the ad's single asset."
    • changedInput schema / properties / creative_spec / properties / vertical_creative_name / description
      Previous value: -"1080x1920 filename"New value: +"Vertical (9:16, 1080x1920) creative filename from the library. With feed_creative_name it is the story/reels asset of the pair; ALONE it is accepted too and becomes the ad's single asset (same as uploading one 9:16 file in Ads Manager)."
  5. Changed7 schema fields changed
    • addedInput schema / properties / creative_spec / properties / creative_id
      Added value: +{
      +  "description": "Reuse a WHOLE existing adcreative as-is (id from adsap_get_ad's creative_id or adsap_list_ads). The new ad shows the exact same content AND keeps the underlying post with its likes/comments (social proof). Copy fields (primary_texts, headlines, call_to_action, link_url, page_id) are not used — the creative already contains them. Exactly ONE creative pointer per call.",
      +  "type": "string"
      +}
    • addedInput schema / properties / creative_spec / properties / headlines / description
      Added value: +"1-5 headlines. REQUIRED when building a new creative; not used when reusing creative_id / object_story_id."
    • addedInput schema / properties / creative_spec / properties / object_story_id
      Added value: +{
      +  "description": "Reuse an existing Facebook Page post as the ad, form <page_id>_<post_id> (from adsap_get_ad's object_story_id / effective_object_story_id). Keeps the post and its social proof. Copy fields are not used. Exactly ONE creative pointer per call.",
      +  "type": "string"
      +}
    • addedInput schema / properties / creative_spec / properties / page_id / description
      Added value: +"Facebook Page id. REQUIRED when building a new creative (feed_creative_name / image_hash / video_id); not needed when reusing creative_id / object_story_id — the identity comes from the reused creative."
    • removedInput schema / properties / creative_spec / properties / page_id / minLength
      Removed value: -1
    • addedInput schema / properties / creative_spec / properties / primary_texts / description
      Added value: +"1-5 primary texts. REQUIRED when building a new creative; not used when reusing creative_id / object_story_id."
    • removedInput schema / properties / creative_spec / required
      Removed value: -[
      -  "page_id",
      -  "primary_texts",
      -  "headlines",
      -  "call_to_action"
      -]
  6. Changed5 schema fields changed
    • changedInput schema / properties / creative_spec / properties / feed_creative_name / description
      Previous value: -"Feed creative filename (1080x1080). Must exist in creative_metadata table."New value: +"Feed creative filename (1080x1080) from the ADSAP creative library (adsap_list_creative_assets). Pass exactly ONE of feed_creative_name, image_hash or video_id."
    • removedInput schema / properties / creative_spec / properties / feed_creative_name / minLength
      Removed value: -1
    • addedInput schema / properties / creative_spec / properties / image_hash
      Added value: +{
      +  "description": "Reuse an EXISTING Meta image by its image hash (e.g. from adsap_get_ad's creative_summary.images, to build a new ad with the same image). SINGLE_IMAGE only. The image must be in the ADSAP creative library — if it is not found, run adsap_import_account_creatives once (imports the account's full existing image/video library) and retry. Pass exactly ONE of feed_creative_name, image_hash or video_id.",
      +  "type": "string"
      +}
    • addedInput schema / properties / creative_spec / properties / video_id
      Added value: +{
      +  "description": "Reuse an EXISTING Meta video by its video id (e.g. from adsap_get_ad's creative_summary.videos). SINGLE_VIDEO only. The video must be in the ADSAP creative library — if it is not found, run adsap_import_account_creatives once and retry. Pass exactly ONE of feed_creative_name, image_hash or video_id.",
      +  "type": "string"
      +}
    • changedInput schema / properties / creative_spec / required
      Previous value: -[
      -  "page_id",
      -  "feed_creative_name",
      -  "primary_texts",
      -  "headlines",
      -  "call_to_action"
      -]New value: +[
      +  "page_id",
      +  "primary_texts",
      +  "headlines",
      +  "call_to_action"
      +]
  7. Changed1 schema field changed
    • addedInput schema / properties / creative_spec / properties / leadgen_form_id / description
      Added value: +"Id of the Instant Form of a lead ad, from adsap_manage_instant_form or adsap_list_meta_assets (asset_type instant_forms). The form must belong to the same Facebook Page as the ad."
  8. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses the PAUSED default, that dry_run validates and renders a launch review card, that creative_id/object_story_id preserve the original post and its likes/comments, that destination types override call_to_action, that library assets may need adsap_import_account_creatives first, and the exact Meta rejection for an unauthorized Instagram account. It even discloses the off-by-default state of Shop.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded correctly, leading with purpose, then the PAUSED default, then creative selection, then the dry_run protocol, then promotion-specific rules. The text is a single dense block with long parentheticals, which makes it hard to scan, but nearly every clause carries operational information rather than restating the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema and a nested creative_spec, this is close to the level of guidance needed: safety workflow, creative-mode selection and destination-driven CTA overrides are all covered. What is missing is the return shape of a successful create, the role of idempotency_key, and any guidance on the catalog/product-set family of fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Top-level schema coverage is 13%, so the description must compensate, and it does for the highest-risk fields: the mutually exclusive creative pointers, which copy fields are ignored when reusing creative_id/object_story_id, link_url and call_to_action for App promotion, and the account_enhancements Shop toggles. Gaps remain for idempotency_key, catalog_id/catalog_name, product_set, display_link, url_parameters, ad_template_id, and the advertised/defaulted status behavior beyond 'Defaults to PAUSED'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb, resource and container: 'Create a Meta ad (image/video) in an ad set', and the creative-pointer enumeration makes the tool's main axis of variation explicit. It does not, however, distinguish itself from the closest sibling adsap_create_ad_from_ig_post, so an agent must infer which creation path to take when the source is an IG post.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states a hard operating rule ('ALWAYS call with dry_run: true first'), describes what happens after the review card renders ('reply with ONE short sentence and stop'), and gives the exception condition for a real create ('unless the user explicitly asks in a new message and the card's activity log shows nothing was created there'). It also routes between alternatives: exactly-one-of the five creative pointers, and a dedicated rule set for OUTCOME_APP_PROMOTION ad sets.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources