Skip to main content
Glama

Metadata MCP Connector

Get Campaign UTMs

get_campaign_utms
Read-only

Read ONE campaign's resolved UTM tracking parameters per channel, each value tagged with where it came from.

            KEYWORDS: utm, utms, utm_source, utm_medium, utm_campaign, utm_term, utm_content, tracking parameters, final url suffix, placeholder, UPDATE ME, inherited, account default, campaign override

            USE THIS TOOL WHEN THE USER ASKS:
            - "What UTMs does campaign X use?" / "Show me the tracking parameters on this campaign"
            - "Does this campaign override the account UTM defaults?"
            - "Does campaign X still have the UPDATE ME placeholder in its UTMs?"

            INHERITANCE RULE - READ BEFORE ANSWERING ANY UTM QUESTION:
            UTMs are inherited, never blank. A campaign channel with an empty stored
            mapping does NOT have "no UTMs" - it tracks with the account's UTM defaults,
            and where the account set nothing it tracks with the Metadata platform default.
            Roughly half of all channel rows in production are in that inherited state.
            NEVER report "no UTMs configured" from an empty stored field: report the
            resolved value and its origin.

            ORIGIN IS PER CHANNEL, not per key: a channel with an empty stored mapping
            inherits the account default whole, so a channel whose resolved mapping differs
            at all from that is stored on the campaign and every one of its values is an
            override. The per-key `same_as_default` flag says whether that one key happens
            to match the default anyway.

            ORIGIN VALUES:
            - campaign_override: stored on this campaign channel, differs from what it would inherit.
            - account_default: inherited from this account's UTM defaults.
            - platform_default: inherited from the Metadata-wide default (account set nothing).
            - not_set: the channel really has no UTM mapping (non-sponsored channels only).

            HONEST LIMIT: a campaign that stores a mapping identical to the default it
            would inherit is reported as inherited. The platform returns resolved values
            with no provenance, so that case cannot be distinguished - say so rather than
            claiming the campaign has no override.

            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.

            INPUT: campaign_id - the WIZARD campaign id (the `id` field returned by
            list_wizard_campaigns / search_campaigns_by_names). Not an experiment id.

            RESPONSE SHAPE:
            {
              "campaign_id": 173290,
              "is_editable": true,
              "channels": {
                "LINKEDIN": {
                  "origin": "campaign_override",
                  "inherited_from": "account_default",
                  "values": {
                    "UTM_SOURCE": {"value": "UPDATE ME", "origin": "campaign_override", "same_as_default": false, "placeholder": true},
                    "UTM_MEDIUM": {"value": "AD_CHANNEL", "origin": "campaign_override", "same_as_default": true, "placeholder": false}
                  }
                }
              },
              "account_defaults": {"LINKEDIN": {"UTM_SOURCE": "Metadata", ...}, ...},
              "platform_default": {"UTM_SOURCE": "Metadata", "UTM_MEDIUM": "AD_CHANNEL", ...},
              "notes": ["..."]
            }

            `placeholder: true` marks a value that still carries the UPDATE ME placeholder -
            that is a real tracking defect worth reporting to the user.

            Values like AD_CHANNEL / OFFER_TYPE / AD_NAME are dynamic tokens the platform
            resolves for lead records and ad URLs, not literal text.

            `platform_default` is a constant mirrored in mcp-server from the platform source;
            it is not fetched from an endpoint and covers sponsored channels only.

            READ-ONLY. To change a campaign channel's UTMs use set_campaign_utms; the
            account defaults are edited in the Metadata UI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesWizard campaign id (the `id` from list_wizard_campaigns).

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?

Annotations already convey the read-only, non-destructive, closed-world profile, yet the description adds substantial context beyond them: the inheritance rule (never blank), per-channel origin semantics, the origin value vocabulary, an explicit 'HONEST LIMIT' caveat about indistinguishable records, and timing caveats. This is exactly the behavioral disclosure the structured fields cannot carry.

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?

It is long, but organized with clear headings (inheritance rule, origin values, timing, response shape) and front-loads the one-line purpose. Given the genuinely error-prone UTM inheritance model, most content earns its place, though the response-shape and token-timing sections could be trimmed.

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

Completeness5/5

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

There is no output schema, so the description compensates by spelling out the full response shape, the meaning of placeholder and same_as_default flags, and how to report results. For a domain where the naive answer ('no UTMs') is wrong, this is complete enough to act on correctly.

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% and the single parameter is documented, but the description adds meaning beyond the schema: it specifies this is the WIZARD campaign id (the `id` from list_wizard_campaigns / search_campaigns_by_names) and explicitly rules out an experiment id. Useful disambiguation above the baseline 3.

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?

The opening sentence states a specific verb (Read), resource (ONE campaign's resolved UTM tracking parameters), and scope (per channel, each value tagged with origin). It is clearly distinguishable from siblings like get_account_utm_defaults, set_campaign_utms, and search_campaigns_by_utm_value.

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?

It provides an explicit 'USE THIS TOOL WHEN THE USER ASKS' list with concrete example phrasings, and it names the alternative (set_campaign_utms) for the mutation case, with the account defaults pointed at the Metadata UI. When-to-use and when-not-to-use are both covered.

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