Skip to main content
Glama

Metadata MCP Connector

Set Campaign UTMs

set_campaign_utms
Destructive

Set or clear the UTM parameters for one channel of a wizard campaign, merging the supplied changes into the existing mapping. Returns the updated tracking settings or an error. Clearing a stored mapping restores inheritance from the account or platform defaults; it does not disable tracking. Account-level defaults remain unchanged. A saved mapping applies to incoming server-resolved leads immediately; publishing ad click URLs follows a separate timeline.

TRACKING TIMING AND TOKEN MEANING: Leads using server-resolved campaign UTMs use the current saved mapping when the platform processes them, without waiting for an ad republish. Captured URL or caller-supplied values can follow a different ingestion path, so do not generalize this timing to every new lead. Native click-time macros retain values captured from the lead's click URL. Ad click URLs have a separate publication timeline: a draft uses the saved mapping at launch, and launched ads use it on their next campaign publish. Saving a launched Microsoft Ads campaign triggers a live UTM push. AD_NAME is a dynamic token, not necessarily an individual ad name: standard experiments use their ad group name when present, otherwise their creative name; native ad structures use the native ad's own name. CAMPAIGN_NAME uses the wizard campaign name. Saving a launched campaign can also queue an asynchronous existing-lead UTM refresh. Do not assume historical rows are immutable or that all old rows have already refreshed. Verify the saved mapping with get_campaign_utms and actual lead values and ingestion timing separately from live ad click URLs; a supplied or backfilled lead creation date alone does not prove when its UTMs were resolved.

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": {
      "campaign_id": "<campaign_id>",
      "channel": "<channel>",
      "utms": "<utms>"
    },
    "name": "set_campaign_utms"
  }
}

Input Schema

NameRequiredDescriptionDefault
utmsYesUTM key to value, e.g. {"UTM_SOURCE": "Linkedin", "UTM_MEDIUM": "paid-social", "UTM_CAMPAIGN": "DG_Touch-3_TAG", "UTM_CONTENT": "AD_NAME"}. Empty string clears a key.
channelYesThe enabled channel whose UTM mapping to edit (TWITTER is X).
campaign_idYesWizard campaign id (the `id` from list_wizard_campaigns).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / channel / description
      Previous value: -"The enabled channel whose UTM mapping to edit."New value: +"The enabled channel whose UTM mapping to edit (TWITTER is X)."
    • changedInput schema / properties / channel / enum
      Previous value: -[
      -  "LINKEDIN",
      -  "FACEBOOK",
      -  "INSTAGRAM",
      -  "GOOGLE_ADS",
      -  "MICROSOFT_ADS",
      -  "REDDIT"
      -]New value: +[
      +  "LINKEDIN",
      +  "FACEBOOK",
      +  "INSTAGRAM",
      +  "GOOGLE_ADS",
      +  "MICROSOFT_ADS",
      +  "REDDIT",
      +  "TWITTER"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag readOnlyHint=false, destructiveHint=true, and openWorldHint=true, yet the description adds substantial behavior beyond them: what clearing actually does to inheritance, that account defaults are unaffected, that server-resolved leads pick up the saved mapping immediately while ad click URLs wait for a republish, that saving a launched Microsoft Ads campaign triggers a live UTM push, and that an asynchronous existing-lead refresh may be queued. That is exactly the side-effect detail a destructive, open-world mutation needs.

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

Conciseness3/5

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

The core sentence is front-loaded and efficient, but two long appended sections make the definition heavy, and some lines read as defensive predictions ('do not assume historical rows are immutable', 'do not generalize this timing to every new lead') rather than tool facts. The trailing stray quotation mark and the ALL-CAPS section headers add noise without improving selection.

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 with an open-world hint, nested utms object, and no output schema, the description covers side effects, timing, token expansion, and the returned shape ('updated tracking settings or an error'). The only missing piece is what the returned mapping looks like in enough detail to distinguish channels, which is minor given get_campaign_utms exists.

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 100%, so the baseline is 3, but the description adds meaning the schema does not: it clarifies that the edit targets a single channel, explains the token semantics of AD_NAME (experiment ad group name, else creative name; native ads use their own name) and CAMPAIGN_NAME (wizard campaign name), and reinforces that empty string clears a key. Channel-level enum and campaign_id sourcing are already covered by the schema.

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+resource+scope: 'Set or clear the UTM parameters for one channel of a wizard campaign, merging the supplied changes into the existing mapping.' Both the mutate and clear semantics are stated up front, and the merge-vs-replace behavior distinguishes it from a plain overwrite tool. It also names get_campaign_utms as the read counterpart used to verify results.

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?

Gives concrete usage context: clearing restores inheritance from account/platform defaults rather than disabling tracking, account-level defaults are untouched, and the mapping should be verified with get_campaign_utms plus actual lead values. It stops short of an explicit 'do not use this tool when…' exclusion, but the guidance for when to clear vs set is clear.

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