Skip to main content
Glama

Manage Ad Template (create / update / delete)

adsap_manage_ad_template

Create, update, or delete a saved Meta ad template (copy, CTA, destination URL, page/Instagram identity, pixel, catalog refs, enhancement toggles, site links). Completes the pair with adsap_list_ad_templates (read). Update is a PARTIAL PATCH — only the fields you pass change; the copy arrays (primary_texts/headlines/descriptions) and sitelinks replace their whole list. Enhancement toggles use the same toggle keys adsap_list_ad_templates returns in enhancement_flags. dry_run defaults TRUE: call once to preview the exact writes, confirm with the user, then call again with dry_run:false. Deleting a template does NOT touch launched ads; draft ad-sheet rows that still reference it are unlinked (the preview reports how many).

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": {
      "action": "<action>"
    },
    "name": "adsap_manage_ad_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoTemplate name. Required for create.
actionYes"create" a new template, "update" an existing one (partial patch — only fields you pass change), or "delete" one permanently.
dry_runNoTRUE (default) = preview only: shows exactly what would be written (and, for delete, how many draft ad-sheet rows still reference the template and would be unlinked). Set false to apply.
pixel_idNo
headlinesNoUp to 5 headlines. REPLACES all 5 slots.
sitelinksNoSite links shown under the ad. REPLACES the whole list; [] clears.
cta_buttonNoCall-to-action button (Meta enum, e.g. SHOP_NOW, LEARN_MORE, NO_BUTTON). Pass null to clear.
pixel_nameNo
descriptionNoOptional template description. Pass null to clear.
template_idNoRequired for update/delete. The template id from adsap_list_ad_templates.
descriptionsNoUp to 5 descriptions. REPLACES all 5 slots.
display_linkNoDisplay link shown on the ad. Pass null to clear.
enhancementsNoPartial patch of enhancement toggles keyed by toggle_key (the enhancement_flags keys returned by adsap_list_ad_templates, e.g. image_touchups, video_uncrop, carousel_enhance_cta, catalog_biz_ai, collection_hide_price, flexible_advantage_plus_creative). Only the keys you pass change. Unknown keys are rejected with the valid list. image_shop, video_shop, carousel_shop and catalog_shop are Shop: true lets Meta send people to the business's Facebook or Instagram shop instead of the website, if the business has a shop; false or not set = Shop off.
instagram_idNo
ad_account_idNoRequired for create: act_<digits>, the Meta ad account the template belongs to. Ignored on update/delete (a template cannot move accounts).
primary_textsNoUp to 5 primary texts. REPLACES all 5 slots (pass the complete list you want to keep; [] clears all).
instagram_nameNo
url_parametersNoURL parameters (e.g. utm_source=...). Pass null to clear.
catalog_feed_idNoCatalog product feed id (Catalog format). Pass null to clear.
url_destinationNoDestination URL. Pass null to clear.
facebook_page_idNo
facebook_page_nameNo
partner_instagram_idNo
catalog_product_set_idNoCatalog product set id. Pass null to clear.
partner_instagram_nameNo
partner_facebook_page_idNo
partner_facebook_page_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / enhancements / description
      Previous value: -"Partial patch of enhancement toggles keyed by toggle_key (the enhancement_flags keys returned by adsap_list_ad_templates, e.g. image_touchups, video_uncrop, carousel_enhance_cta, catalog_biz_ai, collection_hide_price, flexible_advantage_plus_creative). Only the keys you pass change. Unknown keys are rejected with the valid list."New value: +"Partial patch of enhancement toggles keyed by toggle_key (the enhancement_flags keys returned by adsap_list_ad_templates, e.g. image_touchups, video_uncrop, carousel_enhance_cta, catalog_biz_ai, collection_hide_price, flexible_advantage_plus_creative). Only the keys you pass change. Unknown keys are rejected with the valid list. image_shop, video_shop, carousel_shop and catalog_shop are Shop: true lets Meta send people to the business's Facebook or Instagram shop instead of the website, if the business has a shop; false or not set = Shop off."
  2. First observed

TDQS

A4.5/5.0
Behavior4/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 well: it discloses PARTIAL PATCH semantics, that copy arrays and sitelinks replace wholesale rather than merge, and that delete does not touch launched ads but unlinks draft ad-sheet rows with a count surfaced in the preview. It stops short of permission/auth requirements, error behavior, or whether deletes are recoverable, which keeps it below a 5.

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?

Front-loads the verb/resource and the sibling contrast, then layers patch semantics, dry_run workflow, and delete side effects in descending priority. The long parenthetical field inventory is dense but earns its place for a 27-parameter tool; a couple of clauses could be trimmed without loss.

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 27-parameter mutation tool with no annotations and no output schema, the description covers the highest-risk gaps: preview-before-apply, replacement vs patch behavior, and delete blast radius. What remains thin is per-action required-field guidance and response shape, though the schema descriptions cover much of the former.

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?

At 27 parameters and 63% schema coverage, the description meaningfully aids navigation by grouping fields into copy, CTA, destination URL, identity, pixel, catalog, enhancements, and sitelinks. It also clarifies the enhancement toggle keys tie to enhancement_flags from adsap_list_ad_templates and explains the Shop toggle semantics. Some parameters (partner_instagram_*, page name variants) get no explanation in either place, so it is not fully compensating.

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

Purpose5/5

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

Opens with a specific verb set and resource ("Create, update, or delete a saved Meta ad template") and immediately enumerates the field families it covers. It also explicitly positions itself against adsap_list_ad_templates as the read half of a pair, so an agent can distinguish it from the sibling without opening either schema.

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?

Gives an explicit operational workflow: dry_run defaults TRUE, preview first, confirm with the user, then re-call with dry_run:false. It also states which sibling handles reads and distinguishes create (needs ad_account_id) from update/delete (needs template_id), leaving little to inference.

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