Skip to main content
Glama

Update campaign

update_campaign
DestructiveIdempotent

Edit a campaign. Partial: only the sent fields change. flows / pixels / postbacks, when sent, REPLACE the stored lists entirely (rows match by id, omitted rows are deleted) — fetch the current tree with get_campaign include=flows first and send it back whole with your changes. Status is changed via set_campaign_status.

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": {
      "id": "<id>"
    },
    "name": "update_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesCampaign id
nameNo
tagsNoTag ids (see list_tags)
aliasNoShort code used in the click URL /c/{alias}; generated when omitted. Globally unique.
flowsNoRouting tree, evaluated in order. Exactly one flow should be is_default (catch-all, no rules). On update the list is complete: rows match by id, omitted rows are deleted.
notesNo
pixelsNoAttached conversion pixels (complete list on update)
group_idNo
owner_idNoHand the campaign to another workspace member (user id from list_workspace_members). Needs edit rights on the campaign; a non-admin may only pick members of their own team. Click history keeps the owner at click time unless rewrite_history is true.
cost_typeNoHow click cost is booked (auto = from the {cost} macro)
domain_idNoTracking domain (see list_domains; defaults to the workspace default on create)
postbacksNoCampaign-level outgoing postbacks (complete list on update)
cost_valueNoCost per click / per 1000 (cpc / cpm) or per conversion (cpa); % for revshare
auto_metricNo
sticky_flowNoCookie-pin a returning visitor to the flow and destination they got first (priority flows still win)
site_list_idNoSite list attached to the campaign
traffic_lossNo0–100 % traffic-loss compensation; null = inherit the traffic source
cost_currencyNoDefault USD
flow_rotationNoauto = EPC/CR bandit split of each flow's destinations
network_linksNoIds of campaigns already running on the campaign's API traffic source, exactly as the network shows them — network actions (start/stop, stats, bids, lists) then act on them. Complete list: replaces the manual links, [] clears them, omit to leave them as they are. A link turns a manual campaign into an api one; removing the last turns it back. Ignored for sources without an API connection.
remember_offerNoKeep a returning visitor on the offer they first got
auto_min_clicksNoauto rotation: clicks before exploiting (default 100)
back_button_urlNoBack button target http(s) URL, macros allowed (target = url)
rewrite_historyNoWith owner_id: also re-stamp the clicks and conversions already booked onto the new owner (asynchronous; lands within minutes). Default false.
uniqueness_modeNo
uniqueness_scopeNo
backup_domain_idsNoOrdered failover pool for automatic domain switching (max 20)
traffic_source_idNo
uniqueness_periodNoHours (1–8760, default 24)
back_button_targetNoBack button: where a visitor pressing Back on a served landing / PWA install page is sent; null = off
auto_explore_percentNoauto rotation: exploration share 0–50 (default 10)
back_button_offer_idNoBack button target offer (target = offer)
back_button_campaign_idNoBack button target campaign (target = campaign; not the campaign itself)
sticky_flow_keep_click_idNoSticky flow: a return visit resumes the original click id instead of minting a new click
sticky_flow_skip_inactiveNoSticky flow: route afresh when the sticky flow is paused (default true); false keeps serving it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / pixels / items / properties / event_mapping / description
      Previous value: -"Tracker event → platform event name, e.g. {\"lead\":\"Lead\",\"sale\":\"Purchase\"}. For google_ads pixels the value is a conversion action id (numeric) or \"default\" for the pixel-level one"New value: +"Tracker event → platform event name, e.g. {\"lead\":\"Lead\",\"sale\":\"Purchase\"}. Keys: click, lead, sale, reject, upsell, pwa_install, tg_start, tg_join (Telegram bot start / channel join) or a conversion type code. For google_ads pixels the value is a conversion action id (numeric) or \"default\" for the pixel-level one"
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

The description carries the destructive semantics explicitly: partial update of sent fields only, and flows/pixels/postbacks REPLACE stored lists with omitted rows deleted. This is exactly the kind of beyond-schema warning that prevents data loss, and it is consistent with destructiveHint=true.

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?

Three front-loaded sentences, no filler: base behavior, then the destructive caveat, then the sibling exclusion. The middle sentence is long and dense, but every clause (replace, match by id, fetch-first) earns its place.

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

Completeness3/5

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

For a 35-parameter destructive mutation the description covers the main hazard and the fetch-first workflow, which annotations alone could not. It stops short of scope: the owner transfer / rewrite_history implication and any permission model are left entirely to the schema, and no output behavior is mentioned.

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?

With 80% schema coverage the baseline is 3, but the description adds cross-cutting meaning that is easy to miss across three separate schema entries: the replace-and-delete rule applies uniformly to flows, pixels and postbacks, and rows match by id. No detail on the other 30+ params, but the highest-risk ones are explained.

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?

"Edit a campaign" is a specific verb+resource, and the description immediately distinguishes this from sibling set_campaign_status ("Status is changed via set_campaign_status"). An agent knows both what it does and one thing it does not do without opening the schema.

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

Usage Guidelines4/5

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

It gives a concrete pre-call workflow ("fetch the current tree with get_campaign include=flows first and send it back whole with your changes") and names the alternative tool for status changes. It does not cover exclusions such as when to clone instead, or which of the 35 parameters need extra rights, but the routing guidance is genuinely actionable.

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