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).

Input Schema

TableJSON 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.
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. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses partial patch, replace arrays, dry_run default, delete unlink behavior, and enhancement toggle keying. No contradictions and rich behavioral context that goes beyond what a schema would reveal.

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

Conciseness5/5

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

A single dense paragraph that front-loads purpose and then packs critical behavioral details. Every sentence contributes: scope, differentiation, patch semantics, dry_run pattern, and delete side-effects. No fluff or repetition.

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 complex 27-param mutation tool with no annotations and no output schema, this description covers the major pitfalls: replace vs patch, dry_run flow, delete consequences, and enhancement toggle keys. It could mention error handling or exact return format, but given the tool's scope, it is quite complete. The reference to the list tool for IDs and toggle keys is helpful.

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?

Schema coverage is 63%, so description adds significant value by explaining the semantics of arrays (replace whole list), dry_run (preview vs apply), action enum (partial patch), and template_id requirement. It doesn't individually describe all 27 params but the key complex behaviors are covered, compensating well for the moderate schema coverage.

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?

States a specific verb+resource: 'Create, update, or delete a saved Meta ad template'. Explicitly names the sibling read tool (adsap_list_ad_templates) and distinguishes from Google counterpart via 'Meta'. An agent can immediately know what this does and how it differs from the list tool and the Google variant.

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?

Provides clear when/how: partial patch semantics, array replacement behavior, dry_run default true with a two-call pattern (preview then apply), and delete side-effects (doesn't touch launched ads, unlinks draft rows). These are actionable guidelines that an agent can follow without guessing.

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