edit-meta-creative

An ad-management command for changing the text, link, call-to-action, or other displayed content of existing Meta ads.

In plain words
What is it for?
Use it to update one ad or many ads in a campaign, ad set, or account—for example, to change a landing-page URL, headline, primary text, description, or button.
Why use it?
Meta does not support directly editing an ad's creative in place. This command replaces the creative while keeping the existing ad, which preserves its learning, engagement, and identifier.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/markifact/markifact-mcp/edit-meta-creative
Clone the repo
git clone --depth 1 https://github.com/markifact/markifact-mcp
Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,658 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00088 $0.01658
Opus 5 $0.00044 $0.00829
Sonnet 5 $0.00018 $0.00332
Haiku 4.5 $0.00009 $0.00166

Measured 2d ago against content hash f6663d3d1c15, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

edit-meta-creative scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/edit-meta-creative.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Goal

Apply a creative-content change to one or more existing Meta ads without losing learning, frequency caps, ad post engagement, or the ad ID. The same ad_id keeps running with a new creative attached.

The Meta reality this command exists to handle

Meta does not allow in-place edits of creative content (URL, text, headline, image, CTA). The only way to change an existing ad's creative is:

get_ad_creative → modify payload locally → create_ad_creative → replace_ad_creative

Anything else (deleting + recreating the ad) destroys learning, frequency capping, social proof (likes/comments), and breaks any link people have to the ad post. Always use replace_ad_creative — never delete-and-recreate for a creative change.

Inputs to confirm (batch)

  1. Account name (substring) — required.
  2. Scope — required. One of:
    • Single ad ID(s).
    • All ads in a campaign / ad set (by name or ID).
    • All active ads in the account matching a filter (e.g. status=ACTIVE).
  3. What to change — required. Examples:
    • Landing page URL (the most common bulk edit).
    • Primary text / headline / description / link description.
    • Call-to-action button.
    • Display link / deep link.
  4. Old → new mapping if it's a find-and-replace (e.g. swap utm_campaign=spring for utm_campaign=summer, or replace oldsite.com with newsite.com).

Workflow

  1. Discover ops: meta_ads_select_accounts, meta_ads_list_ads, meta_ads_list_adsets, meta_ads_list_campaigns, meta_ads_get_ad_creative, meta_ads_create_ad_creative, meta_ads_replace_ad_creative.
  2. Inspect each with get_operation_inputs.
  3. Resolve account via meta_ads_select_accounts (substring).
  4. Resolve scope to a list of ad_ids via meta_ads_list_ads with the right filters (campaign, ad set, status). Show the user the ad list and the count before doing anything else.
  5. For each ad in scope: a. meta_ads_get_ad_creative(ad_id) → returns the raw creative payload. b. Modify the payload locally based on the requested change. Preserve all fields the user did not ask to change. Common fields to patch:
    • object_story_spec.link_data.link (URL for link/single-image ads)
    • object_story_spec.link_data.message (primary text)
    • object_story_spec.link_data.name (headline)
    • object_story_spec.link_data.description (link description)
    • object_story_spec.link_data.call_to_action.value.link (CTA link)
    • object_story_spec.link_data.call_to_action.type (CTA button type, e.g. LEARN_MORE, SHOP_NOW)
    • For video ads: object_story_spec.video_data.*
    • For carousel: each item under object_story_spec.link_data.child_attachments[] c. meta_ads_create_ad_creative(modified_payload) → returns new creative_id. Only works when the existing media (image_hash / video_id) is reused. If the user is also swapping in fresh media that isn't already in Meta, see "Fresh media" below. d. meta_ads_replace_ad_creative(ad_id, creative_id) → attaches the new creative.
  6. Build a diff preview before executing. Show the user a table of every ad with old → new for each changed field. Wait for explicit confirmation. Then run all replaces, batched into a single request_human_approval if approval is required.
  7. Confirm: count succeeded, count failed (with reason), list of new creative_ids.

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 101 lines · 88 tokens per session scan A f6663d3d1c15

Subscribe to this mod's changes

edit-meta-creative is a command published in the GitHub repository markifact/markifact-mcp (48 stars, last pushed 14d ago), licensed MIT. It adds 88 tokens to every session and 1,658 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.