MCP ScannerCustom audit
All servers

kLOsk/adloop

Google Ads MCP server for Claude, ChatGPT and Cursor, with Reddit Ads, GA4 and Tag Manager. Every change is previewed first.

Packageadloop
Version0.45.0 in pyproject.toml
PublisherkLOsk community
MCP Registrycom.getadloop/adloop
Scanned2026-11-25
Scannerv1.3.0
Methodologyv1.2
Stars 302Forks 72Last push 2026-11-12
Python 100.0%by source files the scanner reads
Code safetypartly tracedExposure6.1Prompts10.0Supply chainnot checkedSecrets10.0Transparency10.0
Analysis confidence94%
How much of the server the scanner could read: tools analyzed, files parsed, limits hit.
Code Safetypartly traced—

Paths from tool input into commands, SQL, files and URLs

Capability Exposure6.1/10Fair

How much power the tools give an agent over the machine

Prompt Integritynothing published yet10.0/10

Hidden instructions and poisoning in text for the model

Supply Chainnot checked—

Known vulnerabilities in the packages the server uses

Secrets & Credentialsnothing published yet10.0/10

How the server reads credentials and where they can go

Behavior Transparencynothing published yet10.0/10

Whether the tools do only what their descriptions say

How far the analysis went

The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.

  • In 39 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
  • 1 of 208 tools, prompts and resources could not be followed through the code
  • Supply Chain: the dependency files state no exact versions the scanner could check, so it has no number

Top risks in plain words

  • INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.

How to use it safely

Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.

  • Give it a narrowly scoped token

    Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.

  • Keep confirmations on

    Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.

What its tools can do on your machine

The server offers 205 tools, 3 resources. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.

Read or write filesopen, create, change or delete files
add_ad_schedule, add_microsoft_negative_keywords, add_negative_keywords, add_negative_locations, add_to_brand_list, add_to_microsoft_negative_keyword_list and 199 more
205 of 208
Read passwords, tokens or keysload secrets such as API keys
add_ad_schedule, add_microsoft_negative_keywords, add_negative_keywords, add_negative_locations, add_to_brand_list, add_to_microsoft_negative_keyword_list and 194 more
200 of 208
Read environment variablesoften where API keys are kept
add_ad_schedule, add_microsoft_negative_keywords, add_negative_keywords, add_negative_locations, add_to_brand_list, add_to_microsoft_negative_keyword_list and 194 more
200 of 208
Touch sensitive locationssuch as ~/.ssh, cloud credentials or browser data
add_ad_schedule, add_microsoft_negative_keywords, add_negative_keywords, add_negative_locations, add_to_brand_list, add_to_microsoft_negative_keyword_list and 194 more
200 of 208

No tool was seen to: start other programs on the machine; connect to the internet or other hosts.

Where its requests and secrets go

Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.

Hosts written in the code

The literal addresses the tools' requests name.

  • None: no request names a fixed host.
Addresses from settings

Constants or settings that start an address; the value comes from configuration.

  • None seen.
Secrets it reads

Credential-like environment variables. Give the server a key with the least access it needs.

  • None: no credential-like variable is read by the tools.

Text it brings in from outside

Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.

  • files205 tools · add_ad_schedule, add_microsoft_negative_keywords, add_negative_keywords +202

Tool annotations

No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.

Tools, prompts and resources (208: 205 tools, 3 resources)

Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.

adloop_viewresource Draws a read result as a dashboard (charts and tables).
Draws a read result as a dashboard (charts and tables).
approval_cardresource Renders a change preview with Test run and Apply buttons.Filesoutside text
Renders a change preview with Test run and Apply buttons.
upload_cardresource A drop zone that uploads images to AdLoop for use as ad assets.Filesoutside text
A drop zone that uploads images to AdLoop for use as ad assets.
add_ad_scheduletool Draft ad schedule windows for a campaign — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft ad schedule windows for a campaign — returns a PREVIEW.

    Adds the windows; existing ones stay. The preview lists the current
    windows (each with the remove_id that remove_entity takes as a
    campaign_criterion) and the account time zone the hours are in.
    Overlapping windows and more than six a day are refused. A campaign
    without any window serves at all hours, so its first windows restrict it
    to them: that preview needs a double confirmation.

    Args:
        campaign_id: Numeric ID of the campaign.
        schedule: Windows to add, each {day_of_week: MONDAY..SUNDAY,
            start_hour: 0-23, end_hour: 0-24, start_minute/end_minute: 0, 15,
            30 or 45 (default 0)}. Whole numbers only. Hours are in the
            account time zone.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
add_microsoft_negative_keywordstool Draft negative keywords directly on one Microsoft Advertising campaign or ad group (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft negative keywords directly on one Microsoft Advertising campaign or ad group (preview only).

    Negatives already there are skipped, and the preview names active
    keywords they would block. A shared list (propose_microsoft_negative_keyword_list)
    is the reusable alternative. The returned plan_id is applied with
    confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or ad_group_id, not both).
        ad_group_id: Ad group id.
        keywords: Negative keyword texts.
        match_type: Phrase (default) or Exact.
add_negative_keywordstool Draft negative keyword additions — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft negative keyword additions — returns a PREVIEW.

    Negative keywords prevent your ads from showing for irrelevant searches.
    They are added at campaign level. Returns a preview with a plan_id; nothing
    changes until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the campaign that gets the negatives.
        keywords: Negative keyword texts; at least one is required. All share
            the same match_type.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        match_type: "EXACT" (default), "PHRASE", or "BROAD".
add_negative_locationstool Draft negative geo location additions — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft negative geo location additions — returns a PREVIEW.

    Excludes cities/regions from a campaign while keeping broader positive
    targets such as State of Sao Paulo. Returns a preview with a plan_id;
    nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the campaign to add the location exclusions to.
        geo_target_ids: Numeric Google geo target constant IDs to exclude (e.g.
            "1001773"). Duplicates are collapsed; non-numeric IDs are rejected.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
add_to_brand_listtool Append brands to an EXISTING brand list — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Append brands to an EXISTING brand list — returns a PREVIEW.

    For a list that already exists and only needs more brands
    (propose_brand_list creates a new list instead). The shared_set_id comes
    from get_brand_lists; get_brand_list_brands shows the brands already in
    the list, which makes a brand that would be added twice visible.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        brand_ids: Commercial Knowledge Graph MIDs from suggest_brands.
        customer_id: Ads account ID. Defaults to the configured account.
add_to_microsoft_negative_keyword_listtool Draft appending negatives to an existing Microsoft Advertising negative keyword list (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft appending negatives to an existing Microsoft Advertising negative keyword list (preview only).

    Items already in the list are skipped; the preview names active
    keywords in attached campaigns that the new negatives would block. The
    returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_id: Shared list id (get_microsoft_negative_keywords).
        keywords: Negative keyword texts.
        match_type: Phrase (default) or Exact.
add_to_negative_keyword_listtool Append keywords to an EXISTING shared negative keyword list — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Append keywords to an EXISTING shared negative keyword list — returns a PREVIEW.

    Adds terms to a list that already exists (propose_negative_keyword_list
    creates a new list instead); get_negative_keyword_list_keywords shows the
    terms already in a list. Returns a preview with a plan_id; nothing changes
    until confirm_and_apply applies it.

    Args:
        shared_set_id: Numeric ID of the list (shared_set.id from
            get_negative_keyword_lists).
        keywords: Keyword strings to append. Blank entries are dropped and
            duplicates in the input list are collapsed (case-insensitive).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        match_type: Match type applied to every keyword: "EXACT" (default),
            "PHRASE", or "BROAD" (case-insensitive).
analyze_campaign_conversionstool Campaign clicks → GA4 conversions mapping — the real cost-per-conversion.FilesCredentialsEnv varsSensitive pathsoutside text
Campaign clicks → GA4 conversions mapping — the real cost-per-conversion.

    Combines Google Ads campaign metrics with GA4 session/conversion data to
    reveal click-to-session ratios (GDPR indicator), compare Ads-reported vs
    GA4-reported conversions, and compute cost-per-GA4-conversion.
    Also returns non-paid channel conversion rates for comparison context.
    GA4 conversions are the property's key events (GA4 metric keyEvents).

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        campaign_name: Optional case-insensitive substring; only campaigns
            whose name contains it are included. Empty = all campaigns.
analyze_page_speedtool Run PageSpeed Insights for a landing page — Lighthouse + real-user data.FilesCredentialsEnv varsSensitive pathsoutside text
Run PageSpeed Insights for a landing page — Lighthouse + real-user data.

    Returns the performance score (0-100), lab Core Web Vitals (LCP, CLS,
    TBT, FCP), CrUX field data from real Chrome users where available
    (p75 LCP/INP/CLS/FCP/TTFB + FAST/AVERAGE/SLOW ratings), and the top
    improvement opportunities with estimated savings. When the page itself
    has too little traffic for field data, the origin-wide field data is
    returned instead, marked field.scope="origin".

    Typical input is an ad final_url: slow landing pages depress Quality
    Score and waste paid clicks. Takes 10-30s; that is normal for a
    Lighthouse run.

    Args:
        url: Full URL of the page to analyze, e.g. an ad's final_url
            ("https://example.com/landing").
        strategy: "mobile" (default — most paid traffic) or "desktop".
approve_changetool Run, apply or discard a previewed change from its approval card.FilesCredentialsEnv varsSensitive pathsoutside text
Run, apply or discard a previewed change from its approval card.

    Called only by the AdLoop approval card when the user clicks a button;
    AI apps keep this tool out of the model's tool list.

    Args:
        plan_id: The plan shown on the card.
        code: The card's approval code for this plan.
        action: "test" (dry run), "apply" (real change) or "discard".
        acknowledged: The user ticked "cannot be undone"; required to apply a
            plan that needs double confirmation.
attach_brand_list_to_campaignstool Attach an existing brand list to one or more campaigns — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Attach an existing brand list to one or more campaigns — returns a PREVIEW.

    Creates a CampaignCriterion.brand_list per campaign. This is NOT the
    CampaignSharedSet linkage used for negative keyword lists — brand lists are
    criteria, and `negative` decides the role. The shared_set_id comes from
    get_brand_lists; get_brand_list_campaigns lists existing attachments.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        campaign_ids: Numeric campaign IDs to attach the list to.
        negative: True (default) excludes the brands from those campaigns;
            False restricts targeting to them instead.
        customer_id: Ads account ID. Defaults to the configured account.
attach_microsoft_negative_keyword_listtool Draft attaching a shared Microsoft Advertising negative keyword list to campaigns (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft attaching a shared Microsoft Advertising negative keyword list to campaigns (preview only).

    Campaigns already attached are skipped. The returned plan_id is applied
    with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_id: Shared list id.
        campaign_ids: Campaign ids.
attach_shared_set_to_campaignstool Attach an existing shared set to one or more campaigns — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Attach an existing shared set to one or more campaigns — returns a PREVIEW.

    Creates CampaignSharedSet linkages so the campaigns inherit the shared
    set's criteria (e.g. negative keywords). Most commonly used to attach a
    shared negative keyword list to newly-built campaigns;
    get_negative_keyword_list_campaigns lists existing attachments. Returns a
    preview with a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        shared_set_id: Numeric ID of the shared set (from
            get_negative_keyword_lists).
        campaign_ids: Numeric campaign IDs to attach the set to (at least one).
            Blank entries are dropped and duplicates collapsed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
attribution_checktool Compare Ads-reported conversions vs GA4 — find tracking discrepancies.FilesCredentialsEnv varsSensitive pathsoutside text
Compare Ads-reported conversions vs GA4 — find tracking discrepancies.

    Checks whether conversions reported by Google Ads match what GA4 records,
    diagnoses GDPR consent gaps, attribution model differences, and missing
    conversion event configuration. Returns both sides' totals with the
    discrepancy and diagnostic insights. GA4 conversions are the property's
    key events (GA4 metric keyEvents).

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        conversion_events: Optional list of GA4 event names to specifically
            check (e.g. ["sign_up", "purchase"]). If omitted, compares
            aggregate totals only.
audit_event_coveragetool Three-way audit: codebase events ↔ GTM tags ↔ GA4 actual fires.FilesCredentialsEnv varsSensitive pathsoutside text
Three-way audit: codebase events ↔ GTM tags ↔ GA4 actual fires.

    Fetches the LIVE GTM container, joins it against GA4 event counts for the
    date range, and returns a per-event matrix with one of these statuses:
      ok                          — tag active and event firing
      ok_auto_collected           — GA4 Enhanced Measurement event, no tag needed
      no_tag_no_fire              — codebase event, no GTM tag, never fires
      tag_paused                  — GTM tag exists but is paused
      tag_active_but_not_firing   — tag is active but no GA4 hits
      gtm_only_firing             — GA4 event from a tag, not in codebase
      gtm_paused_but_firing       — only paused tag(s), not in codebase, yet
                                    GA4 still fires (event comes from elsewhere)
      gtm_only_not_firing         — tag exists, not in codebase, no fires
      ga4_only                    — fires in GA4, no tag, no codebase ref
      ga4_fires_no_tag            — codebase event firing without a GTM tag
      auto_event_only             — Enhanced Measurement event with no codebase ref

    The result also lists dynamic-event tags ({{Event}} variables) and Custom
    HTML tags that the audit cannot interpret automatically.

    Args:
        expected_events: Distinct event names found in the codebase's
            gtag('event', ...) and dataLayer.push({event: ...}) calls.
        gtm_account_id: Numeric GTM account ID (Tag Manager UI → Admin →
            Container Settings, or list_gtm_accounts). Empty uses
            gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (not the GTM-XXXXXXX public
            ID; see list_gtm_containers). Empty uses gtm.container_id from the
            config.
        property_id: GA4 property as "properties/123456789". Empty uses the
            default from config.
        date_range_start: Start date "YYYY-MM-DD". Empty (or an empty
            date_range_end) means the last 30 days.
        date_range_end: End date "YYYY-MM-DD". Empty (or an empty
            date_range_start) means the last 30 days.
audit_ga4_propertytool Audit a GA4 property's setup in one call: the settings that quietly cost data or conversions.FilesCredentialsEnv varsSensitive pathsoutside text
Audit a GA4 property's setup in one call: the settings that quietly cost data or conversions.

    Checks data retention (two months is GA4's default and cuts
    explorations short), the Google Ads link (and whether the configured
    Ads account is linked), each data stream's activity in the last 7 days,
    key events that never fired in 28 days or no key events at all,
    enhanced measurement per web stream, Google signals (and the
    thresholding they cause), the custom dimension and metric limits, and a
    property in the trash. Returns checks with status warn, info or ok
    (warnings first), a summary count, and the warnings as insights[]; a
    check the user may not read is listed under unavailable. Reads GA4 only
    (Admin API, part v1alpha, and two small Data API reports); for whether
    Google Ads imports the key events, run check_key_event_imports.

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
check_brand_namestool Check a list of brand names against Google's brand knowledge graph.FilesCredentialsEnv varsSensitive pathsoutside text
Check a list of brand names against Google's brand knowledge graph.

    One SuggestBrands call per name, for the case where a shortlist has to be
    triaged instead of a single name resolved: which of these brands does
    Google know at all, and what is the ID of each?

    Returns checked / matched / no_match counts and one result per name with
    status "matched" (with a best-match brand plus all candidates) or
    "no_match" (empty candidate list — a normal answer, not an error).
    exact_match marks a candidate whose name matches the query apart from case
    and punctuation; anything else is a Google suggestion, not a guarantee.

    Args:
        brand_names: The names to triage, at most 25 per call — the API
            resolves one prefix per request, so longer lists take several calls.
        customer_id: Ads account ID. Defaults to the configured account.
check_key_event_importstool Check that every GA4 key event reaches Google Ads: imported, used for bidding, and actually receiving conversions.FilesCredentialsEnv varsSensitive pathsoutside text
Check that every GA4 key event reaches Google Ads: imported, used for bidding, and actually receiving conversions.

    Matches the property's key events with the Google Ads conversion actions
    that import them (by GA4 property and event name), and compares GA4's
    key events from Google Ads traffic (google / cpc) with the conversions
    Google Ads recorded for each import. insights[] names key events no
    conversion action imports, imports that are only secondary (reported,
    not bid on), imports that stay at zero while GA4 counts Google Ads
    conversions (a broken link or auto-tagging), and imports of events that
    are no longer key events. Imports from other GA4 properties are listed
    separately.

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes.
            Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
confirm_and_applytool Execute a previously previewed change.FilesCredentialsEnv varsSensitive pathsoutside text
Execute a previously previewed change.

    IMPORTANT: Defaults to dry_run=True (validate only). Only an explicit
    dry_run=false applies the change to the ad account (Google Ads or Reddit
    Ads — the plan knows which platform it targets).

    Forced dry runs: when real changes are switched off (live changes off
    for the workspace in AdLoop Cloud, or safety.require_dry_run in a
    self-hosted config), dry_run=false is IGNORED and the result is still
    DRY_RUN_SUCCESS, with 'dry_run_forced_by' and 'remediation' fields.
    'remediation' says how the user switches that setting; until it is
    changed, repeated calls with dry_run=false change nothing.

    Two-phase apply: if 'safety.two_phase_apply: true' is set (always on
    for AdLoop Cloud tenants), dry_run=false is REFUSED with status
    DRY_RUN_REQUIRED until this plan_id has completed one dry_run=true
    pass. The sequence is: dry run, review of its result, then the real
    apply.

    Google Ads plans: the dry run sends the exact mutates to Google with
    validate_only=True, so Google checks the change and executes nothing
    (`checks` counts the validated calls). Steps that build on an object an
    earlier step would create cannot be validated and are counted as skipped.

    Reddit plans: Reddit has no validate-only mode, so the dry run re-reads
    the target entity and re-checks the safety caps (returned as `checks`).

    A DRY_RUN_FAILED result means the change does not go through as previewed.
    The real apply fails the same way, unless Google rejected only part of the
    request: then it carries out the rest and reports those operations again.

    Returns a status with the plan_id and operation: DRY_RUN_SUCCESS,
    DRY_RUN_FAILED, DRY_RUN_REQUIRED, BLOCKED, APPLIED, PARTIAL_UPLOAD,
    PARTIAL_APPLY, UNKNOWN_OUTCOME or APPLY_IN_PROGRESS. BLOCKED means the
    operation was added to safety.blocked_operations after the draft: nothing
    ran and the plan stays pending. APPLIED results carry the created or changed resource
    names under 'result'. PARTIAL_UPLOAD belongs to the upload tools: the
    batches it lists are already in the account, so the plan is retired.
    'sent_total', 'accepted_total', 'rejected_total' and 'resume_from_line'
    say how far the upload got and at which CSV line a new draft continues;
    when a batch's fate is unknown, 'unknown_status', 'uncertain_lines' and
    'row_errors' name the rows whose outcome has to be checked first.
    PARTIAL_APPLY and UNKNOWN_OUTCOME come from platforms without
    transactional writes: part of the change is in the account ('created'
    names it), or a create was never answered. The plan is retired; read the
    account back and draft only what is missing. APPLY_IN_PROGRESS means an
    earlier call claimed this plan first, so this call executed nothing.

    Approval cards: in AI apps that show AdLoop's approval card with the
    preview, dry_run=false is REFUSED with status APPROVE_ON_CARD, because
    only the user's click on the card applies the change. Dry runs still
    work. The workspace owner can allow approval in chat as well.

    Confirmation dialogs: in apps that show dialogs instead, dry_run=false
    first asks the user in a dialog. A declined dialog returns NOT_CONFIRMED;
    an app that receives the dialog but never answers it gets
    CONFIRMATION_UNANSWERED on the next call, with the ways out.

    Args:
        plan_id: The plan_id returned by a prior draft_*, update_*, add_*,
            pause/enable/remove or other preview tool call. An unknown or
            expired plan_id returns an error.
        dry_run: True (default) validates without changing anything; false
            applies the change for real.
detach_brand_list_from_campaignstool Detach a brand list from one or more campaigns — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Detach a brand list from one or more campaigns — returns a PREVIEW.

    Removes the CampaignCriterion rows linking the list to those campaigns; the
    list itself and its brands are unchanged. get_brand_list_campaigns lists
    the existing attachments.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        campaign_ids: Numeric campaign IDs to detach the list from. Campaigns
            that do not carry the list are reported as `not_attached` in the
            apply result instead of failing the batch.
        customer_id: Ads account ID. Defaults to the configured account.
detach_microsoft_negative_keyword_listtool Draft detaching a shared Microsoft Advertising negative keyword list from campaigns; the list stays (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft detaching a shared Microsoft Advertising negative keyword list from campaigns; the list stays (preview only).

    The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_id: Shared list id.
        campaign_ids: Campaign ids.
detach_shared_set_from_campaignstool Detach a shared set from one or more campaigns — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Detach a shared set from one or more campaigns — returns a PREVIEW.

    Removes CampaignSharedSet linkages so the campaigns no longer inherit the
    shared set's criteria. The shared set itself is unchanged; only the
    per-campaign attachment is removed. get_negative_keyword_list_campaigns
    lists the existing attachments. Returns a preview with a plan_id; nothing
    changes until confirm_and_apply applies it.

    Args:
        shared_set_id: Numeric ID of the shared set (from
            get_negative_keyword_lists).
        campaign_ids: Numeric campaign IDs to detach the set from (at least one).
            Blank entries are dropped and duplicates collapsed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
discover_keywordstool Discover new keyword ideas using Google Ads Keyword Planner.FilesCredentialsEnv varsSensitive pathsoutside text
Discover new keyword ideas using Google Ads Keyword Planner.

    Mirrors the "Discover new keywords" UI in Keyword Planner: start with
    keywords (seed_keywords), start with a website (url), or both together
    for more targeted ideas. At least one of seed_keywords or url is required.

    Returns keyword ideas sorted by avg monthly search volume, with
    competition level (LOW/MEDIUM/HIGH) and top-of-page bid range, plus the
    seeds used and insights.

    Args:
        seed_keywords: Seed terms, e.g. ["running shoes", "trail running"].
        url: A landing page or site URL to extract ideas from, e.g.
            "https://example.com/products".
        geo_target_id: Geo target constant ID (2276=Germany, 2840=USA, 2826=UK).
            Defaults to 2276.
        language_id: Language constant ID (1000=English, 1001=German,
            1002=French). Defaults to 1000.
        page_size: Max keyword ideas to return (default 50, clamped to 1-1000).
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
        include_monthly_volumes: true adds per-month search history (last 24
            months, top-20 ideas) plus a seasonality insight — relevant to
            questions about demand trends, seasonality, or "when should I ramp
            budget".
draft_ad_grouptool Draft a new ad group within an existing campaign — returns a PREVIEW, does NOT create.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new ad group within an existing campaign — returns a PREVIEW, does NOT create.

    Creates an ad group (ENABLED, type SEARCH_STANDARD) in the specified campaign,
    optionally with keywords in the same atomic operation. Only SEARCH campaigns
    are supported. Ads are not included, so the ad group cannot serve until one
    of its ads is created and enabled.

    Returns a preview with a plan_id plus warnings (BROAD keywords on a
    non-Smart-Bidding campaign, a duplicate ad group name, a CPC bid that Smart
    Bidding ignores); nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: The campaign to add the ad group to (numeric ID as returned
            by get_campaign_performance).
        ad_group_name: Name for the new ad group.
        keywords: Optional list of {"text": "keyword", "match_type":
            "EXACT|PHRASE|BROAD"}.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        cpc_bid_micros: Optional ad group CPC bid in micros (1,000,000 = one
            unit of the account's currency); only used by MANUAL_CPC campaigns.
            0 means no ad-group bid; must not be negative.
draft_ai_max_settingstool Draft AI Max controls for a Search campaign — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft AI Max controls for a Search campaign — returns a PREVIEW.

    AI Max is the container that makes brand exclusions usable in Search:
    Google rejects a brand list on a plain Search campaign ("For search
    advertising channel, brand lists can only be applied to exclusive
    targeting, broad match campaigns for inclusive targeting or PMax generated
    campaigns"). Turning AI Max on while leaving its automations running is the
    trap, so both belong to the same plan. An automation the caller never mentioned is
    refused outright (the plan says which switch to pass); one named explicitly
    (disable_search_term_matching=False, text_asset_automation="OPTED_IN") is
    planned with requires_double_confirm=True, because switching to AI Max with
    its automations is a real configuration some accounts want.

    Reads the campaign and its ad groups first, so the preview names concrete
    ad groups and shows current values per knob. Returns a preview with a
    plan_id; nothing is written until confirm_and_apply runs.

    Args:
        campaign_id: Numeric ID of the Search campaign to prepare.
        enable_ai_max: Value for campaign.ai_max_setting.enable_ai_max. When
            omitted, it stays untouched.
        disable_search_term_matching: Value for
            ad_group.ai_max_ad_group_setting.disable_search_term_matching on the
            selected ad groups. When omitted, they stay untouched.
        ad_group_ids: Explicit ad group IDs. Empty means every non-removed ad
            group of the campaign.
        include_paused_ad_groups: Default true — paused groups are set as well,
            so re-enabling one later cannot silently restore search term
            matching. REMOVED ad groups are never touched.
        text_asset_automation: OPTED_IN, OPTED_OUT or UNCHANGED (default) for
            TEXT_ASSET_AUTOMATION.
        final_url_expansion: OPTED_IN, OPTED_OUT or UNCHANGED (default) for
            FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION (the v25 field name for
            final URL expansion).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_asset_group_assetstool Draft adding and/or removing assets of a Performance Max asset group — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft adding and/or removing assets of a Performance Max asset group — returns a PREVIEW.

    Adds new text, image and YouTube assets and unlinks existing ones in one
    atomic request, so an asset is replaced without the group dropping below
    Google's minimums (3 headlines, 1 long headline, 2 descriptions, one of
    them at most 60 characters). Texts already in the group are skipped.
    Images are checked and sorted by aspect ratio; removed assets stay in the
    account's asset library. The preview lists the asset counts per type
    after the change. Nothing changes until confirm_and_apply applies the
    plan_id; a dry run has Google validate it.

    Args:
        asset_group_id: Numeric asset group id (from get_pmax_performance or
            get_pmax_assets).
        headlines: Headlines to add, at most 30 characters each (up to 15 in
            the group).
        long_headlines: Long headlines to add, at most 90 characters (up to 5).
        descriptions: Descriptions to add, at most 90 characters (up to 5).
        business_name: Business name to add, at most 25 characters (one per
            group).
        images: Images to add, each {"url": "..."} or {"upload_id": "up_..."}
            with an optional "role": "marketing" (default; landscape 1.91:1,
            square 1:1 or portrait 4:5 by aspect ratio), "logo" (1:1) or
            "landscape_logo" (4:1). PNG, JPEG or GIF up to 5120 KB.
        youtube_video_ids: YouTube video ids to add (the 11 characters after
            "v=" in the URL), up to 5 per group.
        remove_asset_ids: Asset ids to unlink from the group (from
            get_pmax_assets).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_asset_group_signalstool Draft adding search themes or an audience signal to a Performance Max asset group, or removing signals — PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft adding search themes or an audience signal to a Performance Max asset group, or removing signals — PREVIEW.

    Signals are hints that steer Performance Max, not targeting. A group has
    at most one audience signal and up to 50 search themes; replacing the
    audience means removing the current one in the same draft. Themes already
    on the group are skipped. Nothing changes until confirm_and_apply applies
    the plan_id; a dry run has Google validate it.

    Args:
        asset_group_id: Numeric asset group id (from get_pmax_performance).
        add_search_themes: Search themes to add, short phrases people search
            for (at most 80 characters each).
        audience_id: Audience to set as the group's audience signal (from
            get_asset_group_signals available_audiences).
        remove_signal_ids: Signals to remove (signal_id from
            get_asset_group_signals).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_assign_custom_conversion_goaltool Point a campaign at a custom conversion goal — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Point a campaign at a custom conversion goal — returns a PREVIEW.

    Sets goal_config_level=CAMPAIGN and the goal on that campaign's conversion
    goal config. Nothing else changes: conversion actions, bidding, budgets and
    the account-level goals stay as they are.

    A campaign must have at least one goal configured when it switches to
    campaign level — Google answers EMPTY_CONVERSION_GOALS otherwise. That is
    why this tool assigns a goal instead of clearing goals;
    draft_clear_custom_conversion_goal goes back to the account level.

    If the campaign already uses exactly this goal, nothing is planned and the
    result says `already_configured`. The preview carries a note that changing
    what a campaign optimises for restarts its Smart Bidding learning period.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        campaign_id: Numeric campaign ID to configure.
        custom_conversion_goal_id: Numeric goal ID from get_custom_conversion_goals.
        customer_id: Ads account ID. Defaults to the configured account.
draft_audience_attachmenttool Draft attaching audiences to a campaign or ad group as observation, targeting or exclusion: returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft attaching audiences to a campaign or ad group as observation, targeting or exclusion: returns a PREVIEW.

    Observation (the default) keeps the reach: the audiences adjust bids and
    show up in reports. Targeting narrows delivery to the audiences and needs
    a double confirmation. Exclusions keep the people out and leave the mode
    alone. The draft refuses combinations Google does not allow (custom
    segments on Search, combined segments outside Search, audiences at both
    campaign and ad group level) and lists that cannot serve; Performance Max
    is refused with a pointer to draft_asset_group_signals. Nothing changes
    until confirm_and_apply applies the plan_id; a dry run has Google
    validate it.

    Args:
        campaign_id: Numeric campaign id. Pass this or ad_group_id.
        ad_group_id: Numeric ad group id. Pass this or campaign_id.
        user_list_ids: Remarketing or customer lists (user_list_id from
            get_audience_lists).
        segment_ids: In-market or affinity segments (segment_id from
            search_audience_segments).
        custom_audience_ids: Custom segments (custom_audience_id from
            get_audience_lists); Display and Video only.
        combined_audience_ids: Combined segments (combined_audience_id from
            get_audience_lists); Search only.
        mode: "observation" (default) or "targeting". Ignored for exclusions.
        exclude: True to exclude the audiences instead of adding them.
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_business_name_assettool Draft a business name asset for a campaign or the account — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a business name asset for a campaign or the account — returns a PREVIEW.

    Creates a text asset and links it as the business name shown with the
    ads. Google links business names at campaign or account level only.
    Account-wide needs scope="account" and no campaign_id. Returns a preview
    with a plan_id.

    Args:
        business_name: The name, at most 25 characters.
        campaign_id: Numeric ID of the campaign to link it to.
        scope: Empty (campaign, from campaign_id), "campaign" or "account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_call_assettool Draft a call asset (a phone number shown with the ads) — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a call asset (a phone number shown with the ads) — returns a PREVIEW.

    Creates the call asset and links it where the id points: ad_group_id
    links to that ad group, campaign_id to that campaign. Account-wide
    linking needs scope="account" and no id. Google reviews the number
    before it serves. Returns a preview with a plan_id.

    Args:
        phone_number: The number, national ("030 1234567", "(916) 555-0142")
            or international ("+49 30 1234567"). Normalised to E.164.
        country_code: ISO 3166-1 alpha-2 country of the number ("DE", "US").
            Required; it decides how a national number is read and must
            match the country code of an international one.
        campaign_id: Numeric ID of the campaign to link the number to.
        ad_group_id: Numeric ID of the ad group to link it to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        call_conversion_action_id: Numeric ID of the conversion action that
            counts calls from this number. Empty keeps the account's call
            conversion setting.
        ad_schedule: Optional windows when the number shows, each
            {day_of_week: MONDAY..SUNDAY, start_hour: 0-23, end_hour: 0-24,
            start_minute/end_minute: 0, 15, 30 or 45}. Hours are in the
            account time zone.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_calloutstool Draft callout assets for an ad group, a campaign or the account — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft callout assets for an ad group, a campaign or the account — returns a PREVIEW.

    Creates callout assets and links them where the id points: ad_group_id
    links to that ad group, campaign_id to that campaign. Account-wide
    linking (every campaign without callouts of its own) needs
    scope="account" and no id. Returns a preview with a plan_id; nothing
    changes until confirm_and_apply applies it.

    Args:
        callouts: Callout texts (at least one), each non-empty and at most 25
            characters after trimming.
        campaign_id: Numeric ID of the campaign to link the callouts to.
        ad_group_id: Numeric ID of the ad group to link them to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        start_date: First day the callouts show, YYYY-MM-DD. Empty: from now.
        end_date: Last day the callouts show, YYYY-MM-DD, so seasonal callouts
            switch off by themselves. Empty: no end.
draft_campaigntool Draft a full campaign structure — returns a PREVIEW, does NOT create anything.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a full campaign structure — returns a PREVIEW, does NOT create anything.

    Creates: CampaignBudget + Campaign (PAUSED) + AdGroup + optional Keywords
    + geo targeting + language targeting + optional geo exclusions and ad
    schedule, all in one atomic request.
    Ads are NOT included — draft_responsive_search_ad adds them once the
    campaign exists. Only SEARCH campaigns can be created: Performance Max
    needs an asset group with all its assets in one request, and DISPLAY,
    SHOPPING and VIDEO need channel-specific settings and ad group types, so
    the draft refuses them.

    Returns a preview with a plan_id plus any warnings (e.g. a daily budget
    below 5x target CPA, MANUAL_CPC); nothing changes until confirm_and_apply
    applies the returned plan_id.

    Args:
        campaign_name: Name of the new campaign.
        daily_budget: Daily budget in the account's currency (not micros);
            must be greater than 0 and at most the config's max_daily_budget.
        bidding_strategy: MAXIMIZE_CONVERSIONS | TARGET_CPA | TARGET_ROAS |
            MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | MANUAL_CPC. BROAD
            keywords require a Smart Bidding strategy (MAXIMIZE_CONVERSIONS,
            MAXIMIZE_CONVERSION_VALUE, TARGET_CPA, TARGET_ROAS).
        geo_target_ids: REQUIRED list of geo target constant IDs.
            Common: "2276" Germany, "2040" Austria, "2756" Switzerland, "2840" USA,
            "2826" UK, "2250" France. Full list: Google Ads API geo target constants.
        language_ids: REQUIRED list of language constant IDs.
            Common: "1001" German, "1000" English, "1002" French, "1003" Spanish,
            "1004" Italian, "1014" Portuguese. Full list: Google Ads API
            language constants.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        target_cpa: Target cost per acquisition in the account's currency;
            required if bidding_strategy is TARGET_CPA, optional target for
            MAXIMIZE_CONVERSIONS. 0 means none.
        target_roas: Target return on ad spend as a ratio (e.g. 4.0 = 400%);
            required if bidding_strategy is TARGET_ROAS, optional target for
            MAXIMIZE_CONVERSION_VALUE. 0 means none.
        channel_type: SEARCH (default). DISPLAY, SHOPPING, VIDEO and
            PERFORMANCE_MAX are refused with the reason (see above).
        ad_group_name: Name of the initial ad group. Empty uses campaign_name.
        keywords: Optional list of {"text": "keyword", "match_type":
            "EXACT|PHRASE|BROAD"} added to the initial ad group.
        search_partners_enabled: Include ads on Search partners (SEARCH
            campaigns only).
        display_network_enabled: Enable Search campaign display expansion
            (SEARCH campaigns only). Defaults to off.
        display_expansion_enabled: Alias for display_network_enabled; both must
            match when both are given.
        max_cpc: In the account's currency: the manual CPC bid for the initial
            ad group when bidding_strategy is MANUAL_CPC, or the Maximize Clicks
            CPC cap when bidding_strategy is TARGET_SPEND. Not allowed with
            other strategies; 0 means none.
        location_option: Who the geo targets reach. PRESENCE (people in or
            regularly in the locations), PRESENCE_OR_INTEREST (also people
            elsewhere who show interest in them) or SEARCH_INTEREST (people
            searching for them). Empty leaves Google's default,
            PRESENCE_OR_INTEREST. Anything but PRESENCE adds a warning.
        negative_location_option: Who the location exclusions exclude.
            PRESENCE or PRESENCE_OR_INTEREST; empty leaves Google's default,
            PRESENCE_OR_INTEREST. PRESENCE excludes fewer people (only those
            physically there), so it widens reach and the preview warns.
        tracking_url_template: Campaign tracking template, e.g.
            "{lpurl}?utm_source=google&utm_campaign={campaignid}". Must contain
            {lpurl} or a variant ({lpurl+2}, {unescapedlpurl},
            {escapedlpurl+3}, ...). Omitted leaves it unset.
        final_url_suffix: Parameters appended to the landing page URL, e.g.
            "utm_medium=cpc". Omitted leaves it unset.
        url_custom_parameters: List of {"key": "grp", "value": "b2c"}, used as
            {_grp} in the template. Keys alphanumeric, max 8 characters; values
            up to 250.
        geo_exclude_ids: Geo target constant IDs to exclude (negative location
            criteria), e.g. a city inside a targeted state. May not overlap
            geo_target_ids.
        ad_schedule: Windows the campaign serves in: list of {day_of_week
            (MONDAY..SUNDAY), start_hour 0-23, end_hour 0-24, start_minute,
            end_minute (0, 15, 30 or 45)}, whole numbers, in the account time
            zone. No overlaps, at most six a day. Once the campaign is enabled it
            serves only inside them; the preview warns about that. No double
            confirmation, since the campaign is created PAUSED.
draft_clear_custom_conversion_goaltool Put a campaign back on the account-level goals — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Put a campaign back on the account-level goals — returns a PREVIEW.

    Sets goal_config_level=CUSTOMER and clears the custom goal: the rollback for
    draft_assign_custom_conversion_goal. The account-level goals themselves are
    not touched.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        campaign_id: Numeric campaign ID to reset.
        customer_id: Ads account ID. Defaults to the configured account.
draft_conversion_tracking_setuptool Set up conversion tracking from GA4 into Google Ads in one approved plan, returning a PREVIEW of only the missing steps.FilesCredentialsEnv varsSensitive pathsoutside text
Set up conversion tracking from GA4 into Google Ads in one approved plan, returning a PREVIEW of only the missing steps.

    Use it when the user wants their conversions (sign-ups, purchases,
    leads) tracked and used for bidding, or after audit_ga4_property or
    check_key_event_imports found a gap. It reads both products and plans
    what is missing, in order: link the GA4 property to the Google Ads
    account, mark the events as GA4 key events, turn on auto-tagging, import
    the conversion actions Google Ads created for the key events (they start
    hidden and record nothing), make them primary, and use their goal for
    bidding. Steps already in place are listed under already_done. Google
    Ads creates the conversion action for a newly linked property or new key
    event by itself, not instantly: such events come back as "After this"
    warnings, and running the tool again later imports them. NO_CHANGE when
    everything is set up. The website must send the events; this tool
    cannot add tracking code (see generate_tracking_code). Nothing changes
    until confirm_and_apply applies it: the dry run validates the Google Ads
    steps with validate_only and re-reads the GA4 ones, and every step skips
    itself if already done, so confirming again after a failed step
    continues where it stopped.

    Args:
        events: GA4 event names to track as conversions, e.g. ["sign_up"],
            or objects {"event": "generate_lead", "counting_method":
            "ONCE_PER_SESSION"} (counting applies when the event is not a
            key event yet; default ONCE_PER_EVENT). Empty uses the
            property's key events that fired in the last 28 days.
        primary: True (default) makes the imports primary conversions that
            Smart Bidding optimizes toward; False imports them as secondary
            (reported only).
        data_retention: Optional, e.g. 14: also lengthen GA4 event data
            retention (months). Only lengthens; empty leaves it.
        ads_personalization: Only for a new link. False (default) keeps
            personalized advertising off, so GA4 shares no audiences or
            remarketing data with Google Ads.
        customer_id: Google Ads customer ID, digits with or without dashes.
            Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
draft_create_conversion_actiontool Draft a new Google Ads ConversionAction — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new Google Ads ConversionAction — returns a PREVIEW.

    Returns a preview with a plan_id (plus warnings where relevant); nothing
    changes until confirm_and_apply applies it. SMART_CAMPAIGN_* and
    GOOGLE_HOSTED types are auto-managed by Google and rejected with
    MUTATE_NOT_ALLOWED.

    Args:
        name: Conversion action name as it appears in Google Ads. Required.
        type_: ConversionActionType enum value, e.g. AD_CALL, WEBSITE_CALL,
            WEBPAGE, WEBPAGE_CODELESS, GOOGLE_ANALYTICS_4_CUSTOM,
            GOOGLE_ANALYTICS_4_PURCHASE, UPLOAD_CALLS, UPLOAD_CLICKS.
        category: ConversionActionCategory enum value, e.g. PHONE_CALL_LEAD,
            SUBMIT_LEAD_FORM, PURCHASE, ... (default DEFAULT).
        default_value: Value attributed to each conversion, in currency_code
            units (not micros). Must be >= 0. A positive default_value with
            always_use_default_value=False is a legal "fallback" config: the
            preview warns but does NOT flip the flag.
        currency_code: 3-letter ISO 4217 currency code for default_value
            (default USD).
        always_use_default_value: True ignores transaction values from the
            tag/import and always uses default_value; False uses default_value
            only as a fallback when no value is supplied.
        counting_type: ONE_PER_CLICK (default; one conversion per click, typical
            for lead gen) or MANY_PER_CLICK (every conversion counts, typical
            for ecommerce).
        phone_call_duration_seconds: Minimum call length in seconds for a call
            to count; only meaningful for call conversions (PHONE_CALL_LEAD
            category). 0 leaves Google's default.
        primary_for_goal: True (default) makes it a Primary action that Smart
            Bidding optimizes toward; False makes it Secondary (recorded only).
        include_in_conversions_metric: IMMUTABLE — Google derives it from
            primary_for_goal and the category's goal, so this value is not sent.
        click_through_window_days: Click-through attribution window in days,
            1-90. 0 leaves Google's default.
        view_through_window_days: View-through attribution window in days,
            1-30. 0 leaves Google's default.
        attribution_model: AttributionModel enum value, e.g.
            GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN. Empty leaves Google's default.
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
draft_custom_conversion_goaltool Create a custom conversion goal — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Create a custom conversion goal — returns a PREVIEW.

    The goal bundles conversion actions into a named set that campaigns can
    then be pointed at with draft_assign_custom_conversion_goal. Only the goal
    is created: conversion actions are read for validation and never modified.
    It is always created ENABLED — a goal created as REMOVED would be invisible
    to every other tool, so there is nothing to plan.

    If a goal with the same name and exactly the same conversion actions
    already exists, nothing is planned and the result says `already_exists`
    with that goal's ID (REMOVED goals do not count). A name that exists with
    different actions is changed with draft_update_custom_conversion_goal.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        name: Name for the new goal, e.g. "OHL | Kauf + qualifizierte Anrufe".
        conversion_action_ids: Numeric conversion action IDs. Duplicates are
            collapsed; unknown or REMOVED actions are refused.
        customer_id: Ads account ID. Defaults to the configured account.
draft_delete_gtm_entitytool Draft deleting a Tag Manager tag, trigger or variable — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft deleting a Tag Manager tag, trigger or variable — returns a PREVIEW.

    The entity is removed from a workspace and stays on the site until the
    workspace is published. A trigger that any tag still references, or a
    variable that a tag, trigger or other variable uses as {{name}}, is
    refused up front, with the references named. Refused unless
    gtm.write_enabled is set. Returns the entity that would be deleted, the
    resolved workspace and a plan_id.

    Args:
        entity_type: "tag", "trigger" or "variable".
        entity_id: Numeric ID of the entity (see list_gtm_tags,
            list_gtm_triggers and list_gtm_variables).
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_delete_key_eventtool Draft removing a GA4 key event so the event no longer counts as a conversion, returning a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft removing a GA4 key event so the event no longer counts as a conversion, returning a PREVIEW.

    The event itself keeps firing and stays in event reports; only its
    key-event status goes, for future data (key events already recorded are
    not reclassified). The draft resolves the event name against the
    property's key events (keyEvents.list), so the preview names the exact
    key event, its counting method and create time; an unknown name returns
    the existing key events, and one GA4 marks as not deletable is refused.
    Returns a preview with a plan_id and warnings; nothing changes until
    confirm_and_apply applies it (GA4 Admin API keyEvents.delete).

    Args:
        event_name: Event name of the key event to remove, exactly as listed
            by list_key_events (e.g. "sign_up"). Required.
        property_id: Numeric GA4 property ID, with or without the "properties/"
            prefix. If empty, uses the default from config.
draft_demographic_targetingtool Draft demographic targeting (age/gender/parental status/income) — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft demographic targeting (age/gender/parental status/income) — returns a PREVIEW.

    By default, Google Ads serves to all demographic segments. This tool adds
    criteria that EXCLUDE a segment (negative=True, default) or NARROW
    targeting to it (negative=False — uncommon). Takes exactly one of
    ad_group_id or campaign_id, and at least one of the four demographic lists
    must contain a value.

    Returns a preview with a plan_id, plus warnings when the change narrows
    targeting, excludes 'undetermined' users, or excludes nearly a whole
    dimension; nothing changes until confirm_and_apply applies it.

    Args:
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        ad_group_id: Numeric ad group ID to add the criteria to. Mutually
            exclusive with campaign_id.
        campaign_id: Numeric campaign ID to add the criteria to. Mutually
            exclusive with ad_group_id; campaign-level criteria can only be
            exclusions (negative=True).
        age_ranges: Age buckets '18-24', '25-34', '35-44', '45-54', '55-64',
            '65+', 'undetermined' (or canonical names such as AGE_RANGE_18_24).
            Google's buckets are FIXED — 'Exclude 23-35' has no exact mapping
            and needs a choice of buckets.
        genders: 'female', 'male', 'undetermined'.
        parental_statuses: 'parent', 'not_a_parent', 'undetermined'.
        income_ranges: PERCENTILES (not currency): 'top-10', '11-20', '21-30',
            '31-40', '41-50', 'lower-50', 'undetermined'. Available in select
            countries only (US, AU, JP, etc.).
        negative: True (default) excludes the listed segments; False adds
            positive criteria that narrow an ad group's targeting to them.
draft_dismiss_recommendationstool Dismiss Google Ads recommendations — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Dismiss Google Ads recommendations — returns a PREVIEW.

    Turns down recommendations you will not take (e.g. "add broad match" on a
    deliberately narrow account) so they stop reappearing in
    get_recommendations. Nothing in the account changes, and Google can show a
    dismissed recommendation again later, so a single confirmation is enough.

    Each ID must be an active recommendation: unknown or already dismissed
    IDs are refused by name. The preview lists each one's type, campaign and
    estimated improvement, so the user sees what they are turning down.

    DismissRecommendation has no validate-only mode: the dry run re-reads the
    account and checks every recommendation is still active instead of
    sending the call to Google. The returned plan_id is applied with
    confirm_and_apply.

    Args:
        recommendation_ids: `recommendation.id` values from
            get_recommendations, or full resource names
            (customers/{customer_id}/recommendations/{id}). Duplicates are
            collapsed.
        customer_id: Ads account ID. Defaults to the configured account.
draft_ga4_annotationtool Draft creating, changing or deleting a GA4 annotation (a note on a date or date range in GA4's charts), returning a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft creating, changing or deleting a GA4 annotation (a note on a date or date range in GA4's charts), returning a PREVIEW.

    Use it to mark what explains a change in the data: a site relaunch, a
    price change, a campaign start, a tracking fix. Create needs title and
    date; update and delete need the annotation's ID from
    list_ga4_annotations, and an update changes only the fields passed (the
    preview shows before and after). Annotations Google created itself
    cannot be changed. Nothing changes until confirm_and_apply applies it;
    the dry run re-reads the annotation and refuses if it was changed in
    GA4 after the preview. GA4 Admin API v1alpha (reportingDataAnnotations).

    Args:
        action: "create" (default), "update" or "delete".
        title: Up to 60 characters. Required for create.
        date: The day as YYYY-MM-DD, or the first day of a range together
            with end_date. Required for create.
        end_date: Last day of a range (YYYY-MM-DD); leave empty for one day.
        description: Up to 150 characters. On update, "" clears it.
        color: BLUE (default on create), GREEN, RED, PURPLE, BROWN or CYAN.
        annotation: ID or resource name of the annotation to update or
            delete (list_ga4_annotations).
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_ga4_audiencetool Draft creating, renaming or archiving a GA4 audience — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft creating, renaming or archiving a GA4 audience — returns a PREVIEW.

    An audience is the users who sent certain events, viewed certain
    pages, or did a sequence of both in order. A linked Google Ads
    account receives it as a remarketing list within one to two days, to
    attach to campaigns with draft_audience_attachment: this is how to
    build a list of site visitors, of buyers, of visitors who did not
    buy, or of people who saw the pricing page without signing up. GA4
    fixes the conditions and the membership duration at creation;
    afterwards only the name and description can change, and archiving is
    permanent (it needs a double confirmation). The draft refuses a taken
    name and a full property, and the preview warns when the property's
    audiences would not reach Google Ads (see list_ga4_audiences). Nothing
    changes until confirm_and_apply applies the plan_id.

    Args:
        action: "create" (default), "update" (name and description only) or
            "archive".
        display_name: Name of the audience; required for create, the new
            name for update.
        include_events: Create only. Users who sent ANY of these events
            join, e.g. ["session_start"] for every visitor, ["purchase"]
            for buyers, ["sign_up", "generate_lead"] for leads. Together
            with include_pages it is still "any of".
        exclude_events: Create only. Users who sent any of these are kept
            out, e.g. include ["session_start"] and exclude ["purchase"]
            for visitors who did not buy.
        include_pages: Create only. Users who viewed a page whose full
            URL contains ANY of these texts join, e.g. ["/pricing"]
            (also matches /pricing/enterprise and /en/pricing). Not case
            sensitive.
        exclude_pages: Create only. Users who viewed such a page are kept
            out, e.g. ["/thank-you"].
        sequence: Create only, instead of include_events / include_pages.
            2 to 10 steps the user must do in this order. Each is an event
            name ("begin_checkout") or an object: {"event": "..."} or
            {"page": "/pricing"}, optionally with "directly_followed": true
            (no other event in between) and "within_minutes": 30 (after
            the step before). Exclusions can be added as usual.
        membership_duration_days: Create only. Days a user stays after
            last meeting the conditions, 1 to 540 (default 30).
        exclude_permanently: Create only. True keeps users out for good
            once they sent an excluded event; False (default) only while
            they keep meeting the exclusion within the membership window.
        description: Optional for create (one is written from the events);
            the new description for update.
        audience: For update and archive: the audience's display name or
            resource name from list_ga4_audiences.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
draft_ga4_custom_dimensiontool Draft registering, changing or archiving a GA4 custom dimension, returning a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft registering, changing or archiving a GA4 custom dimension, returning a PREVIEW.

    Registering makes an event parameter (EVENT scope), a user property
    (USER) or an ecommerce item parameter (ITEM) reportable as a dimension.
    Before anything reaches Google the draft refuses a parameter that is
    already registered, a taken display name and a full property (see
    list_ga4_custom_definitions), and the preview warns that GA4 fills the
    dimension only from now on and that parameter_name and scope cannot
    change later. Update changes display_name, description or (USER scope)
    disallow_ads_personalization; archive removes it from reports and frees
    the slot, cannot be undone and needs a double confirmation. Nothing
    changes until confirm_and_apply applies it. GA4 Admin API
    (customDimensions).

    Args:
        action: "create" (default), "update" or "archive".
        parameter_name: The event parameter or user property name exactly as
            sent, e.g. "plan_type". Required for create; identifies the
            dimension for update and archive.
        scope: EVENT (default), USER or ITEM.
        display_name: Name shown in GA4; defaults to parameter_name on create.
        description: Up to 150 characters. On update, "" clears it.
        disallow_ads_personalization: USER scope only: keep this dimension out
            of ads personalization.
        custom_dimension: Resource name, instead of parameter_name, for update
            or archive.
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_ga4_custom_metrictool Draft registering, changing or archiving a GA4 custom metric, returning a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft registering, changing or archiving a GA4 custom metric, returning a PREVIEW.

    Registering makes a numeric event parameter reportable as a metric. The
    draft refuses a parameter that is already registered, a taken display
    name and a full property (see list_ga4_custom_definitions), and the
    preview warns that GA4 fills the metric only from now on. Update changes
    display_name, description, measurement_unit or restricted_metric_type;
    archive removes it from reports, cannot be undone and needs a double
    confirmation. Nothing changes until confirm_and_apply applies it. GA4
    Admin API (customMetrics).

    Args:
        action: "create" (default), "update" or "archive".
        parameter_name: The numeric event parameter exactly as sent, e.g.
            "discount_amount". Required for create; identifies the metric for
            update and archive.
        display_name: Name shown in GA4; defaults to parameter_name on create.
        description: Up to 150 characters. On update, "" clears it.
        measurement_unit: STANDARD (default on create), CURRENCY, FEET,
            METERS, KILOMETERS, MILES, MILLISECONDS, SECONDS, MINUTES or HOURS.
        restricted_metric_type: For CURRENCY metrics, required: ["COST_DATA"]
            or ["REVENUE_DATA"] (or both).
        custom_metric: Resource name, instead of parameter_name, for update or
            archive.
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_ga4_data_retentiontool Draft a change to how long GA4 keeps event- and user-level data, returning a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a change to how long GA4 keeps event- and user-level data, returning a PREVIEW.

    GA4 defaults to 2 months, which cuts explorations, funnels and other
    user-level reports short; standard properties allow 14 months, GA4 360
    up to 50. Standard reports are aggregated and not affected. Lengthening
    applies from now on (data already deleted does not come back);
    shortening deletes older data for good and needs a double confirmation.
    The preview shows before and after and reminds the user that a privacy
    policy naming a retention period must match. NO_CHANGE when the settings
    already match. Nothing changes until confirm_and_apply applies it; the
    dry run re-reads the settings and refuses if they changed in GA4 after
    the preview.

    Args:
        event_data_retention: Months to keep event-level data: 2, 14, 26, 38
            or 50 (or TWO_MONTHS, FOURTEEN_MONTHS, ...). Empty leaves it.
        user_data_retention: Months to keep user-level data, same values.
            Empty leaves it.
        reset_user_data_on_new_activity: True restarts a user's retention
            period with each new event from that user. Empty leaves it.
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_gtm_tagtool Draft creating or updating a Tag Manager tag — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft creating or updating a Tag Manager tag — returns a PREVIEW.

    Without tag_id this creates a tag in a workspace; with tag_id it updates
    the existing tag. The edit lands in the workspace and changes nothing on
    the site until the workspace is published. Refused unless
    gtm.write_enabled is set, and Custom HTML (html) is refused as well
    unless gtm.allow_custom_html is set. Returns the resolved workspace, the
    tag type, the fields that would change and a plan_id.

    Args:
        name: Tag name, 1-200 characters. Required when creating a tag.
        tag_type: Tag type, required when creating a tag because GTM cannot
            change a tag's type later: googtag, gaawe (GA4 event), awct (Ads
            conversion), awcc, awud, sp (Ads remarketing), gclidw, flc, fls,
            img, html (Custom HTML) or cvt_<id> for a Community Gallery
            template.
        parameters: GTM parameter dicts with at least "type" and "key", for
            example gaawe [{"type": "TEMPLATE", "key": "eventName", "value":
            "form_submit"}] or awct [{"type": "TEMPLATE", "key":
            "conversionId", "value": "123456789"}, {"type": "TEMPLATE",
            "key": "conversionLabel", "value": "AbC-dEf"}]. On update they
            merge by key: passed keys replace, other keys stay.
        firing_trigger_ids: Trigger IDs that fire the tag (see
            list_gtm_triggers). The built-in All Pages trigger is
            "2147479553".
        blocking_trigger_ids: Trigger IDs that must not fire the tag.
        paused: True stores the tag paused instead of deleting it. None keeps
            the current state.
        notes: Free-form note stored on the tag. None keeps the current note.
        tag_id: Existing tag ID to update (see list_gtm_tags). Empty creates
            a new tag.
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_gtm_triggertool Draft creating or updating a Tag Manager trigger — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft creating or updating a Tag Manager trigger — returns a PREVIEW.

    Without trigger_id this creates a trigger in a workspace; with trigger_id
    it updates the existing one. The edit lands in the workspace and changes
    nothing on the site until the workspace is published. Refused unless
    gtm.write_enabled is set. Returns the resolved workspace, the trigger
    fields that would change and a plan_id.

    Args:
        name: Trigger name, 1-200 characters. Required when creating a
            trigger.
        trigger_type: Trigger type, required when creating a trigger and
            rejected on an existing one, because GTM cannot change it later:
            pageview, domReady, windowLoaded, click, linkClick,
            formSubmission, customEvent, elementVisibility, scrollDepth,
            youTubeVideo, historyChange, timer, jsError or triggerGroup.
        custom_event_name: The dataLayer event name. Required for trigger type
            customEvent, rejected for every other type, and rejected on an
            existing trigger, where the event name sits in its custom event
            filter.
        filters: GTM conditions, each a dict with "type" (EQUALS, CONTAINS,
            MATCH_REGEX, ...) and "parameter" (arg0 = variable, arg1 =
            value), for example clicks on tel: links [{"type": "CONTAINS",
            "parameter": [{"type": "TEMPLATE", "key": "arg0", "value":
            "{{Click URL}}"}, {"type": "TEMPLATE", "key": "arg1", "value":
            "tel:"}]}]. On update the list replaces the existing one.
        custom_event_filters: Conditions on custom event parameters, same
            shape as filters. On update the list replaces the existing one.
        auto_event_filters: Conditions on automatic event parameters, same
            shape as filters. On update the list replaces the existing one.
        parameters: GTM parameter dicts with at least "type" and "key". On
            update they merge by key: passed keys replace, other keys stay.
        notes: Free-form note stored on the trigger. None keeps the current
            note.
        trigger_id: Existing trigger ID to update (see list_gtm_triggers).
            Empty creates a new trigger.
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_gtm_variabletool Draft creating or updating a Tag Manager variable: returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft creating or updating a Tag Manager variable: returns a PREVIEW.

    Without variable_id this creates a variable in a workspace; with
    variable_id it updates the existing one. Data Layer Variables, the usual
    source for GA4 ecommerce values, take data_layer_key (e.g.
    "ecommerce.value") instead of raw parameters. Tags and triggers use a
    variable as {{name}}; renaming one they reference is refused, because
    the references would break (the GTM UI renames safely). Custom
    JavaScript variables run code on the site and are refused unless
    gtm.allow_custom_html is set. The edit lands in the workspace and
    changes nothing on the site until the workspace is published. Refused
    unless gtm.write_enabled is set.

    Args:
        name: Variable name, 1-200 characters without curly braces.
            Required when creating a variable.
        variable_type: Required when creating, fixed afterwards: v (Data
            Layer Variable), c (Constant), u (URL), k (1st-party cookie), j
            (JavaScript Variable, reads a global), aev (Auto-Event
            Variable), d (DOM element), f (HTTP referrer), e (Custom event),
            smm (Lookup table), remm (RegEx table), jsm (Custom JavaScript,
            gated) or cvt_<id> for a custom template.
        data_layer_key: For Data Layer Variables: the dataLayer key to read,
            dot notation for nested values, e.g. "ecommerce.transaction_id".
        default_value: For Data Layer Variables: the value when the key is
            missing. None sets no default.
        parameters: GTM parameter dicts with at least "type" and "key" for
            the other types, e.g. a Constant's [{"type": "TEMPLATE", "key":
            "value", "value": "G-ABC123"}]. On update they merge by key.
        notes: Free-form note stored on the variable. None keeps the current
            note.
        variable_id: Existing variable ID to update (see list_gtm_variables).
            Empty creates a new variable.
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_image_assetstool Draft image assets from local files, public image URLs or uploads — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft image assets from local files, public image URLs or uploads — returns a PREVIEW.

    At least one image in total is required across image_paths, image_urls
    and upload_ids.
    Images must be PNG, JPEG or GIF and at most 5120 KB (Google's limit).
    URL images are downloaded now and checked; applying re-downloads them
    and refuses if the image changed since the preview. Returns a preview with
    a plan_id and a per-image summary; nothing changes until confirm_and_apply
    applies it.

    Args:
        campaign_id: Numeric ID of the campaign to attach the images to. Leave
            empty with scope="account".
        image_paths: Local PNG/JPEG/GIF file paths on the machine running
            AdLoop. Not available on a hosted server, where image_urls
            applies instead.
        image_urls: Public http(s) URLs of PNG/JPEG/GIF images. Links to
            private, local or internal addresses are refused.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        upload_ids: Ids of images the user uploaded (up_..., from
            upload_images or list_uploads). The way to use an image that has
            no public URL.
        scope: Empty follows campaign_id. "account" links the images
            account-wide, which Google allows for BUSINESS_LOGO only and which
            is never inferred from an empty campaign_id. An account takes one
            business logo: while one is linked, the draft is refused and
            names the link to remove first.
        field_types: One per image, in the order upload_ids, image_paths,
            image_urls: AD_IMAGE (campaign links; the default) or BUSINESS_LOGO
            (campaign or account links). Required with scope="account".
draft_key_eventtool Draft marking a GA4 event as a key event (conversion), or changing an existing one — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft marking a GA4 event as a key event (conversion), or changing an existing one — returns a PREVIEW.

    The fix for "the event fires but isn't tracked as a conversion":
    attribution_check / validate_tracking diagnose it, this closes the loop.
    When the event already is a key event, the plan changes its counting
    method or default value instead and the preview shows before and after;
    nothing to change returns NO_CHANGE. Applies to future data only.
    Returns a preview with a plan_id and warnings; nothing changes until
    confirm_and_apply applies it.

    Args:
        event_name: Name of the GA4 event to mark as a key event, exactly as it
            fires (e.g. "sign_up", "purchase"). Required.
        counting_method: ONCE_PER_EVENT (counts every occurrence, e.g.
            purchases) or ONCE_PER_SESSION (counts once per session, e.g.
            sign-ups). Defaults to ONCE_PER_EVENT.
        property_id: Numeric GA4 property ID, with or without the "properties/"
            prefix. If empty, uses the default from config.
        default_value: Value GA4 gives each key event when the event sends
            no value parameter, e.g. 20 for a lead. Needs currency_code.
        currency_code: Three-letter currency of default_value, e.g. "EUR".
draft_keywordstool Draft keyword additions — returns a PREVIEW, does NOT add keywords.FilesCredentialsEnv varsSensitive pathsoutside text
Draft keyword additions — returns a PREVIEW, does NOT add keywords.

    Returns a preview with a plan_id, plus a warning when BROAD keywords go into
    a campaign without Smart Bidding; nothing changes until confirm_and_apply
    applies the returned plan_id.

    Args:
        ad_group_id: Numeric ID of the ad group that gets the keywords.
        keywords: List of {"text": "keyword phrase", "match_type":
            "EXACT|PHRASE|BROAD"}; at least one is required.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
draft_microsoft_ad_grouptool Draft a new Microsoft Advertising ad group, optionally with keywords (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new Microsoft Advertising ad group, optionally with keywords (preview only).

    The ad group is created active but serves only once one of its ads (new
    ads are paused) is enabled. Manual-bid campaigns need cpc_bid; broad
    match is refused unless the campaign uses conversion-based bidding
    (MaxConversions, MaxConversionValue or a target CPA/ROAS). network
    OwnedAndOperatedOnly (default) keeps ads off syndicated partner sites.
    The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Parent campaign id.
        name: Ad group name (unique in the campaign).
        cpc_bid: Default max CPC in the account currency.
        network: OwnedAndOperatedOnly or OwnedAndOperatedAndSyndicatedSearch.
        keywords: Keywords as text or {"text", "match_type": Exact|Phrase|Broad, "bid"}; text defaults to Phrase.
draft_microsoft_call_extensiontool Draft a call extension (phone number shown with the ads) for one Microsoft Advertising campaign (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft a call extension (phone number shown with the ads) for one Microsoft Advertising campaign (preview only).

    Microsoft allows one per campaign; a campaign that already has one is
    refused. The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id.
        phone_number: The number to show (usually a call-tracking number).
        country_code: Two-letter country of the number, e.g. US.
draft_microsoft_calloutstool Draft callouts (at most 25 characters each) for a Microsoft Advertising campaign or the account (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft callouts (at most 25 characters each) for a Microsoft Advertising campaign or the account (preview only).

    Callouts already linked are skipped. The returned plan_id is applied
    with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or scope="account").
        scope: "account" links them account-wide.
        callouts: Callout texts.
draft_microsoft_campaigntool Draft a new Microsoft Advertising Search campaign, created PAUSED with its locations (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new Microsoft Advertising Search campaign, created PAUSED with its locations (preview only).

    Requires a daily budget (capped by max_daily_budget), languages and
    included locations (languages=["All"] is refused). Defaults to
    MaxConversions and PeopleIn; MaxConversions is refused while no active
    conversion goal counts toward Conversions, because Microsoft refuses the
    campaign then (pass MaxClicks or EnhancedCpc; Microsoft stores manual CPC as
    EnhancedCpc, so ManualCpc is drafted as EnhancedCpc). The apply creates the
    campaign, then its location criteria, and names what was created if the
    second step fails. The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        name: Campaign name (unique, at most 128 characters).
        daily_budget: Daily budget in the account currency.
        bidding_strategy: MaxConversions (default), MaxClicks or EnhancedCpc (ManualCpc becomes EnhancedCpc).
        target_cpa: Optional target cost per conversion.
        languages: Ad languages, e.g. ["English"].
        location_ids: Included location ids (search_microsoft_locations).
        excluded_location_ids: Excluded location ids.
        location_intent: PeopleIn (default) or PeopleInOrSearchingForOrViewingPages.
        tracking_url_template: Optional tracking template.
        final_url_suffix: Optional final URL suffix (e.g. utm parameters).
draft_microsoft_image_extensiontool Draft image extensions (photos shown with Microsoft search ads) for a campaign, an ad group or the account (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft image extensions (photos shown with Microsoft search ads) for a campaign, an ad group or the account (preview only).

    One image extension per image, up to 10 images. Each image is checked
    now against Microsoft's requirements: JPEG, PNG or non-animated GIF, at
    most 5 MB, a 1.91:1 aspect ratio (e.g. 1200x628), at least 703x368 and
    at most 2592 wide and 2048 high; a bad image is refused with the reason.
    Applying uploads the images to the account's media library, creates the
    extensions and links them; the dry run reads every image again and
    refuses one that changed. Image extensions can also take the ads into
    native placements on the Microsoft Audience Network. The returned
    plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or ad_group_id, or scope="account").
        ad_group_id: Ad group id (from get_microsoft_ad_groups).
        scope: "account" links them to the whole account.
        image_paths: Local image files on the machine running AdLoop (not on
            a hosted server).
        image_urls: Public http(s) image URLs; private or internal addresses
            are refused.
        upload_ids: Ids of uploaded images (up_..., from upload_images or
            list_uploads), for images without a public URL.
        alt_text: Required, at most 35 characters: describes the image for
            screen readers and shows on hover. Used for every image.
        display_text: Optional caption (at most 35 characters) shown under each
            image in the multi-image layout; passing it makes the extensions
            eligible for that layout too.
        final_url: Optional landing page for clicks on the image (checked);
            empty uses the ad's own final URL.
draft_microsoft_keywordstool Draft adding keywords to a Microsoft Advertising ad group (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft adding keywords to a Microsoft Advertising ad group (preview only).

    Keywords already in the ad group are skipped; broad match is refused
    unless the campaign uses conversion-based bidding (MaxConversions,
    MaxConversionValue or a target CPA/ROAS). The returned plan_id is
    applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        keywords: Text or {"text", "match_type": Exact|Phrase|Broad, "bid"}; text defaults to Phrase.
draft_microsoft_responsive_search_adtool Draft a Microsoft Advertising responsive search ad, created PAUSED (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft a Microsoft Advertising responsive search ad, created PAUSED (preview only).

    Checks 3–15 headlines of at most 30 characters, 2–4 descriptions of at
    most 90, display paths of at most 15, pin slots that stay fillable and a
    reachable landing page. The returned plan_id is applied with
    confirm_and_apply; the dry run refuses an identical ad already in the
    ad group.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        headlines: Text or {"text", "pinned_field": HEADLINE_1|HEADLINE_2|HEADLINE_3}.
        descriptions: Text or {"text", "pinned_field": DESCRIPTION_1|DESCRIPTION_2}.
        final_url: Landing page.
        path1: First display path.
        path2: Second display path (needs path1).
draft_microsoft_sitelinkstool Draft sitelinks for a Microsoft Advertising campaign or the account (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft sitelinks for a Microsoft Advertising campaign or the account (preview only).

    Link text is at most 25 characters with descriptions (35 without);
    descriptions come in pairs of at most 35; every URL is checked.
    Sitelinks already linked are skipped. The returned plan_id is applied
    with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or scope="account").
        scope: "account" links them to every campaign without its own.
        sitelinks: [{"link_text", "final_url", "description1", "description2"}].
draft_microsoft_structured_snippettool Draft a structured snippet (a header and 3–10 values) for a Microsoft Advertising campaign or the account (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft a structured snippet (a header and 3–10 values) for a Microsoft Advertising campaign or the account (preview only).

    The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or scope="account").
        scope: "account" links it account-wide.
        header: Microsoft header such as Services, Brands, Types.
        values: 3–10 values of at most 25 characters.
draft_pmax_product_exclusionstool Draft which products a retail Performance Max asset group excludes — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft which products a retail Performance Max asset group excludes — returns a PREVIEW.

    Sets the full list of excluded values on one product dimension (item id,
    brand or a custom label); everything else stays included. Pass the
    complete list each time: values left out are included again, and an
    empty list includes all products. Works on asset groups that advertise
    all products or are already split on that one dimension; more complex
    product filters are refused and stay a job for Google Ads. The filter is
    rebuilt in one atomic request. Nothing changes until confirm_and_apply
    applies the plan_id; a dry run has Google validate it.

    Args:
        asset_group_id: Numeric asset group id of a Performance Max campaign
            with a Merchant Center feed (from get_pmax_performance).
        exclude_values: Every value to exclude, e.g. item ids from the feed,
            brand names or custom label values. [] removes all exclusions.
        dimension: "item_id" (default), "brand", or "custom_label_0" to
            "custom_label_4".
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_prepare_brand_exclusionstool Draft the safe standard state for brand exclusions — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft the safe standard state for brand exclusions — returns a PREVIEW.

    Exactly one combination, nothing else: enable_ai_max = true,
    disable_search_term_matching = true (all non-removed ad groups),
    TEXT_ASSET_AUTOMATION = OPTED_OUT and
    FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION = OPTED_OUT.

    No bidding, keyword, match type, ad, URL or budget change, and no brand list
    is attached — attaching stays a separate step with propose_brand_list /
    attach_brand_list_to_campaigns once this state is verified in the account.

    Returns a preview with a plan_id (purpose brand_exclusions); nothing changes
    until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the Search campaign to prepare.
        include_paused_ad_groups: Default true — paused ad groups are set too,
            so re-enabling one later cannot silently restore search term
            matching.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_price_assettool Draft a price asset (the row of prices under an ad) — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a price asset (the row of prices under an ad) — returns a PREVIEW.

    Creates a price asset with 3-8 offerings and links it where the id
    points: ad_group_id links to that ad group, campaign_id to that
    campaign. Account-wide linking needs scope="account" and no id. Every
    offering URL is checked for reachability. Google disapproves prices that
    differ from the landing page. Returns a preview with a plan_id.

    Args:
        offerings: 3-8 dicts, each with header and description (at most 25
            characters each, headers unique), price (greater than 0),
            final_url, and optional final_mobile_url and unit (PER_HOUR,
            PER_DAY, PER_WEEK, PER_MONTH, PER_YEAR, PER_NIGHT).
        price_type: SERVICES, BRANDS, EVENTS, LOCATIONS, NEIGHBORHOODS,
            PRODUCT_CATEGORIES, PRODUCT_TIERS, SERVICE_CATEGORIES or
            SERVICE_TIERS.
        language_code: Language of the offerings' text ("de", "en").
            Required.
        campaign_id: Numeric ID of the campaign to link the prices to.
        ad_group_id: Numeric ID of the ad group to link them to, instead of
            a campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        price_qualifier: FROM ("From 49 EUR"), UP_TO or AVERAGE; empty for
            none.
        currency_code: ISO 4217 code of the prices. Empty uses the account
            currency (shown in the preview).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_promotiontool Draft a promotion asset ("20% off winter tyres") — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a promotion asset ("20% off winter tyres") — returns a PREVIEW.

    Creates the promotion and links it where the id points: ad_group_id
    links to that ad group, campaign_id to that campaign. Account-wide
    linking needs scope="account" and no id. The final_url is checked for
    reachability. Returns a preview with a plan_id.

    Args:
        promotion_target: What the promotion is for, shown in the ad (at
            most 20 characters).
        final_url: Landing page of the promotion.
        language_code: Language of the promotion's text ("de", "en").
            Required: Google shows the promotion in that language.
        money_off: Fixed discount, in the account currency unless
            currency_code says otherwise. Pass this or percent_off.
        percent_off: Percentage discount, greater than 0 and at most 100
            (15.5 for 15.5%). Pass this or money_off.
        campaign_id: Numeric ID of the campaign to link the promotion to.
        ad_group_id: Numeric ID of the ad group to link it to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        currency_code: ISO 4217 code for money_off and orders_over_amount.
            Empty uses the account currency (shown in the preview).
        promotion_code: Optional coupon code (at most 15 characters). Pass
            this or orders_over_amount, not both.
        orders_over_amount: Optional minimum order value that unlocks the
            promotion.
        occasion: Optional occasion such as BLACK_FRIDAY, CHRISTMAS or
            SUMMER_SALE.
        discount_modifier: "UP_TO" shows "Up to 20% off"; empty for none.
        start_date: First day the promotion shows, YYYY-MM-DD.
        end_date: Last day the promotion shows, YYYY-MM-DD.
        redemption_start_date: First day the offer can be redeemed, YYYY-MM-DD.
        redemption_end_date: Last day the offer can be redeemed, YYYY-MM-DD.
        ad_schedule: Optional windows when the promotion shows, each
            {day_of_week: MONDAY..SUNDAY, start_hour: 0-23, end_hour: 0-24,
            start_minute/end_minute: 0, 15, 30 or 45}. Hours are in the
            account time zone.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_publish_gtm_workspacetool Draft publishing a Tag Manager workspace LIVE — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft publishing a Tag Manager workspace LIVE — returns a PREVIEW.

    Every pending change in the workspace goes live, including changes other
    people made in the GTM UI; the preview lists them all. Apply refuses when
    the workspace changed after the preview, has merge conflicts, or reports
    compiler errors in a quick preview, and it refuses a Custom HTML tag
    being added or changed while gtm.allow_custom_html is off. Refused unless
    gtm.write_enabled is set. Returns the pending changes, the version that
    is live now (for a one-step rollback), the version name that would be
    created and a plan_id. That gate matches the tag type html; a Custom
    JavaScript variable or a custom template tag (cvt_…), which can inject a
    script, is not covered and needs review in the GTM UI.

    Args:
        version_name: Name of the container version created by the publish.
            Empty uses "AdLoop publish <UTC timestamp>".
        version_notes: Notes stored on the created version. Empty leaves them
            out.
        workspace_id: Workspace to publish (see list_gtm_workspaces). Empty
            uses the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_recommendation_subscriptionstool Pause auto-apply for recommendation types — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Pause auto-apply for recommendation types — returns a PREVIEW.

    Pausing is the only change this tool can make: it sets each type's
    subscription to PAUSED, so Google stops applying those recommendations on
    its own. Their recommendations still appear in get_recommendations.
    Re-enabling auto-apply is deliberately not supported; it lets Google change
    the account without a preview, so it stays a decision for the Google Ads
    UI. Pausing reduces automation, so a single confirmation is enough.

    Each type must have an ENABLED subscription (see
    get_recommendation_subscriptions); a type with none, or one already
    paused, is refused by name. The dry run sends the request to Google with
    validate_only. The returned plan_id is applied with confirm_and_apply.

    Args:
        recommendation_types: RecommendationType names with an ENABLED
            subscription, e.g. ["KEYWORD", "USE_BROAD_MATCH_KEYWORD"].
            Duplicates are collapsed.
        customer_id: Ads account ID. Defaults to the configured account.
draft_reddit_adtool Draft a Reddit ad: creates a post on the profile, then the ad (PAUSED) — PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a Reddit ad: creates a post on the profile, then the ad (PAUSED) — PREVIEW.

    click_url and the media URLs are checked before drafting, so ads do not
    point at unverified pages and Reddit gets real image and video files. Comments are public on Reddit
    ads. With post_id an EXISTING post is promoted instead, keeping its
    upvotes and comments: no post is created and the copy arguments are
    ignored. Returns a preview with a plan_id; nothing changes until
    confirm_and_apply applies it. Once enabled, the ad goes through Reddit
    policy review (PENDING_APPROVAL).

    Args:
        ad_group_id: Reddit ad group id (from get_reddit_ad_groups).
        profile_id: Reddit profile that authors the post, from
            list_reddit_funding_instruments (profiles). Required for a new
            post; with post_id it defaults to the post's.
        headline: Post headline, required for a new post, at most 300
            characters.
        click_url: Landing page (http:// or https://). Required for a new
            post. TEXT posts open themselves, so the full click_url must also
            appear in body. With post_id, TEXT posts take no click_url and
            media posts default it to the post's destination.
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        ad_name: Ad name; empty uses the headline. Truncated to 200
            characters.
        post_type: TEXT (headline + optional body; default), IMAGE
            (public image_url), VIDEO (public video_url + thumbnail_url) or
            CAROUSEL (2 to 6 carousel_cards).
        body: Post body text, up to 40,000 characters. Optional for media
            posts.
        image_url: Publicly reachable image URL, required for IMAGE posts.
        call_to_action: One of Reddit's fixed labels for media posts: Apply
            Now, Book Now, Buy Tickets, Contact Us, Donate Now, Download, Get
            a Quote, Get Directions, Get Showtimes, Install, Learn More,
            Listen Now, Order Now, Play Now, Pre-order Now, Read More, Remind
            Me, See Menu, Shop Now, Sign Up, Subscribe, View More, Visit
            Store, Watch Now. On a carousel it is the default for every card.
        display_url: Optional display URL shown with media posts; must be on
            the click_url's domain.
        allow_comments: Whether Redditors can comment publicly on the ad
            (default true); false disables them.
        post_id: Existing post to promote (t3_...); headline, body, the
            media arguments, call_to_action and display_url are then ignored.
            Empty creates a new post.
        video_url: Direct link to the video file (MP4 or MOV, up to 1 GB),
            required for VIDEO posts. Reddit downloads it when the post is
            created; a page that embeds the video does not work.
        thumbnail_url: Publicly reachable image Reddit shows before the video
            plays, required for VIDEO posts.
        carousel_cards: For CAROUSEL posts, 2 to 6 cards, each
            {"image_url": "...", "caption": "...", "click_url": "...",
            "call_to_action": "..."}. Only image_url is required; caption is
            at most 180 characters, click_url and call_to_action default to
            the ad's.
draft_reddit_ad_grouptool Draft a new Reddit ad group (created PAUSED) — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new Reddit ad group (created PAUSED) — returns a PREVIEW.

    Required: campaign_id, ad_group_name, conversion_pixel_id and at least
    one targeting list (geolocations, communities, interests or keywords —
    ids/names from search_reddit_targeting). For non-CBO campaigns also
    daily_budget (or lifetime_budget + end_time), bid_strategy and bid_type.
    Budgets are checked against max_daily_budget; keywords and geolocations
    are pre-validated with Reddit. Returns a preview with a plan_id, the
    payload and warnings; nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: Reddit campaign id (from get_reddit_campaigns).
        ad_group_name: Name of the new ad group.
        conversion_pixel_id: Pixel id (Reddit rule; from get_reddit_pixels).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        daily_budget: Daily budget in account currency (positive). Required
            for non-CBO campaigns unless lifetime_budget is given; not allowed
            in CBO campaigns. Mutually exclusive with lifetime_budget.
        lifetime_budget: Lifetime budget in account currency (positive);
            requires end_time and is compared to max_daily_budget by its
            per-day share.
        bid_strategy: BIDLESS, MANUAL_BIDDING, MAXIMIZE_VOLUME or TARGET_CPX.
            Required for non-CBO campaigns; in CBO campaigns it must match the
            campaign's.
        bid_type: CPC, CPM, CPV, CPV6 or CPV15. Required for non-CBO
            campaigns.
        bid_value: Bid in account currency; MANUAL_BIDDING and TARGET_CPX
            (target cost per result) need it.
        optimization_goal: The pixel event to optimize for (PURCHASE,
            SIGN_UP, LEAD, PAGE_VISIT, ...). Empty in a CBO campaign inherits
            the campaign's.
        geolocations: Geolocation ids to target (e.g. "DE" or "DE:2874225").
        excluded_geolocations: Geolocation ids to exclude.
        communities: Community (subreddit) names to target.
        excluded_communities: Community names to exclude.
        interests: Interest ids to target.
        keywords: Keywords to target; Reddit refuses keywords that are not
            brand-safe.
        excluded_keywords: Keywords to exclude.
        languages: Language codes (ISO 639-1, upper-cased automatically,
            e.g. "DE"). Empty means every language.
        gender: FEMALE or MALE; empty means all genders.
        platforms: ALL, DESKTOP, DESKTOP_LEGACY, MOBILE_NATIVE, MOBILE_WEB,
            MOBILE_WEB_3X or SHREDTOP.
        expand_targeting: Whether Reddit may expand delivery beyond the
            targeting; omitted uses Reddit's default.
        start_time: Start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day. Empty means now.
        end_time: End, same formats as start_time.
        schedule: Weekly delivery windows ("time of day" in Ads Manager), a
            list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. Omitted means delivery at any time. Hours apply in
            each viewer's local time, not the account time zone. Not allowed
            in CBO campaigns, whose schedule overrides every ad group.
        locations: Placements, FEED and/or COMMENTS_PAGE (conversation
            pages); cannot be an empty list.
        excluded_interests: Interest ids to exclude (Reddit marks this field
            deprecated).
        devices: Device targets, objects like {"type": "MOBILE", "os":
            "IOS", "min_version": "16"} (type DESKTOP or MOBILE; optional os
            ANDROID or IOS, major OS versions with iOS at least 14, and
            label_map {make: [models]} with makes/models from
            search_reddit_targeting kind "devices"). Omitted means every
            device; APP_INSTALLS campaigns take exactly one.
        carriers: Mobile carrier ids (from search_reddit_targeting kind
            "carriers", e.g. "O2_DEUTSCHLAND"), checked against Reddit's
            carrier list. Omitted means every carrier.
        view_modes: Feed layouts: ALL, CARD, CLASSIC, COMPACT or IMMERSIVE.
            Omitted uses Reddit's default.
        custom_audience_ids: Custom audiences to target (from
            get_reddit_audiences), e.g. website visitors for retargeting.
        excluded_custom_audience_ids: Custom audiences to exclude, e.g.
            people who already bought.
        view_through_conversion_type: The conversion attribution window:
            SEVEN_DAY_CLICKS (conversions within 7 days of a click) or
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW (also within 1 day of a view).
            Empty: Reddit's default SEVEN_DAY_CLICKS_ONE_DAY_VIEW for
            CONVERSIONS and CATALOG_SALES campaigns, which require one. Under
            campaign budget optimization the ad group inherits the campaign's.
draft_reddit_campaigntool Draft a new Reddit campaign (created PAUSED) — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new Reddit campaign (created PAUSED) — returns a PREVIEW.

    By default the budget lives on the ad groups; campaign_budget_optimization
    holds it on the campaign. Budgets are checked against max_daily_budget.
    Ad groups are added with draft_reddit_ad_group. Returns a preview with a
    plan_id, the payload and warnings; nothing changes until
    confirm_and_apply applies it.

    Args:
        campaign_name: Name of the new campaign.
        objective: CLICKS, CONVERSIONS, IMPRESSIONS, LEAD_GENERATION,
            APP_INSTALLS, CATALOG_SALES or VIDEO_VIEWABLE_IMPRESSIONS. Other
            values only produce a warning, since Reddit is rolling out new
            objective enums.
        funding_instrument_id: Servable funding instrument id from
            list_reddit_funding_instruments.
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        campaign_budget_optimization: true holds the budget on the campaign
            (then daily_budget or lifetime_budget, bid_strategy, bid_type and
            conversion_pixel_id are required). false (default) leaves budget
            and bids to the ad groups, and none of the budget or bid
            parameters may be passed.
        daily_budget: Daily budget in account currency (positive; CBO only).
            Mutually exclusive with lifetime_budget.
        lifetime_budget: Lifetime budget in account currency (positive; CBO
            only); requires end_time and is compared to max_daily_budget by
            its per-day share.
        bid_strategy: BIDLESS, MAXIMIZE_VOLUME or TARGET_CPX (CBO only).
        bid_type: CPC, CPM, CPV, CPV6 or CPV15 (CBO only).
        bid_value: Bid in account currency (CBO only).
        optimization_goal: Pixel event to optimize for (PURCHASE, SIGN_UP,
            LEAD, PAGE_VISIT, ...); used with CBO only.
        conversion_pixel_id: Pixel id from get_reddit_pixels; required with
            CBO, optional otherwise.
        spend_cap: Campaign spend cap in account currency; 0 or empty means
            none.
        start_time: Start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day.
        end_time: End, same formats as start_time.
        schedule: Weekly delivery windows ("time of day" in Ads Manager; CBO
            only), a list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. [] clears it (deliver at any time). Hours apply in
            each viewer's local time, not the account time zone. A campaign
            schedule replaces every ad group's.
        view_through_conversion_type: The conversion attribution window of a
            CBO campaign, inherited by its ad groups: SEVEN_DAY_CLICKS or
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW. Empty: Reddit's default
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW for CONVERSIONS and CATALOG_SALES.
            Cannot be changed after publishing. Without CBO, set it on each ad
            group instead.
draft_reddit_custom_audiencetool Draft a Reddit retargeting audience (website visitors or engaged people) — PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a Reddit retargeting audience (website visitors or engaged people) — PREVIEW.

    Builds the audience from data Reddit already has: people the pixel saw
    on the website, or people who saw or engaged with the account's
    campaigns. No personal data is uploaded. Nothing changes until
    confirm_and_apply applies the plan_id; Reddit then fills the audience
    (status PENDING, up to a day), and an ad group uses it through
    update_reddit_ad_group custom_audience_ids (target) or
    excluded_custom_audience_ids (exclude).

    Args:
        name: Audience name, 3 to 500 characters.
        audience_type: PIXEL_RETARGETING (website visitors, from the pixel)
            or ENGAGEMENT_RETARGETING (people who saw or engaged with
            campaigns).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        pixel_id: Pixel to build a website audience from (get_reddit_pixels).
        events: Website audiences: the pixel events that qualify, any of
            PAGE_VISIT (default), VIEW_CONTENT, SEARCH, ADD_TO_CART,
            ADD_TO_WISHLIST, PURCHASE, LEAD, SIGN_UP, CUSTOM.
        custom_events: Website audiences: custom pixel event names to
            include (adds CUSTOM to events), at most 50.
        campaign_ids: Engagement audiences: the campaigns whose audience to
            reuse (get_reddit_campaigns).
        engagements: Engagement audiences: what people did, any of CLICKS
            (default), IMPRESSIONS, UPVOTES, COMMENT_SUBMISSIONS,
            VIDEO_STARTED, VIDEO_WATCHED_50_PERCENT,
            VIDEO_WATCHED_100_PERCENT.
        lookback_window_days: How far back an action counts: 1 to 90 days for
            website audiences (default 30), 1 to 180 for engagement audiences
            (default 90).
draft_remove_conversion_actiontool Draft a REMOVAL of a ConversionAction — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a REMOVAL of a ConversionAction — returns a PREVIEW.

    Removal stops counting and drops the action from goal lists; historical
    data is preserved but the action is irreversible. SMART_CAMPAIGN_* and
    GOOGLE_HOSTED types reject removal with MUTATE_NOT_ALLOWED. Returns a
    preview with a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        conversion_action_id: Numeric ConversionAction ID, e.g. from SELECT
            conversion_action.id, conversion_action.name FROM conversion_action.
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
draft_responsive_search_adtool Draft a Responsive Search Ad — returns a PREVIEW, does NOT create the ad.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a Responsive Search Ad — returns a PREVIEW, does NOT create the ad.

    The preview shows exactly what will be created; confirm_and_apply executes
    the returned plan_id. The ad is created PAUSED. final_url is checked for
    reachability first and an unreachable URL is refused. Several headlines
    may pin to the same position (Google rotates them there) as long as every
    position stays fillable, by an asset pinned to it or by a distinct
    unpinned one. Mixed plain-string and dict entries are allowed within a
    single call (e.g. brand pinned to HEADLINE_1, the rest unpinned). Warnings note fewer than 8
    headlines or 3 descriptions.

    Args:
        ad_group_id: Numeric ID of the ad group that gets the ad.
        headlines: 3-15 headlines, max 30 chars each. Each entry is a plain
            string (unpinned) or {"text": "...", "pinned_field": "HEADLINE_1"};
            valid pins are HEADLINE_1, HEADLINE_2, HEADLINE_3. Keyword or
            location insertion such as {KeyWord:Drain Cleaning} counts as its
            default text, which is required.
        descriptions: 2-4 descriptions, max 90 chars each. Each entry is a plain
            string (unpinned) or {"text": "...", "pinned_field": "DESCRIPTION_1"};
            valid pins are DESCRIPTION_1, DESCRIPTION_2. Insertion tags count
            as their default text, as for headlines.
        final_url: Landing page URL the ad links to; must be reachable.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        path1: Optional first display-URL path segment (Google allows up to 15
            chars).
        path2: Optional second display-URL path segment (Google allows up to 15
            chars).
draft_rollback_gtm_versiontool Draft republishing an older Tag Manager version LIVE; returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft republishing an older Tag Manager version LIVE; returns a PREVIEW.

    A rollback publishes an existing container version again. The preview
    diffs the live version against the target, so it lists every tag,
    trigger and variable that changes on the site, and it pins the live
    version: apply refuses when another version went live after the
    preview, or when the target was modified or archived. Workspaces are not
    changed. Refused unless gtm.write_enabled is set, and refused when the
    target adds or changes a Custom HTML tag while gtm.allow_custom_html is
    off. Returns the diff, previous_live_version_id (the version that
    restores today's state), the target version and a plan_id.

    Args:
        version_id: Container version ID to make live again (see
            list_gtm_versions and get_gtm_version_diff).
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_shopping_campaigntool Draft a Standard Shopping campaign that advertises a Merchant Center feed — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a Standard Shopping campaign that advertises a Merchant Center feed — returns a PREVIEW.

    Creates the budget, the campaign (PAUSED), a product ad group with its
    Shopping ad, and one "All products" product group, in one atomic request.
    The Merchant Center account must be linked to the Google Ads account;
    the draft checks that. Shopping campaigns take no keywords and no
    language targeting (the feed's language applies). Nothing changes until
    confirm_and_apply applies the plan_id; a dry run has Google validate it.

    Args:
        campaign_name: Name of the new campaign.
        daily_budget: Daily budget in account currency, checked against the
            max_daily_budget safety cap.
        merchant_id: Numeric Merchant Center id (from list_merchant_accounts)
            whose products the campaign advertises.
        product_bid: CPC bid of the "All products" group in account currency.
            Google requires it even when the bid strategy sets bids.
        geo_target_ids: Countries or regions as geo target constant ids, e.g.
            ["2276"] for Germany. Required.
        bidding_strategy: MANUAL_CPC (default), TARGET_SPEND (Maximize clicks)
            or TARGET_ROAS.
        target_roas: Target return on ad spend for TARGET_ROAS, e.g. 4.0 for
            400%.
        max_cpc: Optional CPC ceiling for TARGET_SPEND, in account currency.
        campaign_priority: LOW (default), MEDIUM or HIGH. With several
            Shopping campaigns on the same products, the higher priority
            serves first.
        feed_label: Optional feed label to limit the campaign to one feed of
            the Merchant Center account.
        ad_group_name: Optional ad group name; defaults to "<campaign> - All
            products".
        search_partners_enabled: Also serve on Google search partners.
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_sitelinkstool Draft sitelink extensions for a campaign or the account — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft sitelink extensions for a campaign or the account — returns a PREVIEW.

    Sitelinks appear as additional links below your ad, increasing click area
    and directing users to specific pages. Every final_url is fetched and an
    unreachable URL (HTTP 4xx/5xx) blocks the draft. Google recommends at least
    4 sitelinks per campaign; fewer than 2 may not show. Returns a preview with
    a plan_id and any warnings; nothing changes until confirm_and_apply applies
    it.

    Args:
        sitelinks: List of dicts (at least one), each with link_text (str,
            required, max 25 chars) — the clickable text shown; final_url (str,
            required) — destination URL for this sitelink; description1 (str,
            optional, max 35 chars) — first description line; description2
            (str, optional, max 35 chars) — second description line;
            start_date / end_date (str, optional, YYYY-MM-DD) — first and last
            day the sitelink shows, so seasonal links switch off by themselves.
        campaign_id: Numeric ID of the campaign to attach sitelinks to. Leave
            empty with scope="account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        scope: Empty follows campaign_id. "account" links the sitelinks
            account-wide; they serve on every eligible campaign without sitelinks
            of its own. It is never inferred from an empty campaign_id.
draft_structured_snippetstool Draft structured snippet assets for an ad group, a campaign or the account — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft structured snippet assets for an ad group, a campaign or the account — returns a PREVIEW.

    Creates structured snippet assets and links them where the id points:
    ad_group_id links to that ad group, campaign_id to that campaign.
    Account-wide linking needs scope="account" and no id. Returns a preview
    with a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        snippets: At least one dict with "header" and "values". header is one of
            Google's snippet headers, in the language of the values: Amenities,
            Brands, Courses, Degree programs, Destinations, Featured Hotels,
            Insurance coverage, Models, Neighborhoods, Services, Shows, Styles,
            Types, or Google's translation of one (German: Typen, Marken,
            Dienstleistungen, Modelle, Kurse, ...; case does not matter).
            values is a list of 3-10 non-empty strings, each at most 25
            characters.
        campaign_id: Numeric ID of the campaign to link the snippets to.
        ad_group_id: Numeric ID of the ad group to link them to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_update_conversion_actiontool Draft a partial UPDATE of an existing ConversionAction — returns PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a partial UPDATE of an existing ConversionAction — returns PREVIEW.

    Only parameters passed non-empty/non-default are sent to the API.
    Covers renaming, demoting a Primary to Secondary, changing value,
    adjusting the call-duration threshold, changing attribution, or moving
    the action to another goal with category.
    SMART_CAMPAIGN_* and GOOGLE_HOSTED types reject mutations with
    MUTATE_NOT_ALLOWED at apply time. Returns a preview with a plan_id (plus
    warnings where relevant); nothing changes until confirm_and_apply applies
    it.

    Args:
        conversion_action_id: Numeric ConversionAction ID. It comes from:
            SELECT conversion_action.id, conversion_action.name FROM
            conversion_action.
        name: New name. Empty keeps the current name.
        primary_for_goal: True makes it Primary (Smart Bidding optimizes toward
            it); False demotes it to Secondary. Omit to leave unchanged.
        default_value: New default value in the action's currency (not micros),
            >= 0. 0 leaves it unchanged.
        currency_code: New 3-letter ISO 4217 currency code. Empty leaves it
            unchanged.
        always_use_default_value: True always uses default_value; False uses
            it only as a fallback when the tag/import supplies no value (the
            preview warns when combined with a positive default_value). Omit to
            leave unchanged.
        counting_type: ONE_PER_CLICK or MANY_PER_CLICK. Empty leaves it
            unchanged.
        phone_call_duration_seconds: Minimum call length in seconds for a call
            to count. 0 leaves it unchanged.
        include_in_conversions_metric: Refused when passed: Google answers
            IMMUTABLE_FIELD at apply, and a dry run does not catch it. It derives
            the value from primary_for_goal and whether the goal of the action's
            category is biddable; use those instead.
        click_through_window_days: Click-through attribution window in days,
            1-90. 0 leaves it unchanged.
        view_through_window_days: View-through attribution window in days,
            1-30. 0 leaves it unchanged.
        attribution_model: AttributionModel enum value, e.g.
            GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN. Empty leaves it unchanged.
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
        category: ConversionActionCategory to move the action to, e.g.
            PHONE_CALL_LEAD; that decides which goal it belongs to. The preview
            pins the current one (current_category); if the category is changed
            in Google Ads before the apply, nothing is sent. Empty leaves it
            unchanged.
draft_update_custom_conversion_goaltool Rename and/or re-scope an existing custom conversion goal — PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Rename and/or re-scope an existing custom conversion goal — PREVIEW.

    conversion_action_ids REPLACES the whole action list, it does not append.
    An empty parameter stays unchanged. The preview shows the action
    list before and after.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        custom_conversion_goal_id: Numeric goal ID from get_custom_conversion_goals.
        name: New name. Empty leaves the name unchanged.
        conversion_action_ids: The complete new action list. Empty leaves the
            actions unchanged.
        customer_id: Ads account ID. Defaults to the configured account.
draft_upload_call_conversionstool Draft an offline CALL-conversion upload from a CSV — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft an offline CALL-conversion upload from a CSV — returns a PREVIEW.

    Uploads call conversions via ConversionUploadService.UploadCallConversions,
    matching the call against the ad click by the caller's phone number.
    The CSV must have columns: Caller's Phone Number,
    Call Start Time, Conversion Name, Conversion Time, Conversion Value,
    Conversion Currency. The Conversion Name must match an existing
    UPLOAD_CALLS-type conversion action — verified against the account while
    drafting, so a typo fails here rather than after the upload. Optional
    `Ad User Data` and `Ad Personalization` columns carry consent per row.

    The CSV comes from csv_path (a file on the machine running AdLoop) or
    from upload_id (a file uploaded with upload_conversion_csv, the only way
    on AdLoop Cloud). An uploaded file is deleted once the draft has read it.

    PII: the caller phone number is required RAW by Google (it cannot be
    hashed), so it lives in the plan's apply-only payload — the preview shows
    redacted ids and counts, the audit log and `plan.changes` show neither.
    Apply uploads exactly what you previewed (no CSV re-read).

    Phone numbers are normalized with libphonenumber semantics: a number
    carries no country code needs ``default_region``, an extension is dropped,
    and the German trunk marker in "+49 (0)89 …" is handled. Rows whose number
    stays unusable are skipped and reported in `skipped_rows` instead of being
    uploaded to no effect.

    Rows that repeat inside one file are named in `dedup_warnings`. A call
    upload has no dedup key at Google, so each of them still goes out as its
    own conversion — the warning is the only place that says so.

    Returns a preview with a plan_id, the row counts, the consent the rows
    actually carry (`consent_summary`) and the skipped rows; nothing is
    uploaded until that preview is confirmed.

    Args:
        csv_path: Path of the CSV file holding the upload rows, read on the
            machine that runs AdLoop. Refused on the hosted server; use
            upload_id there.
        upload_id: Id of a CSV uploaded with upload_conversion_csv (up_...),
            instead of csv_path.
        default_region: ISO 3166-1 alpha-2 country assumed for phone numbers
            that carry no country code, e.g. "DE" for "0151 12345678". Empty
            leaves such numbers unusable and the row is skipped.
        consent: Consent signals for GDPR/EEA, as an object with "ad_user_data"
            and/or "ad_personalization", each "GRANTED", "DENIED" or
            "UNSPECIFIED". None sends UNSPECIFIED. A row whose own "Ad User
            Data" / "Ad Personalization" columns are filled in overrides this
            for that row; empty cells fall back to it.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
draft_upload_enhanced_conversions_for_leadstool Draft an Enhanced Conversions for LEADS upload from a CSV — PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft an Enhanced Conversions for LEADS upload from a CSV — PREVIEW.

    Uploads lead conversions via
    ConversionUploadService.UploadClickConversions with user_identifiers,
    matching hashed customer PII back to the Google users who clicked the ads.
    The CSV holds RAW PII in columns: Email, Phone
    Number, First Name, Last Name (plus Conversion Name, Conversion Time,
    Conversion Value, Conversion Currency; optional Order ID dedup key, and
    optional `Ad User Data` / `Ad Personalization` consent columns).

    PII is normalized and SHA-256-hashed AT PREVIEW TIME — only the hashes are
    stored in the plan. Raw email/phone/name never land in the plan or the
    audit log. A cell that already is a SHA-256 hex digest (a CRM export that
    hashes before writing) is used as it is. The target conversion action must
    be UPLOAD_CLICKS-type.

    An Order ID column makes re-uploads dedup instead of double-counting.

    Rows that repeat inside one file are named in `dedup_warnings`. Rows
    sharing an Order ID count once at Google; two rows with different Order
    IDs are two real orders and are not reported.

    The CSV comes from csv_path (a file on the machine running AdLoop) or
    from upload_id (a file uploaded with upload_conversion_csv, the only way
    on AdLoop Cloud). An uploaded file is deleted once the draft has read it.

    Returns a preview with a plan_id, the row counts, the consent the rows
    actually carry (`consent_summary`) and the skipped rows; nothing is
    uploaded until that preview is confirmed.

    Args:
        csv_path: Path of the CSV file holding the upload rows, read on the
            machine that runs AdLoop. Refused on the hosted server; use
            upload_id there.
        upload_id: Id of a CSV uploaded with upload_conversion_csv (up_...),
            instead of csv_path.
        default_region: ISO 3166-1 alpha-2 country assumed for phone numbers
            that carry no country code, e.g. "DE" for "0151 12345678". Empty
            leaves such numbers unusable; the row still uploads when its email
            or its complete address identifies the lead.
        consent: Consent signals for GDPR/EEA, as an object with "ad_user_data"
            and/or "ad_personalization", each "GRANTED", "DENIED" or
            "UNSPECIFIED". None sends UNSPECIFIED. A row whose own "Ad User
            Data" / "Ad Personalization" columns are filled in overrides this
            for that row; empty cells fall back to it.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
enable_entitytool Draft enabling a paused campaign, ad group, ad, or keyword — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft enabling a paused campaign, ad group, ad, or keyword — returns a PREVIEW.

    Returns a preview with a plan_id (target status ENABLED); nothing changes
    until confirm_and_apply applies it.

    Args:
        entity_type: "campaign", "ad_group", "ad", "keyword" or
            "asset_group" (Performance Max).
        entity_id: ID in the format for its type. campaign: campaign ID (e.g.
            "12345678"); ad_group: ad group ID (e.g. "12345678"); ad:
            "adGroupId~adId" (e.g. "12345678~987654"; a bare ad ID is resolved
            to its ad group at apply time); keyword: "adGroupId~criterionId"
            (e.g. "12345678~987654").
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
enable_microsoft_entitytool Draft enabling a paused Microsoft Advertising campaign, ad group, keyword or ad (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft enabling a paused Microsoft Advertising campaign, ad group, keyword or ad (preview only).

    Warnings name a paused parent or an editorial rejection that would still
    keep it from serving. The returned plan_id is applied with
    confirm_and_apply, which refuses if the status changed since the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        entity_type: "campaign", "ad_group", "keyword" or "ad".
        entity_id: The entity's id (from the read tools).
        parent_id: Optional: the campaign id of an ad group, or the ad group
            id of a keyword or ad, to find it faster.
enable_reddit_entitytool Draft enabling (configured_status=ACTIVE) a Reddit campaign, ad group or ad — PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft enabling (configured_status=ACTIVE) a Reddit campaign, ad group or ad — PREVIEW.

    Enabling a new ad sends it to Reddit policy review (PENDING_APPROVAL).
    Returns a preview with a plan_id, the current and target status and
    warnings (e.g. an effective_status of REJECTED or PENDING_BILLING_INFO
    that keeps it from serving); nothing changes until confirm_and_apply
    applies the plan_id.

    Args:
        entity_type: "campaign", "ad_group" or "ad".
        entity_id: Reddit id of the entity, from the read tools
            (get_reddit_campaigns, get_reddit_ad_groups, get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
estimate_budgettool Forecast clicks, cost, and conversions for a set of keywords.FilesCredentialsEnv varsSensitive pathsoutside text
Forecast clicks, cost, and conversions for a set of keywords.

    Uses Google Ads Keyword Planner to estimate campaign performance without
    creating anything. Essential for budget planning before launching campaigns.
    Per-keyword max_cpc values are collapsed to a campaign-level manual CPC
    cap (the highest one) — the Ads API forecast takes no per-keyword bids.
    Returns estimated clicks, cost, avg CPC, conversions and avg CPA for the
    forecast period, daily estimates, and insights.

    Args:
        keywords: List of {"text": "keyword", "match_type": "EXACT|PHRASE|BROAD",
            "max_cpc": 1.50}. match_type defaults to BROAD; max_cpc is optional
            (defaults to 1.00 in account currency, not micros). At least one
            keyword is required.
        daily_budget: Daily budget in account currency. If provided, insights
            will show what % of traffic the budget captures. 0 = no budget
            comparison.
        geo_target_id: Geo target constant ID (2276=Germany, 2840=USA, 2826=UK,
            2250=France). Defaults to 2276.
        language_id: Language constant ID (1000=English, 1001=German,
            1002=French, 1003=Spanish). Defaults to 1000.
        forecast_days: Forecast horizon in days, starting tomorrow (default 30).
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
estimate_reddit_ad_grouptool Audience size, delivery estimate and Reddit's suggested bid for a planned ad group — read-only.FilesCredentialsEnv varsSensitive pathsoutside text
Audience size, delivery estimate and Reddit's suggested bid for a planned ad group — read-only.

    Reddit's counterpart of estimate_budget: takes the same targeting and
    budget as draft_reddit_ad_group, ahead of drafting. Returns the reachable
    and targetable audience (fixed 30-day basis), estimated
    impressions/clicks/reach for the schedule, the minimum/suggested bid
    range for bid_type in account currency, and insights (audience under
    10,000 people, bid_value below the suggested minimum). Nothing is
    created. At least one of geolocations, communities, interests or keywords
    is required.

    Args:
        daily_budget: Daily budget in account currency (positive). One of
            daily_budget or lifetime_budget is required; daily_budget wins
            when both are given.
        lifetime_budget: Lifetime budget in account currency (positive),
            used when daily_budget is not given.
        objective: Campaign objective the estimate assumes, e.g. CLICKS
            (default), CONVERSIONS, IMPRESSIONS, LEAD_GENERATION,
            APP_INSTALLS, CATALOG_SALES or VIDEO_VIEWABLE_IMPRESSIONS.
        bid_type: CPC (default), CPM, CPV, CPV6 or CPV15; the bid suggestion
            is for this bid type.
        bid_strategy: BIDLESS, MANUAL_BIDDING, MAXIMIZE_VOLUME or TARGET_CPX.
            Empty means BIDLESS.
        bid_value: Planned bid in account currency; compared with Reddit's
            suggested minimum.
        optimization_goal: Pixel event to optimize for (PURCHASE, SIGN_UP,
            LEAD, PAGE_VISIT, ...). Empty means none.
        view_through_conversion_type: SEVEN_DAY_CLICKS or
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW, as draft_reddit_ad_group takes it.
            Empty: Reddit's default for CONVERSIONS and CATALOG_SALES.
        start_time: Schedule start, ISO 8601 (e.g. 2026-10-01T00:00:00Z).
            Empty means tomorrow 00:00 UTC.
        end_time: Schedule end, ISO 8601. Empty means 30 days after the
            default start.
        geolocations: Geolocation ids to target (e.g. "DE" or "DE:2874225",
            from search_reddit_targeting kind "geolocations").
        excluded_geolocations: Geolocation ids to exclude.
        communities: Community (subreddit) names to target.
        excluded_communities: Community names to exclude.
        interests: Interest ids to target (from search_reddit_targeting kind
            "interests").
        keywords: Keywords to target.
        languages: Language codes (ISO 639-1, upper-cased automatically,
            e.g. "DE"). Empty means all languages.
        gender: FEMALE or MALE; empty means all genders.
        platforms: Platforms to target, e.g. ALL, DESKTOP, MOBILE_NATIVE,
            MOBILE_WEB. Empty means no platform restriction.
        devices: Device targets, objects like {"type": "MOBILE", "os":
            "IOS", "min_version": "16"} (type DESKTOP or MOBILE; optional os
            ANDROID or IOS, major OS versions, and label_map {make: [models]}
            with makes/models from search_reddit_targeting kind "devices").
            Empty means every device.
        carriers: Mobile carrier ids (from search_reddit_targeting kind
            "carriers", e.g. "O2_DEUTSCHLAND"). Empty means every carrier.
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
fntool
No description.
generate_tracking_codetool Generate a GA4 event tracking JavaScript snippet.FilesCredentialsEnv varsSensitive pathsoutside text
Generate a GA4 event tracking JavaScript snippet.

    Produces ready-to-paste gtag code for the specified event. Includes
    recommended parameters for well-known GA4 events (sign_up, purchase, etc.).
    Optionally checks GA4 to warn if the event already fires. Returns the
    javascript snippet, already_exists / existing_count from GA4, and notes
    (duplicates, marking it as a key event, GDPR consent).

    Args:
        event_name: GA4 event name for the snippet, e.g. "sign_up" or
            "generate_lead".
        event_params: Event parameters as a name-to-value object, e.g.
            {"method": "email"}. Missing recommended parameters for well-known
            events are added as typed placeholders.
        trigger: "form_submit", "button_click", or "page_load" — wraps the gtag
            call in an appropriate event listener (with a YOUR_SELECTOR
            placeholder for forms and buttons). Empty = bare gtag call.
        property_id: GA4 property as "properties/123456789" used for the
            existing-event check. If empty, uses the default from config.
        check_existing: When true (default), looks up the last 28 days of GA4
            events to report whether this event already fires.
get_account_summariestool List all GA4 accounts and properties accessible by the authenticated user.FilesCredentialsEnv varsSensitive pathsoutside text
List all GA4 accounts and properties accessible by the authenticated user.

    Serves as the discovery step for which GA4 properties are available.
    Returns account names, property names, and property IDs.
get_ad_performancetool Get ad-level performance data including headlines, descriptions, and metrics.FilesCredentialsEnv varsSensitive pathsoutside text
Get ad-level performance data including headlines, descriptions, and metrics.

    Returns ad type, headlines, descriptions, final URL, impressions,
    clicks, CTR, conversions, cost for each ad, plus its policy approval
    status, review status and policy topic names. Disapproved and
    limited-by-policy ads are listed under policy_issues with their spend.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews), returns totals, the top-10
            ads with headline/description COUNTS instead of full asset lists,
            plus incomplete-RSA, single-ad ad-group and policy findings with
            approval-status counts (~90% smaller).
get_ai_max_settingstool Read the AI Max controls of Search campaigns, per campaign and ad group.FilesCredentialsEnv varsSensitive pathsoutside text
Read the AI Max controls of Search campaigns, per campaign and ad group.

    Returns for every campaign: id, name, status, advertising channel type,
    campaign.ai_max_setting.enable_ai_max, campaign.ai_max_setting.bundling_required
    (output only) and the full campaign.asset_automation_settings list. Each
    campaign also carries its non-REMOVED ad groups with
    ad_group.ai_max_ad_group_setting.disable_search_term_matching.

    Shows the current state ahead of draft_ai_max_settings, and what the
    account actually looks like after confirm_and_apply.

    Args:
        campaign_id: Numeric campaign ID. When omitted, every non-removed
            Search campaign in the account is listed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
get_asset_group_signalstool Search themes and the audience signal of a Performance Max asset group, plus the account's audiences.FilesCredentialsEnv varsSensitive pathsoutside text
Search themes and the audience signal of a Performance Max asset group, plus the account's audiences.

    Returns each search theme and audience signal with its signal_id and
    approval status, the enabled audiences of the account that can become
    the group's audience signal (audience_id, name), and insights when a
    group has no themes or no audience signal.

    Args:
        asset_group_id: Numeric asset group id (from get_pmax_performance).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
get_audience_liststool The account's own audiences: remarketing and customer lists, custom segments, combined segments.FilesCredentialsEnv varsSensitive pathsoutside text
The account's own audiences: remarketing and customer lists, custom segments, combined segments.

    Each user list comes with its type, membership status (OPEN or CLOSED),
    size for Search and Display, eligibility and membership duration;
    custom and combined segments with their id and description. Insights
    flag lists below the 100 active users Search needs and closed lists. Use the
    ids with draft_audience_attachment; for Google's in-market and affinity
    segments use search_audience_segments.

    Args:
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
get_audience_performancetool Get audience segment performance metrics.FilesCredentialsEnv varsSensitive pathsoutside text
Get audience segment performance metrics.

    Returns performance by audience type — remarketing lists (USER_LIST),
    in-market segments (USER_INTEREST), affinity, demographics (AGE_RANGE,
    GENDER), etc. Shows display_name, impressions, clicks, cost, conversions,
    CTR, and CPC for each audience.

    Works for campaigns with explicit audience targeting (Search, Display).
    PMax audience targeting is automatic and may not appear in this report.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        campaign_id: Optional numeric ID to filter to a single campaign.
get_audience_targetingtool Audiences attached to one campaign or ad group, its exclusions, and the audience mode.FilesCredentialsEnv varsSensitive pathsoutside text
Audiences attached to one campaign or ad group, its exclusions, and the audience mode.

    audience_mode is "observation" (audiences only adjust bids and report),
    "targeting" (ads only reach the audiences) or "not set". Every audience
    and exclusion carries a remove_id for remove_entity (entity_type
    "campaign_criterion" or "ad_group_criterion").

    Args:
        campaign_id: Numeric campaign id. Pass this or ad_group_id.
        ad_group_id: Numeric ad group id. Pass this or campaign_id.
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
get_brand_list_brandstool List the brands inside a brand list.FilesCredentialsEnv varsSensitive pathsoutside text
List the brands inside a brand list.

    Returns the brands and their total. Each entry carries brand.entity_id
    (the Commercial KG MID that suggest_brands returns as id), the display
    name, primary URL, status and a criterion_id — the latter is what
    remove_from_brand_list needs.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists (shared_set.id).
        customer_id: Ads account ID. Defaults to the configured account.
get_brand_list_campaignstool List which campaigns a brand list is attached to.FilesCredentialsEnv varsSensitive pathsoutside text
List which campaigns a brand list is attached to.

    Brand lists attach as CampaignCriterion rows of type BRAND_LIST (not as
    CampaignSharedSet like negative keyword lists). Returns each attachment's
    campaign ID, name and status, the criterion, and `role`: "excluded" when
    the criterion is negative, "targeted" when it restricts targeting to the
    list.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists. When omitted,
            all brand-list attachments in the account are returned.
        customer_id: Ads account ID. Defaults to the configured account.
get_brand_liststool List all brand lists (SharedSets of type BRANDS) in the account.FilesCredentialsEnv varsSensitive pathsoutside text
List all brand lists (SharedSets of type BRANDS) in the account.

    Returns each list's ID, name, status, and member count, plus the total —
    the basis for reusing an existing list with add_to_brand_list instead of
    duplicating it with propose_brand_list.

    Args:
        customer_id: Ads account ID. Defaults to the configured account.
get_campaign_performancetool Get campaign-level performance metrics for a date range.FilesCredentialsEnv varsSensitive pathsoutside text
Get campaign-level performance metrics for a date range.

    Returns campaign name, status, type, impressions, clicks, cost,
    conversions, CPA, ROAS, CTR for each campaign, plus Search impression
    share and the share lost to budget and to ad rank (fractions with
    matching *_pct percentages; null for campaigns that do not serve on
    Search or had no impressions). Insights flag converting campaigns that
    lose a significant share of impressions to budget.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews on large accounts), returns
            account totals, status/type breakdowns, the top-10 spenders,
            zero-conversion offenders and budget-limited converters instead
            of every row (~90% smaller).
get_campaign_settingstool Read every setting that decides how far a Search campaign reaches, in one call.FilesCredentialsEnv varsSensitive pathsoutside text
Read every setting that decides how far a Search campaign reaches, in one call.

    Returns one flat record per campaign: status, bidding strategy and its
    target or CPC ceiling, daily budget and whether it is shared, the Google
    Search / search partner / Display network flags, the location option
    (positive_geo_target_type) and its negative counterpart, campaign-level
    broad match (keyword_match_type), the tracking template, final URL suffix
    and custom parameters, and the AI Max state get_ai_max_settings reports
    (enable_ai_max, asset automation per type). Money is in the account
    currency (`currency`).

    Each campaign lists its `widening_settings`: search partners or Display on,
    a presence-or-interest location option, broad match on, AI Max on, an
    automation opted in. `insights[]` names the campaigns that have any. Made
    for recurring audits: the same call every week diffs cleanly.

    Args:
        campaign_id: Numeric campaign ID of a Search campaign. When omitted,
            every non-removed Search campaign in the account is listed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
get_change_historytool List recent account changes: who changed what, when, and through which tool.FilesCredentialsEnv varsSensitive pathsoutside text
List recent account changes: who changed what, when, and through which tool.

    Answers "what changed before the drop?". Returns each change newest
    first with its time, the user's email, the client it came through
    (Google Ads UI, API, Google Ads scripts, Editor, automated rules,
    auto-applied recommendations, ...), the changed resource type, the
    operation (CREATE, UPDATE, REMOVE), the changed field paths, and the
    campaign and ad group names. Also returns counts by resource type,
    client, user and day, plus insights on auto-applied recommendations
    and budget or bidding changes. Google Ads keeps change history for 30
    days, so older start dates are moved to the earliest available day.

    Reads the change_event resource:
    https://developers.google.com/google-ads/api/docs/change-event

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD", at most 30 days back.
            Empty starts at the oldest day Google Ads still keeps.
        date_range_end: End date as "YYYY-MM-DD" (inclusive). Empty means today.
        campaign_id: Optional numeric campaign ID; only changes attributed to
            that campaign are returned.
        resource_types: Optional filter of ChangeEventResourceType names,
            e.g. ["CAMPAIGN", "CAMPAIGN_BUDGET", "AD_GROUP_AD",
            "AD_GROUP_CRITERION"]. Empty = all types.
        limit: Maximum number of changes returned, newest first (1 to
            10000; default 1000). The response is marked truncated when
            the limit is reached.
get_custom_conversion_goalstool Read the custom conversion goals and the campaign goal configuration.FilesCredentialsEnv varsSensitive pathsoutside text
Read the custom conversion goals and the campaign goal configuration.

    Returns every custom goal with its name, status and conversion actions,
    plus — optionally for one campaign — the goal config the campaign uses
    (`goal_config_level` CUSTOMER or CAMPAIGN and the assigned custom goal).

    A custom conversion goal bundles conversion actions into a named set that a
    campaign can be pointed at. Ahead of drafting, this shows which goals
    exist, which actions they contain and what a campaign currently uses.

    Args:
        campaign_id: Numeric campaign ID. When omitted, the campaign config
            is skipped.
        customer_id: Ads account ID. Defaults to the configured account.
get_demographic_targetingtool List demographic targeting criteria (age, gender, parental status, income).FilesCredentialsEnv varsSensitive pathsoutside text
List demographic targeting criteria (age, gender, parental status, income).

    Takes exactly one of ad_group_id or campaign_id. Returns each
    criterion's value, whether it's negative (excluded) or positive
    (narrowing), status, and a remove_id (composite resource ID) that
    can be passed directly to remove_entity with
    entity_type='ad_group_criterion' or 'campaign_criterion'.

    By default, Google Ads serves ads to ALL demographic segments — a
    criterion only appears here once a segment has been actively excluded
    or narrowed.

    Args:
        ad_group_id: Numeric ad group ID. Mutually exclusive with campaign_id.
        campaign_id: Numeric campaign ID. Mutually exclusive with ad_group_id.
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_detailed_asset_performancetool Get top-performing asset combinations for Performance Max campaigns.FilesCredentialsEnv varsSensitive pathsoutside text
Get top-performing asset combinations for Performance Max campaigns.

    Shows which headline + description + image combinations Google selects
    most often. Returns each combination with the assets used and their field
    types. This data helps identify which creative elements work well together.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        campaign_id: Optional numeric ID to filter to a single PMax campaign.
get_ga4_propertytool Show a GA4 property's configuration in one call: details, linked Google Ads accounts, data streams and data retention.FilesCredentialsEnv varsSensitive pathsoutside text
Show a GA4 property's configuration in one call: details, linked Google Ads accounts, data streams and data retention.

    Returns the property's display name, time zone, currency, industry,
    service level (standard or 360), type and create time; every linked
    Google Ads account (customer ID, whether it is a manager account,
    personalized advertising); every data stream with its measurement ID or
    app ID; how many months event and user data are kept; and the number of
    key events. insights[] flags settings that cost data: two-month
    retention, no Google Ads link while key events exist, the configured Ads
    account not being linked, a property in the trash. A part the user may
    not read is listed under unavailable instead of failing the call. Reads
    the GA4 Admin API (properties.get, googleAdsLinks.list, dataStreams.list,
    getDataRetentionSettings, keyEvents.list).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID (see get_account_summaries). If empty, uses the
            default from config.
get_gtm_tagtool Get the full RAW configuration for a single GTM tag.FilesCredentialsEnv varsSensitive pathsoutside text
Get the full RAW configuration for a single GTM tag.

    Includes every parameter, firing/blocking triggers (with their filter
    conditions resolved to text), priority, pause status, sampling, and
    monitoring metadata. Suited to inspecting a tag flagged by
    audit_event_coverage. An unknown tag_id returns an error with the
    available tag IDs. Reads the live container, or a workspace's
    unpublished state when workspace_id is set.

    Args:
        tag_id: Numeric GTM tag ID, as listed by list_gtm_tags.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
get_gtm_triggertool Get the full RAW configuration for a single GTM trigger.FilesCredentialsEnv varsSensitive pathsoutside text
Get the full RAW configuration for a single GTM trigger.

    Includes filters, auto-event filters, custom-event filters, validation
    settings, and a list of every tag that uses this trigger. Helps
    diagnose why a tag with a specific trigger ID does or doesn't fire. An
    unknown trigger_id returns an error with the available trigger IDs.
    Reads the live container, or a workspace's unpublished state when
    workspace_id is set.

    Args:
        trigger_id: Numeric GTM trigger ID, as listed by list_gtm_triggers or
            a tag's firing/blocking triggers.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
get_gtm_versiontool Get metadata + entity counts for a single GTM container version.FilesCredentialsEnv varsSensitive pathsoutside text
Get metadata + entity counts for a single GTM container version.

    Returns name, description (the version notes), fingerprint, and lists of
    tag/trigger/variable names at that point in time. The API returns no
    timestamps or author for a version.

    Args:
        container_version_id: Numeric container version ID from
            list_gtm_versions.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
get_gtm_version_difftool Compare two GTM container versions: what a publish changed.FilesCredentialsEnv varsSensitive pathsoutside text
Compare two GTM container versions: what a publish changed.

    Returns added, removed and changed tags, triggers and variables (with
    names, types and the changed fields; parameters and trigger conditions
    are diffed key by key), plus built-in variables enabled or disabled. By
    default compares the live version with the version created before it.
    The Tag Manager API does not mark which versions were published, so that
    default "before" version may never have been live. Makes two or three
    Tag Manager API calls.

    Args:
        from_version_id: Older version ID (see list_gtm_versions). Empty uses
            the newest non-archived version created before to_version_id.
        to_version_id: Newer version ID. Empty uses the live (published)
            version.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
get_gtm_workspace_difftool Show drafted-but-not-published changes in a GTM workspace.FilesCredentialsEnv varsSensitive pathsoutside text
Show drafted-but-not-published changes in a GTM workspace.

    Returns the list of entities (tags, triggers, variables) added,
    modified, or deleted relative to the live published version, plus
    any merge conflicts. Common cause of "I edited a tag but nothing
    happened" — the workspace was never published. is_clean=true means
    no pending changes and no conflicts.

    Args:
        workspace_id: Numeric GTM workspace ID from list_gtm_workspaces.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
get_keyword_performancetool Get keyword metrics including quality scores and competitive data.FilesCredentialsEnv varsSensitive pathsoutside text
Get keyword metrics including quality scores and competitive data.

    Returns keyword text, match type, quality score, impressions,
    clicks, CTR, CPC, conversions for each keyword.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews), returns totals, match-type
            distribution, the top-10 spenders, low-quality-score keywords, and
            zero-conversion spenders instead of every row (~90% smaller).
get_merchant_feed_healthtool Merchant Center feed health — disapproved products + account issues.FilesCredentialsEnv varsSensitive pathsoutside text
Merchant Center feed health — disapproved products + account issues.

    Disapproved feed items silently starve Shopping and Performance Max
    campaigns; this reports approved/pending/disapproved counts per
    reporting context (Shopping ads, free listings, ...), the top product
    issues by affected products (with documentation links), and
    account-level issues — CRITICAL ones stop offers serving entirely.
    Product-status data lags reality by ~30 minutes.

    Args:
        account_id: Numeric Merchant Center ID from list_merchant_accounts.
            Defaults to merchant.account_id in the config.
get_merchant_product_issuestool The products behind the feed-health counts, each with its issues.FilesCredentialsEnv varsSensitive pathsoutside text
The products behind the feed-health counts, each with its issues.

    Lists products by status with offer id, title, brand, click potential
    and every item issue: its code, the attribute it concerns, severity per
    reporting context with the affected countries, and whether the
    merchant has to act or Google is still processing. Products with high
    click potential come first, because fixing them recovers the most
    traffic. issues_by_code counts the products per issue. Data lags feed
    changes by about 30 minutes.

    Args:
        account_id: Numeric Merchant Center ID from list_merchant_accounts.
            Defaults to merchant.account_id in the config.
        status: "disapproved" (default, not serving), "limited" (serving
            with restrictions), "pending" (still in review) or "any"
            (every product with at least one issue).
        issue_code: Only products with this issue code (from
            issues_by_code or get_merchant_feed_health).
        limit: Maximum number of products to return (1-200, default 50).
get_microsoft_ad_extensionstool List sitelinks, callouts, structured snippets, call and image extensions on Microsoft Advertising ad groups, campaigns and the account.FilesCredentialsEnv varsSensitive pathsoutside text
List sitelinks, callouts, structured snippets, call and image extensions on Microsoft Advertising ad groups, campaigns and the account.

    Each row has the level (account, campaign or ad_group), type, content,
    final URLs, editorial status and the remove_id that unlinks it. Image
    rows add alt_text, display_text, layouts, media_ids and images: each
    image's media type, size and a url that opens the picture, so a photo
    can be checked before its link is removed. Insights flag campaigns
    without sitelinks, disapproved extensions and accounts without image
    extensions.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign.
get_microsoft_ad_groupstool List Microsoft Advertising ad groups with bid, network, language, dates and campaign status.FilesCredentialsEnv varsSensitive pathsoutside text
List Microsoft Advertising ad groups with bid, network, language, dates and campaign status.

    Insights flag ad groups that also run on syndicated search partners,
    ad groups that can show on the Microsoft Audience Network, and expired
    ad groups.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (from get_microsoft_campaigns); empty means
            every campaign.
get_microsoft_adstool List Microsoft Advertising ads with headlines, descriptions, paths, final URLs, status and editorial review.FilesCredentialsEnv varsSensitive pathsoutside text
List Microsoft Advertising ads with headlines, descriptions, paths, final URLs, status and editorial review.

    Insights flag disapproved ads and ad groups without an active ad.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign; empty means every campaign.
        ad_group_id: Limit to one ad group; empty means every ad group.
get_microsoft_campaignstool List Microsoft Advertising campaigns with status, daily budget, bidding, languages and location targeting.FilesCredentialsEnv varsSensitive pathsoutside text
List Microsoft Advertising campaigns with status, daily budget, bidding, languages and location targeting.

    Location targeting lists the included and excluded locations and the
    location intent (people in the area, or also people searching about it).
    Insights flag an inactive account, budget-paused or suspended campaigns,
    campaigns without locations, intent that reaches beyond the area, and
    shared budgets.

    Args:
        ad_account_id: Microsoft ad account id (from list_microsoft_ads_accounts).
            Empty uses microsoft_ads.ad_account_id from the config.
        include_targeting: Read each campaign's location criteria (three
            calls per campaign); default true.
get_microsoft_conversion_setuptool Audit Microsoft Advertising conversion tracking: UET tags, conversion goals, campaign goals and conversions against clicks.FilesCredentialsEnv varsSensitive pathsoutside text
Audit Microsoft Advertising conversion tracking: UET tags, conversion goals, campaign goals and conversions against clicks.

    Returns a verdict (ok, needs attention, broken) with checks[]: a UET tag
    exists and is active; active goals exist, record conversions and count in
    Conversions (not only All conversions); campaign-level goals; campaigns
    with many clicks and no conversion. Also returns the tags, goals and
    per-campaign clicks and conversions.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        date_range_start: First day of the activity window, YYYY-MM-DD.
        date_range_end: Last day (inclusive). Empty means yesterday.
        min_clicks: Clicks from which a campaign without conversions is
            flagged (default 30).
get_microsoft_keywordstool List Microsoft Advertising keywords with match type, bid, status and editorial review, plus the status of their ad group and campaign.FilesCredentialsEnv varsSensitive pathsoutside text
List Microsoft Advertising keywords with match type, bid, status and editorial review, plus the status of their ad group and campaign.

    Insights flag disapproved keywords and active broad-match keywords in
    campaigns without conversion-based bidding (manual bids or Maximize Clicks).

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign; empty means every campaign.
        ad_group_id: Limit to one ad group; empty means every ad group.
get_microsoft_location_performancetool Where Microsoft Advertising clicks and spend came from, split into people physically there and people searching about the place.FilesCredentialsEnv varsSensitive pathsoutside text
Where Microsoft Advertising clicks and spend came from, split into people physically there and people searching about the place.

    Rows per location with impressions, clicks, spend and conversions, and
    the share of spend from 'location of interest' traffic (people elsewhere
    searching about the area), which a local service business usually does
    not want.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        date_range_start: First day, YYYY-MM-DD. Empty means 29 days before
            date_range_end.
        date_range_end: Last day (inclusive). Empty means yesterday.
        campaign_id: Limit to one campaign; empty means the whole account.
        group_by: "city" (default), "metro", "state", "postal_code" or
            "most_specific".
get_microsoft_negative_keywordstool List Microsoft Advertising negative keywords: those directly on campaigns and the shared negative keyword lists.FilesCredentialsEnv varsSensitive pathsoutside text
List Microsoft Advertising negative keywords: those directly on campaigns and the shared negative keyword lists.

    Each list shows its keywords, the campaigns it is attached to and a
    remove_id per keyword; direct negatives also carry a remove_id.
    Insights flag direct negatives and lists attached to nothing.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign and the lists attached to it.
get_microsoft_performancetool Microsoft Advertising performance: spend, impressions, clicks, CTR, CPC, conversions, CPA, revenue, impression share.FilesCredentialsEnv varsSensitive pathsoutside text
Microsoft Advertising performance: spend, impressions, clicks, CTR, CPC, conversions, CPA, revenue, impression share.

    Rows per entity for the chosen level with the status of each level,
    totals and insights (zero-conversion spenders, converters losing
    impressions to budget, spend under paused levels). Campaign and ad
    group rows without a breakdown include impression share and the share
    lost to budget and to rank. Built from a Microsoft report, which takes a
    few seconds.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        level: "account", "campaign" (default), "ad_group", "keyword" or "ad".
        date_range_start: First day, YYYY-MM-DD, account time zone. Empty
            means 29 days before date_range_end.
        date_range_end: Last day (inclusive). Empty means yesterday.
        breakdown: Optional "date" (daily rows) or "device".
        campaign_id: Limit to one campaign; empty means the whole account.
        compact: Totals, top 10 rows by spend and zero-conversion spenders
            instead of every row.
get_microsoft_search_termstool Microsoft Advertising search terms: what people typed, the keyword and match type it matched, clicks, spend and conversions.FilesCredentialsEnv varsSensitive pathsoutside text
Microsoft Advertising search terms: what people typed, the keyword and match type it matched, clicks, spend and conversions.

    Insights name terms with clicks and no conversion (negative keyword
    candidates) and exact/phrase keywords matching broadly as close
    variants. compact returns the top 25 terms by spend, the waste
    candidates and the top converters.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        date_range_start: First day, YYYY-MM-DD. Empty means 29 days before
            date_range_end.
        date_range_end: Last day (inclusive). Empty means yesterday.
        campaign_id: Limit to one campaign; empty means the whole account.
        min_clicks: Clicks from which a term without conversions counts as a
            waste candidate (default 2).
        compact: Summary instead of every term.
get_negative_keyword_list_campaignstool List which campaigns a shared negative keyword list is attached to.FilesCredentialsEnv varsSensitive pathsoutside text
List which campaigns a shared negative keyword list is attached to.

    Returns each list-to-campaign attachment with the list and campaign IDs
    and names.

    Args:
        shared_set_id: Numeric ID from get_negative_keyword_lists. When
            omitted, returns all list-to-campaign attachments across the account.
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_negative_keyword_list_keywordstool List the keywords inside a shared negative keyword list.FilesCredentialsEnv varsSensitive pathsoutside text
List the keywords inside a shared negative keyword list.

    Returns each negative keyword's text, match type, and a resource_id
    ("sharedSetId~criterionId"), with the total keyword count.

    Args:
        shared_set_id: Numeric ID from get_negative_keyword_lists (shared_set.id).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_negative_keyword_liststool List all shared negative keyword lists (SharedSets) in the account.FilesCredentialsEnv varsSensitive pathsoutside text
List all shared negative keyword lists (SharedSets) in the account.

    Returns each list's ID, name, status, and keyword count. Useful before
    propose_negative_keyword_list: a suitable list may already exist and
    just need attaching to a campaign.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_negative_keywordstool List existing negative keywords for a campaign or all campaigns.FilesCredentialsEnv varsSensitive pathsoutside text
List existing negative keywords for a campaign or all campaigns.

    Shows the existing negatives, which reveals duplicates before new
    negative keywords are added. Returns each negative's campaign, keyword
    text, match type, and a resource_id ("campaignId~criterionId") as taken
    by remove_entity, plus the total count.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        campaign_id: Numeric campaign ID to filter by. If empty, returns
            negatives across all campaigns.
get_pmax_assetstool List the assets of Performance Max campaigns with type, status and content.FilesCredentialsEnv varsSensitive pathsoutside text
List the assets of Performance Max campaigns with type, status and content.

    Returns each asset's field_type (HEADLINE, DESCRIPTION, MARKETING_IMAGE,
    YOUTUBE_VIDEO, etc.), primary_status (ELIGIBLE, NOT_ELIGIBLE, PAUSED,
    PENDING), and content (text or image URL), plus by_status and
    by_field_type summaries.

    Per-asset performance labels (BEST/GOOD/LOW) are not available for
    PMax assets in the Google Ads API. get_detailed_asset_performance reports
    which asset combinations Google selects most — the closest proxy for
    individual asset quality.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        campaign_id: Optional numeric ID to filter to a single PMax campaign.
get_pmax_performancetool Get Performance Max campaign and asset group performance.FilesCredentialsEnv varsSensitive pathsoutside text
Get Performance Max campaign and asset group performance.

    Returns two result sets. campaigns: PMax campaign metrics broken down by
    ad_network_type (SEARCH, CONTENT, YOUTUBE_SEARCH, YOUTUBE_WATCH, MIXED).
    MIXED is a catch-all that Google uses for most PMax traffic — full channel
    splits are not available via the API. asset_groups: per-asset-group
    metrics including ad_strength (EXCELLENT, GOOD, AVERAGE, POOR).

    Includes insights flagging weak ad strength, zero-conversion asset groups,
    and network type distribution.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
get_recommendation_subscriptionstool List the recommendation types Google applies automatically (auto-apply).FilesCredentialsEnv varsSensitive pathsoutside text
List the recommendation types Google applies automatically (auto-apply).

    A subscription makes Google apply every new recommendation of its type
    without asking, so changes reach the account with no preview. Returns each
    subscription's type, status (ENABLED or PAUSED), create_date_time and
    modify_date_time. A type that is not listed is not auto-applied.
    insights[] names every ENABLED type and flags one modified in the last 30
    days, so a recurring audit can catch auto-apply being switched on.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_recommendationstool Retrieve Google's auto-generated recommendations with estimated impact.FilesCredentialsEnv varsSensitive pathsoutside text
Retrieve Google's auto-generated recommendations with estimated impact.

    Returns each recommendation's ID, type, associated campaign/ad group,
    current (base) and projected (potential) metrics, and the estimated
    improvement. Includes insights that flag budget-increase recommendations
    (their projected gain comes from spending more) and highlight high-impact
    suggestions. The `recommendation.id` is what draft_dismiss_recommendations
    takes.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        recommendation_types: Optional filter of Google Ads RecommendationType
            names, e.g. ["KEYWORD", "TARGET_CPA_OPT_IN",
            "MAXIMIZE_CONVERSIONS_OPT_IN", "RESPONSIVE_SEARCH_AD"].
            Empty = all types.
        campaign_id: Optional numeric campaign ID to scope to a single campaign.
get_reddit_account_historytool Who changed what in the Reddit ad account: field, before/after, member, time.FilesCredentialsEnv varsSensitive pathsoutside text
Who changed what in the Reddit ad account: field, before/after, member, time.

    Returns the changes, most recent first, with changed_at, by, entity type,
    id and name, field, and before/after values. The first thing to check
    when performance moves. Child entities are included when filtering by
    entity. Changes made through AdLoop show under the connected Reddit user,
    like changes made in Ads Manager. Money fields are in account currency.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        date_range_start: First day, YYYY-MM-DD (account-local day). Empty
            means 29 days before date_range_end (default window is the last
            30 days).
        date_range_end: Last day (inclusive), YYYY-MM-DD (account-local day).
            Empty means today.
        entity_type: Optional filter to one entity type: "campaign",
            "ad_group" or "ad". Requires entity_ids.
        entity_ids: Ids of the entities of entity_type to filter to; required
            when entity_type is set.
        limit: Maximum number of changes returned, clamped to 1-500.
get_reddit_ad_groupstool List Reddit ad groups (budget, bid, pixel, weekly schedule, targeting summary), optionally per campaign.FilesCredentialsEnv varsSensitive pathsoutside text
List Reddit ad groups (budget, bid, pixel, weekly schedule, targeting summary), optionally per campaign.

    Returns the account currency, the ad groups, and insights. Reddit
    requires conversion_pixel_id on every ad group; insights flag ad groups
    without one and name ad groups that run on a weekly schedule.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        campaign_id: Reddit campaign id (from get_reddit_campaigns) to limit
            the list to; empty lists every ad group of the account.
get_reddit_adstool List Reddit ads with status, rejection_reason, post and click URL.FilesCredentialsEnv varsSensitive pathsoutside text
List Reddit ads with status, rejection_reason, post and click URL.

    Returns the ads and insights: insights flag REJECTED ads (policy review)
    and ads still PENDING_APPROVAL.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        ad_group_id: Reddit ad group id (from get_reddit_ad_groups) to limit
            the list to; empty means no ad group filter.
        campaign_id: Reddit campaign id (from get_reddit_campaigns) to limit
            the list to; empty means no campaign filter.
        include_copy: When true, adds each ad's post: type (TEXT, IMAGE,
            VIDEO, CAROUSEL), headline, body, destination and media, one
            request per distinct post (at most 50 posts per call), so creative
            can be reviewed without opening Reddit.
get_reddit_audiencestool Reddit custom and saved audiences of the account, and which ad groups use them.FilesCredentialsEnv varsSensitive pathsoutside text
Reddit custom and saved audiences of the account, and which ad groups use them.

    Returns each custom audience's audience_id, name, type (PIXEL_RETARGETING,
    ENGAGEMENT_RETARGETING, CUSTOMER_LIST, LOOKALIKE, ...), status, estimated
    size_range, its source (pixel events or campaigns, lookback days) and the
    ad groups that target or exclude it; saved audiences with their
    targeting; and insights that flag audiences Reddit cannot use yet or that
    are too small to deliver. The audience_id goes into custom_audience_ids or
    excluded_custom_audience_ids on an ad group.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
get_reddit_campaignstool List Reddit campaigns with status, objective, budget mode and bids.FilesCredentialsEnv varsSensitive pathsoutside text
List Reddit campaigns with status, objective, budget mode and bids.

    Returns the account currency, the campaigns, and insights for campaigns
    blocked by account state. Each campaign carries configured_status (what
    was set) and effective_status (what Reddit computes: PENDING_APPROVAL,
    REJECTED, PENDING_BILLING_INFO, ...). Money is in account currency.
    Budgets live on ad groups unless is_campaign_budget_optimization is true.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        include_archived: Include ARCHIVED and DELETED campaigns, which are
            left out by default.
get_reddit_performancetool Reddit Ads performance: spend, impressions, clicks, CTR, CPC, conversions, CPA, ROAS.FilesCredentialsEnv varsSensitive pathsoutside text
Reddit Ads performance: spend, impressions, clicks, CTR, CPC, conversions, CPA, ROAS.

    Returns rows per entity for the chosen level with names joined, plus
    totals and insights[] (zero-conversion spenders, rejected ads, empty
    windows). 'conversions' is the account's key conversion event. Money is
    in account currency. Data lags up to 6 hours.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        level: Row granularity: "account", "campaign" (default), "ad_group"
            or "ad".
        date_range_start: First day, YYYY-MM-DD, in the account's time zone.
            Empty means 29 days before date_range_end (a 30-day window).
        date_range_end: Last day (inclusive), YYYY-MM-DD, in the account's
            time zone. Empty means today.
        breakdown: Optional extra dimension: "date", "hour", "country",
            "region", "community", "keyword", "interest", "placement",
            "gender" or "os_type". Empty means none.
        compact: When true, returns totals + top-10 rows by spend + offender
            lists instead of every row.
get_reddit_pixelstool Reddit pixels of the account and when each event (purchase, sign_up, lead, ...) last fired.FilesCredentialsEnv varsSensitive pathsoutside text
Reddit pixels of the account and when each event (purchase, sign_up, lead, ...) last fired.

    Returns each pixel's pixel_id, name, last_fired_at per standard event,
    custom events and a never_fired flag, plus insights. Relevant before
    conversion-optimized campaigns: insights flag pixels that never fired and
    ad groups optimizing for an event their pixel has never sent. Every new
    ad group needs a conversion_pixel_id from here.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
get_search_termstool Get search terms report — what users actually typed before clicking your ads.FilesCredentialsEnv varsSensitive pathsoutside text
Get search terms report — what users actually typed before clicking your ads.

    Critical for finding negative keyword opportunities and understanding user
    intent. Returns search term, campaign, ad group, impressions, clicks,
    conversions.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews), returns totals, the top-10
            terms by clicks, ready-made negative-keyword waste candidates
            (5+ clicks, zero conversions), and top converters (~90% smaller).
get_shopping_product_performancetool Spend, clicks, conversions, CPA and ROAS per product across Shopping and Performance Max.FilesCredentialsEnv varsSensitive pathsoutside text
Spend, clicks, conversions, CPA and ROAS per product across Shopping and Performance Max.

    Each product (item id) is summed over the campaigns it ran in. Returns
    the account totals, the top products by spend, and the products that
    spent without a conversion, with insights on what to do with them.

    Args:
        date_range_start: Start date "YYYY-MM-DD". Both dates empty means
            the last 30 days.
        date_range_end: End date "YYYY-MM-DD" (inclusive).
        campaign_id: Optional numeric campaign id to limit the report to.
        limit: Maximum number of products to return (1-200, default 50).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
get_tracking_eventstool List all GA4 events and their volume for the given date range.FilesCredentialsEnv varsSensitive pathsoutside text
List all GA4 events and their volume for the given date range.

    Returns every distinct event name with its total event count, sorted by
    count (highest first). Shows what tracking is configured and active.

    Args:
        date_range_start: Start date: "today", "yesterday", "NdaysAgo" (e.g.
            "28daysAgo"), or "YYYY-MM-DD".
        date_range_end: End date, same formats as date_range_start.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
health_checktool Test AdLoop connectivity — checks OAuth token, GA4 API, Google Ads API,FilesCredentialsEnv varsSensitive pathsoutside text
Test AdLoop connectivity — checks OAuth token, GA4 API, Google Ads API,
    and (when configured) the Reddit Ads and Microsoft Advertising APIs.

    Returns the status of each service and actionable guidance when something
    is broken, which makes it the diagnostic for failures in other tools.
landing_page_analysistool Analyze which landing pages convert and which don't.FilesCredentialsEnv varsSensitive pathsoutside text
Analyze which landing pages convert and which don't.

    Combines ad final URLs with GA4 page-level data. Returns paid traffic
    sessions, conversion rates, bounce rates, and engagement per landing page,
    and identifies pages that get ad clicks but zero conversions and orphaned
    URLs.

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
link_asset_to_customertool Draft linking existing assets at account level — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft linking existing assets at account level — returns a PREVIEW.

    Account-level assets serve on every eligible campaign that has no asset
    of the same type linked at campaign or ad-group level. Each asset is
    checked to exist and to match its field type. Returns a preview with a
    plan_id.

    Args:
        links: Dicts with "asset_id" (numeric) and "field_type", one of
            BUSINESS_NAME, BUSINESS_LOGO, CALL, CALLOUT, HOTEL_CALLOUT,
            MOBILE_APP, PRICE, PROMOTION, SITELINK, STRUCTURED_SNIPPET.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
list_accountstool List accessible Google Ads accounts.FilesCredentialsEnv varsSensitive pathsoutside text
List accessible Google Ads accounts.

    Returns account names, IDs, status, and whether each is a manager account.
    When more accounts exist than `limit`, the response has
    'truncated: true'; a much higher limit (e.g. list_accounts(limit=1000))
    returns the full list. Workflows that target a specific account need no
    enumeration at all: get_campaign_performance, run_gaql, etc. take
    customer_id directly.

    Args:
        limit: Maximum number of accounts listed under the manager (MCC)
            account. The default cap of 200 covers the vast majority of agency
            MCCs in one call.
list_ga4_annotationstool List a GA4 property's annotations, the notes GA4 shows on a date or date range in its charts.FilesCredentialsEnv varsSensitive pathsoutside text
List a GA4 property's annotations, the notes GA4 shows on a date or date range in its charts.

    Returns each annotation's ID (resource name), title, description, color,
    and its date or start and end date, newest first; Google's own
    annotations are marked system_generated. With a date range, only the
    annotations that overlap it. The first stop for "what happened on that
    day?" next to get_change_history in Google Ads. Reads the GA4 Admin API
    v1alpha (reportingDataAnnotations.list).

    Args:
        date_range_start: Optional start: "today", "yesterday", "NdaysAgo" or
            "YYYY-MM-DD". Set together with date_range_end.
        date_range_end: Optional end, same formats.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_ga4_audiencestool List a GA4 property's audiences and check whether they reach Google Ads.FilesCredentialsEnv varsSensitive pathsoutside text
List a GA4 property's audiences and check whether they reach Google Ads.

    GA4 shares its audiences with every linked Google Ads account that
    allows personalized advertising; there they are remarketing lists
    (get_audience_lists) that draft_audience_attachment puts on a campaign.
    Returns each audience's resource name, display name, description,
    membership duration and what includes or excludes users: events,
    pages (include_pages / exclude_pages: the URL contains the text) or
    a sequence of steps (audiences built with other conditions in GA4's
    editor carry
    custom_conditions and the raw conditions; "All Users" and "Purchasers",
    which GA4 creates itself, carry predefined), the audience slots used
    against the limit (100, or 400 on a 360 property), and
    google_ads_readiness: checks for the Google Ads link, personalized
    advertising on it, Google signals, consent and list size, each with a
    status (ok, warn or info). insights repeats the warnings. Reads the GA4
    Admin API (audiences.list, googleAdsLinks.list, googleSignalsSettings).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_ga4_custom_definitionstool List a GA4 property's custom dimensions and custom metrics, with how many slots are left.FilesCredentialsEnv varsSensitive pathsoutside text
List a GA4 property's custom dimensions and custom metrics, with how many slots are left.

    Returns each custom dimension's resource name, parameter name, display
    name, scope (EVENT, USER or ITEM) and description, and each custom
    metric's resource name, parameter name, display name, measurement unit
    and description, plus usage per kind against the property's limit
    (standard: 50 event, 25 user, 10 item dimensions, 50 metrics; 360:
    125, 100, 25, 125). Use it before draft_ga4_custom_dimension or
    draft_ga4_custom_metric. For the field names to use in reports, see
    list_ga4_dimensions_and_metrics. Reads the GA4 Admin API
    (customDimensions.list, customMetrics.list).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_ga4_dimensions_and_metricstool List the dimensions and metrics a GA4 property can report on, including custom ones.FilesCredentialsEnv varsSensitive pathsoutside text
List the dimensions and metrics a GA4 property can report on, including custom ones.

    Returns the exact API names valid in run_ga4_report for this property:
    each with its UI name, category, whether it is a custom definition
    (customEvent:..., customUser:...), and deprecated API names; metrics
    also carry their type and, for calculated metrics, the expression.
    Reads the GA4 Data API metadata (properties.getMetadata), which uses no
    report quota.

    Args:
        search: Case-insensitive text matched against API name, UI name,
            category, description and deprecated API names (e.g. "channel",
            "revenue", or the legacy "conversions", which finds keyEvents).
            Empty returns everything.
        kind: "all" (default), "dimensions" or "metrics".
        custom_only: True returns only the property's custom dimensions and
            metrics.
        include_descriptions: Include each field's description. Defaults to
            true when search is set and false otherwise (the full list is
            long).
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_gsc_sitestool List all Google Search Console properties the authenticated user can access.FilesCredentialsEnv varsSensitive pathsoutside text
List all Google Search Console properties the authenticated user can access.

    Serves as the discovery step for the site URLs that search analytics
    reports (run_gsc_report) take. Returns the site URL and permission level
    for each property.
list_gtm_accountstool List all GTM accounts the AdLoop service account / OAuth user can read.FilesCredentialsEnv varsSensitive pathsoutside text
List all GTM accounts the AdLoop service account / OAuth user can read.

    The first-time discovery step: provides the account_id that
    audit_event_coverage takes. Returns each account's ID and name. An empty
    list means the service account hasn't been added to any GTM container
    with at least Read permission.
list_gtm_containerstool List all containers under a GTM account.FilesCredentialsEnv varsSensitive pathsoutside text
List all containers under a GTM account.

    Returns container_id (the numeric ID needed by audit_event_coverage),
    public_id (the GTM-XXXXXXX string shown in the UI), name, and usage
    context (web / iOS / Android / amp / server).

    Args:
        gtm_account_id: Numeric GTM account ID from list_gtm_accounts. Empty
            uses gtm.account_id from the config; the tool errors when neither
            is set.
list_gtm_tagstool List every tag in the LIVE GTM container, or in one workspace.FilesCredentialsEnv varsSensitive pathsoutside text
List every tag in the LIVE GTM container, or in one workspace.

    Each tag includes type, status, parsed parameters, the GA4 event name
    (for GA4 event tags), and resolved firing/blocking trigger names.
    Complements audit_event_coverage for inspecting specific tags. With
    workspace_id the list shows that workspace's unpublished state, so a
    just-drafted tag is visible; `source` says which state was read.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers),
            not the GTM-XXXXXXX public ID. Empty uses gtm.container_id from
            the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
list_gtm_triggerstool List every trigger in the LIVE GTM container, or in one workspace.FilesCredentialsEnv varsSensitive pathsoutside text
List every trigger in the LIVE GTM container, or in one workspace.

    Each trigger has its filter conditions parsed to readable text
    (e.g. "{{Page Path}} matches RegExp ^/service-promotions/"). Helps
    diagnose why a tag fires or doesn't fire on specific pages. With
    workspace_id the list shows that workspace's unpublished state.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
list_gtm_variablestool List GTM variables — both custom and enabled built-in.FilesCredentialsEnv varsSensitive pathsoutside text
List GTM variables — both custom and enabled built-in.

    Without workspace_id both come from the live container version (the
    Default Workspace supplies the built-ins only when the live version lists
    none; built_in_source names where they came from). With workspace_id both
    come from that workspace's unpublished state. Variables matter because
    triggers reference them: if a trigger uses {{Form ID}} but Form ID isn't
    enabled, the trigger never matches.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
list_gtm_versionstool List GTM container version headers (newest first).FilesCredentialsEnv varsSensitive pathsoutside text
List GTM container version headers (newest first).

    Version headers include version_id, name, archived flag and entity
    counts. The Tag Manager API returns no creation or publish time and no
    author for a version, and does not mark which versions were published;
    get_gtm_version returns a version's notes and get_gtm_version_diff what
    changed between two versions.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        page_size: Maximum number of version headers returned (newest first).
list_gtm_workspacestool List workspaces (drafts) under a GTM container.FilesCredentialsEnv varsSensitive pathsoutside text
List workspaces (drafts) under a GTM container.

    Returns each workspace's ID, name and description; the IDs are what
    `get_gtm_workspace_diff` takes. Most containers have a single Default
    Workspace; multiple workspaces appear when the team uses parallel drafts.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
list_key_eventstool List the key events (conversions) configured on a GA4 property.FilesCredentialsEnv varsSensitive pathsoutside text
List the key events (conversions) configured on a GA4 property.

    Returns each key event's event name, counting method (ONCE_PER_EVENT or
    ONCE_PER_SESSION), create time, whether GA4 allows deleting it, whether
    it is a custom event, and its resource name, sorted by event name, plus
    the total. Reads the GA4 Admin API (keyEvents.list).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID (see get_account_summaries). If empty, uses the
            default from config.
list_merchant_accountstool List Google Merchant Center accounts the connected user can access.FilesCredentialsEnv varsSensitive pathsoutside text
List Google Merchant Center accounts the connected user can access.

    Returns each account's numeric ID, name and whether it is a test
    account. Provides the account_id used by get_merchant_feed_health;
    not needed when merchant.account_id is set in the config.
list_microsoft_ads_accountstool List the Microsoft Advertising (Bing) ad accounts the signed-in user can reach.FilesCredentialsEnv varsSensitive pathsoutside text
List the Microsoft Advertising (Bing) ad accounts the signed-in user can reach.

    Returns the user, their customers (manager accounts) with roles, and per
    ad account the ad_account_id, customer_id, name, number, currency, time
    zone and status that the other Microsoft tools take.
list_reddit_accountstool List Reddit businesses and ad accounts the connected Reddit user can access.FilesCredentialsEnv varsSensitive pathsoutside text
List Reddit businesses and ad accounts the connected Reddit user can access.

    Returns the Reddit username, the businesses, and per ad account the
    ad_account_id values (plus currency, time zone and approval state) that
    every other Reddit tool takes. Requires the Reddit Ads connection
    (adloop init → Reddit step, or Settings → Reddit Ads in Cloud).
list_reddit_funding_instrumentstool Funding instruments (billing) and posting profiles of a Reddit ad account.FilesCredentialsEnv varsSensitive pathsoutside text
Funding instruments (billing) and posting profiles of a Reddit ad account.

    Returns funding_instruments (funding_instrument_id, currency, is_servable,
    reasons_not_servable, credit limit and billable amount in account
    currency) and profiles (profile_id, username). draft_reddit_campaign needs
    a servable funding_instrument_id; draft_reddit_ad needs the profile_id
    that authors the post. Both come from here.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
list_uploadstool List the files the user uploaded to AdLoop that have not expired.
List the files the user uploaded to AdLoop that have not expired.

    Returns each upload's upload_id, kind (image or csv), name, type, size,
    dimensions (images) or lines (CSVs) and hours until it expires: images
    last a day, conversion CSVs two hours or until a draft reads them. The
    ids of files the user sent through an upload link show up here.
pause_entitytool Draft pausing a campaign, ad group, ad, or keyword — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft pausing a campaign, ad group, ad, or keyword — returns a PREVIEW.

    Pausing is reversible with enable_entity. Returns a preview with a plan_id
    (target status PAUSED); nothing changes until confirm_and_apply applies it.

    Args:
        entity_type: "campaign", "ad_group", "ad", "keyword" or
            "asset_group" (Performance Max).
        entity_id: ID in the format for its type. campaign: campaign ID (e.g.
            "12345678"); ad_group: ad group ID (e.g. "12345678"); ad:
            "adGroupId~adId" (e.g. "12345678~987654"; a bare ad ID is resolved
            to its ad group at apply time); keyword: "adGroupId~criterionId"
            (e.g. "12345678~987654").
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
pause_microsoft_entitytool Draft pausing a Microsoft Advertising campaign, ad group, keyword or ad (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft pausing a Microsoft Advertising campaign, ad group, keyword or ad (preview only).

    The preview names the entity, its campaign and ad group, and its current
    status. The returned plan_id is applied with confirm_and_apply, which
    refuses if the status changed since the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        entity_type: "campaign", "ad_group", "keyword" or "ad".
        entity_id: The entity's id (from the read tools).
        parent_id: Optional: the campaign id of an ad group, or the ad group
            id of a keyword or ad, to find it faster.
pause_reddit_entitytool Draft pausing a Reddit campaign, ad group or ad — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft pausing a Reddit campaign, ad group or ad — returns a PREVIEW.

    Returns a preview with a plan_id, the current and target status (PAUSED)
    and warnings (e.g. already paused); nothing changes until
    confirm_and_apply applies the plan_id.

    Args:
        entity_type: "campaign", "ad_group" or "ad".
        entity_id: Reddit id of the entity, from the read tools
            (get_reddit_campaigns, get_reddit_ad_groups, get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
propose_brand_listtool Draft a brand list and optionally attach it to campaigns — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a brand list and optionally attach it to campaigns — returns a PREVIEW.

    Creates a SharedSet of type BRANDS, fills it with brands, and — when
    campaign_ids is given — attaches it to those campaigns.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        list_name: Name for the new list, as it should appear in Google Ads.
        brand_ids: Commercial Knowledge Graph MIDs — the `id` field from
            suggest_brands / check_brand_names, which resolve names; a
            display name alone cannot be written. Duplicates are dropped.
        campaign_ids: Optional numeric campaign IDs. When omitted, the list is
            created without being used yet; attach_brand_list_to_campaigns
            attaches it later.
        negative: True (default) excludes the brands from those campaigns;
            False restricts targeting to them instead.
        customer_id: Ads account ID. Defaults to the configured account.
propose_microsoft_negative_keyword_listtool Draft a new shared Microsoft Advertising negative keyword list and attach it to campaigns (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new shared Microsoft Advertising negative keyword list and attach it to campaigns (preview only).

    Refuses a name that already exists (add_to_microsoft_negative_keyword_list
    appends to it) and campaigns already at Microsoft's 20-list limit; the
    preview names active keywords the negatives would block. The returned
    plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_name: List name.
        keywords: Negative keyword texts (up to 5,000).
        match_type: Phrase (default) or Exact.
        campaign_ids: Campaigns to attach the list to.
propose_negative_keyword_listtool Draft a shared negative keyword list and attach it to a campaign — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft a shared negative keyword list and attach it to a campaign — returns a PREVIEW.

    Creates a reusable negative keyword list (shared set) that can later be
    applied to multiple campaigns, whereas add_negative_keywords adds negatives
    directly to one campaign. Returns a preview with a plan_id; nothing changes
    until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the campaign the new list is attached to.
        list_name: Name of the new shared negative keyword list.
        keywords: Negative keyword texts to put in the list (at least one).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        match_type: Match type applied to every keyword: "EXACT" (default),
            "PHRASE", or "BROAD" (case-insensitive).
remove_entitytool Draft REMOVING an entity — returns a PREVIEW. This is IRREVERSIBLE.FilesCredentialsEnv varsSensitive pathsoutside text
Draft REMOVING an entity — returns a PREVIEW. This is IRREVERSIBLE.

    Removed entities cannot be re-enabled; pause_entity is the reversible way
    to temporarily disable something. Returns a preview with a plan_id and
    requires_double_confirm=true; nothing changes until confirm_and_apply
    applies it.

    Args:
        entity_type: "campaign", "ad_group", "ad", "keyword", "asset_group",
            "negative_keyword", "shared_criterion", "campaign_asset",
            "ad_group_asset", "asset", "customer_asset", "ad_group_criterion", or
            "campaign_criterion".
        entity_id: The resource ID. campaign / ad_group / asset_group / asset: simple numeric
            ID. ad: "adGroupId~adId" (a bare ad ID is resolved to its ad group).
            keyword and ad_group_criterion: "adGroupId~criterionId".
            negative_keyword and campaign_criterion: "campaignId~criterionId"
            (the resource_id field from get_negative_keywords).
            shared_criterion: "sharedSetId~criterionId" (the resource_id field
            from get_negative_keyword_list_keywords). campaign_asset:
            "campaignId~assetId~fieldType". ad_group_asset:
            "adGroupId~assetId~fieldType". customer_asset: "assetId~fieldType".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
remove_from_brand_listtool Remove brands from a brand list — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Remove brands from a brand list — returns a PREVIEW.

    SharedCriteria have no status field, so removal is the only way to take a
    brand out of a list — there is nothing to pause. Removing a brand does not
    detach the list from any campaign.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        criterion_ids: Numeric criterion_id values from get_brand_list_brands.
            This is irreversible — the brand leaves the list immediately.
        customer_id: Ads account ID. Defaults to the configured account.
remove_microsoft_entitytool Draft deleting a Microsoft Advertising entity: irreversible, double confirmation (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft deleting a Microsoft Advertising entity: irreversible, double confirmation (preview only).

    Removes a campaign, ad group, ad or keyword by id, or (by the remove_id
    the read tools return) a direct negative keyword, a negative list item,
    a location or schedule criterion, or an extension link (account,
    campaign or ad group, image extensions included). A criterion is read
    and named first; the last targeted location is refused (the campaign
    would serve everywhere; update_microsoft_campaign_targeting replaces
    the whole list). Pausing keeps
    history and can be undone. The returned plan_id is applied with
    confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        entity_type: campaign, ad_group, ad, keyword, negative_keyword,
            negative_list_item, campaign_criterion or extension_association.
        entity_id: The id, or the remove_id for the composite types.
remove_reddit_entitytool Draft ARCHIVING a Reddit campaign, ad group or ad — irreversible, PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft ARCHIVING a Reddit campaign, ad group or ad — irreversible, PREVIEW.

    Reddit has no hard delete for entities that ran; ARCHIVED is permanent.
    pause_reddit_entity is the reversible alternative when the entity does
    not need to be gone. Returns a preview with a plan_id that requires
    double confirmation; confirm_and_apply executes it.

    Args:
        entity_type: "campaign", "ad_group" or "ad".
        entity_id: Reddit id of the entity, from the read tools
            (get_reddit_campaigns, get_reddit_ad_groups, get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
run_ga4_attributiontool Show which channels, campaigns or sources get the credit for conversions under GA4's attribution models, or compare data-driven with last click.FilesCredentialsEnv varsSensitive pathsoutside text
Show which channels, campaigns or sources get the credit for conversions under GA4's attribution models, or compare data-driven with last click.

    The view of GA4's Advertising workspace: conversions, revenue, ad cost
    and ROAS per channel (or campaign, source, country, device) attributed
    by the model, not by session. attribution_model COMPARE runs data-driven
    and last click side by side and returns each row's share of the credit
    under both and the shift in percentage points, with insights naming the
    channels that gain or lose most. Conversions can be named by key event
    name; empty means all. Uses the GA4 Data API v1alpha (runReport with a
    conversion spec), which Google is still rolling out: a property without
    it gets an explanation and the fallback. Ad cost and ROAS need Google
    Ads linked to the property.

    Args:
        dimensions: Any of campaignName, continent, country,
            defaultChannelGroup (default), deviceCategory, medium, platform,
            primaryChannelGroup, source, sourceMedium, sourcePlatform,
            subcontinent.
        metrics: Any of allConversionsByConversionDate,
            allConversionsByInteractionDate, totalRevenueByConversionDate,
            totalRevenueByInteractionDate, advertiserAdCost,
            advertiserAdClicks, advertiserAdImpressions,
            advertiserAdCostPerClick,
            advertiserAdCostPerAllConversionsByConversionDate,
            advertiserAdCostPerAllConversionsByInteractionDate,
            returnOnAdSpendByConversionDate, returnOnAdSpendByInteractionDate.
            Default: conversions, revenue, ad cost and ROAS by conversion date.
        date_range_start: "today", "yesterday", "NdaysAgo" or "YYYY-MM-DD".
        date_range_end: Same formats.
        conversions: Key event names (e.g. ["purchase"]) or GA4 conversion
            action IDs ("conversionActions/123"); empty for all.
        attribution_model: DATA_DRIVEN (default), LAST_CLICK, or COMPARE.
        limit: Maximum rows per model.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
run_ga4_funneltool Run a GA4 funnel report: how many users go from one step to the next, and where they drop off.FilesCredentialsEnv varsSensitive pathsoutside text
Run a GA4 funnel report: how many users go from one step to the next, and where they drop off.

    Steps are event names or pages, in order. Returns per step the users,
    completion rate to the next step, abandonments and abandonment rate,
    plus how many started and finished, the overall completion rate and the
    biggest drop (after which step most users leave). With breakdown, the
    same per value of a dimension (e.g. deviceCategory); with next_action,
    the most common next event or page after each step, i.e. what users do
    instead. Uses the GA4 Data API v1alpha (runFunnelReport), the endpoint
    behind GA4's funnel explorations; data reaches back as far as the
    property's data retention.

    Args:
        steps: 2 to 10 steps. Each is an event name ("add_to_cart") or an
            object: {"event": "purchase", "name": "Bought"}, {"page":
            "/checkout"} (page views whose URL contains the text), optional
            "directly_followed": true (no other event in between) and
            "within_minutes": 30 (must follow the previous step within that
            time).
        date_range_start: "today", "yesterday", "NdaysAgo" or "YYYY-MM-DD".
        date_range_end: Same formats.
        open_funnel: False (default) counts only users who start at step 1;
            true lets users enter at any step.
        breakdown: Dimension to split every step by, e.g. deviceCategory,
            sessionDefaultChannelGroup, country.
        breakdown_limit: How many values of the breakdown dimension (1-15).
        next_action: Dimension for "what came next" after each step, e.g.
            eventName or pagePath.
        dimension_filter: Only count users matching these conditions, same
            format as in run_ga4_report, e.g. [{"field": "deviceCategory",
            "value": "mobile"}].
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
run_ga4_reporttool Run a custom GA4 report with optional filters, ordering, paging and a comparison period.FilesCredentialsEnv varsSensitive pathsoutside text
Run a custom GA4 report with optional filters, ordering, paging and a comparison period.

    Returns the property, the date range, the dimension and metric headers,
    one row per dimension combination (values as strings), row_count and
    total_row_count (plus next_offset while more rows remain). At least one
    dimension or metric is required. With compare_start/compare_end the
    comparison period is a second date range: every row then carries a
    dateRange value of "current" or "comparison", and date_ranges maps both
    labels to their dates. Invalid filters or ordering return "Validation
    failed" with details, before anything is sent. insights[] says when GA4
    thresholded or sampled the data, grouped rows into "(other)", or the
    property is close to its API quota, because each makes numbers differ
    from the GA4 interface. Reports over time (a date-type dimension) or
    comparing periods also return the property's annotations in those dates,
    which often explain a jump in the rows.

    Queries the GA4 Data API. Dimensions and metrics:
    https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema

    Args:
        dimensions: GA4 dimension API names, e.g. date, pagePath,
            sessionSource, sessionMedium, country, deviceCategory, eventName.
            Custom ones (customEvent:...) and every valid name are listed by
            list_ga4_dimensions_and_metrics.
        metrics: GA4 metric API names, e.g. sessions, totalUsers, newUsers,
            screenPageViews, keyEvents, eventCount, bounceRate.
        date_range_start: Start date: "today", "yesterday", "NdaysAgo" (e.g.
            "7daysAgo", "28daysAgo", "90daysAgo"), or "YYYY-MM-DD".
        date_range_end: End date, same formats as date_range_start.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        limit: Maximum number of rows returned (positive).
        dimension_filter: Conditions on dimensions, all of which must hold
            (AND). Each is {"field": <dimension>, "op": <match>, "value":
            <string>}; op is EXACT (default), BEGINS_WITH, ENDS_WITH,
            CONTAINS, FULL_REGEXP, PARTIAL_REGEXP, or IN_LIST with "values":
            [<strings>]. Optional keys: "case_sensitive" (default false) and
            "not": true to exclude matches. Example: [{"field":
            "sessionDefaultChannelGroup", "op": "EXACT", "value": "Paid
            Search"}]. For OR, put a group in the list: {"any_of":
            [<conditions>]} matches when any holds, {"all_of": [...]} when
            all hold; groups take "not" too and nest up to three levels.
            Example: [{"any_of": [{"field": "sessionSource", "value":
            "google"}, {"field": "sessionSource", "value": "bing"}]}].
        metric_filter: Conditions on metrics, applied after aggregation, all
            of which must hold (AND). Each is {"field": <metric>, "op": <op>,
            "value": <number>}; op is EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL,
            GREATER_THAN, GREATER_THAN_OR_EQUAL (or =, <, <=, >, >=), or
            BETWEEN with "value": [from, to]. Optional "not": true. Groups
            work as in dimension_filter.
            Example: [{"field": "sessions", "op": ">", "value": 100}].
        order_by: Sort order as [{"field": <name>, "desc": true|false}]; each
            field must be one of the requested dimensions or metrics.
        offset: Zero-based row offset for paging; pass next_offset from the
            previous result to get the following page.
        compare_start: Start of the comparison period (same formats as
            date_range_start). Set together with compare_end.
        compare_end: End of the comparison period.
        date_ranges: Up to four named periods in one report, replacing
            date_range_start/end (not combinable with compare_start/end):
            [{"start": "2026-10-01", "end": "2026-10-31", "name": "october"},
            {"start": "2025-10-01", "end": "2025-10-31", "name":
            "october_last_year"}]. Rows then carry a dateRange value with the
            name. Names default to range_1, range_2, ...
        currency_code: ISO 4217 code (e.g. "EUR") to report revenue and cost
            metrics in that currency instead of the property's own.
run_gaqltool Execute an arbitrary GAQL (Google Ads Query Language) query.FilesCredentialsEnv varsSensitive pathsoutside text
Execute an arbitrary GAQL (Google Ads Query Language) query.

    For queries beyond the dedicated report tools. Returns the result rows
    in the requested format with the query echoed back; cost fields stay in
    raw micros (cost_micros / 1,000,000 = account currency). A failing query
    returns an error with a hint.

    Queries the Google Ads API. GAQL syntax and fields:
    https://developers.google.com/google-ads/api/docs/query/overview

    Args:
        query: The GAQL query, e.g. "SELECT campaign.name, metrics.clicks
            FROM campaign WHERE segments.date DURING LAST_7_DAYS".
        customer_id: Google Ads customer ID, digits with or without dashes
            (123-456-7890). Empty uses the configured default account.
        format: Output format: "table" (default, readable), "json"
            (structured), or "csv" (exportable).
run_gsc_reporttool Run a Google Search Console search analytics report.FilesCredentialsEnv varsSensitive pathsoutside text
Run a Google Search Console search analytics report.

    Returns clicks, impressions, CTR, and average position broken down by
    the requested dimensions. Useful for diagnosing organic traffic drops,
    finding keyword opportunities, and cross-referencing with GA4 and Ads data.
    One request returns at most 25,000 rows; a full page carries
    next_start_row for the following request. With data_state "all" the
    response metadata names the first date whose data is still incomplete.

    Queries the Search Console API:
    https://developers.google.com/webmaster-tools/v1/searchanalytics/query

    Args:
        site_url: The GSC property URL (e.g. "https://example.com/" or
            "sc-domain:example.com"), as listed by list_gsc_sites. Defaults to
            the configured Search Console site (gsc.site_url).
        dimensions: One or more of "query", "page", "country", "device",
            "date", "searchAppearance" (search result feature, e.g. rich
            results) or "hour" (hourly rows for roughly the last 10 days;
            switches data_state to "hourly_all"). Defaults to ["query"].
        date_range_start: Start date as ISO "YYYY-MM-DD" or a relative value
            like "7daysAgo", "30daysAgo", "today".
        date_range_end: End date, same formats as date_range_start.
        limit: Maximum rows to return (default 100, max 25000 per request;
            higher values are capped at 25000).
        search_type: "web" (default), "image", "video", "news", "discover",
            or "googleNews".
        dimension_filter_groups: Optional list of GSC DimensionFilterGroup
            objects to filter by query, page, country, or device, e.g.
            [{"filters": [{"dimension": "query", "operator": "contains",
            "expression": "analytics"}]}]. searchAppearance is filterable too.
        data_state: "final" (default) returns finalized data only; "all"
            adds fresh data from the last days that can still change;
            "hourly_all" is the state the hour dimension uses.
        aggregation_type: "auto" (default), "byPage" (aggregate by canonical
            URL) or "byProperty" (aggregate by property; not combinable with
            grouping or filtering by page).
        start_row: Zero-based offset of the first row, for paging past the
            25,000-row cap (pass the previous response's next_start_row).
run_realtime_reporttool Run a GA4 realtime report showing current active users and events.FilesCredentialsEnv varsSensitive pathsoutside text
Run a GA4 realtime report showing current active users and events.

    Useful for checking if tracking is firing correctly after code changes:
    filter on the event that just shipped, or compare the last few minutes
    with the minutes before. Returns the dimension and metric headers and one
    row per dimension combination over the realtime window (the last 30
    minutes unless minute_ranges says otherwise). When a filter matches
    nothing, insights[] lists the usual causes.

    Args:
        dimensions: GA4 realtime dimension API names, e.g. unifiedScreenName,
            eventName, country, deviceCategory, minutesAgo.
        metrics: GA4 realtime metric API names, e.g. activeUsers, eventCount,
            keyEvents. Defaults to ["activeUsers"].
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        dimension_filter: Same format as in run_ga4_report, e.g.
            [{"field": "eventName", "value": "purchase"}].
        metric_filter: Same format as in run_ga4_report.
        order_by: [{"field": <requested dimension or metric>, "desc": true}].
        limit: Maximum rows; 0 uses GA4's default.
        minute_ranges: Up to two windows, e.g. [{"start_minutes_ago": 4,
            "end_minutes_ago": 0, "name": "last_5"}, {"start_minutes_ago": 29,
            "end_minutes_ago": 5, "name": "before"}]. start_minutes_ago is at
            most 29 on standard properties (59 on 360). With two windows rows
            carry a dateRange value with the window's name.
run_reddit_reporttool Run a custom Reddit Ads report for metrics get_reddit_performance omits.FilesCredentialsEnv varsSensitive pathsoutside text
Run a custom Reddit Ads report for metrics get_reddit_performance omits.

    Returns the requested fields per breakdown row, the date range and the
    account currency. Microcurrency and cent fields are converted to
    currency amounts.

    Queries the Reddit Ads API: https://ads-api.reddit.com/docs/v3/

    Args:
        fields: Reddit report field names (required), e.g. ["SPEND",
            "CLICKS", "REACH", "VIDEO_STARTED",
            "CONVERSION_PURCHASE_TOTAL_VALUE", "KEY_CONVERSION_TOTAL_COUNT"].
        breakdowns: Up to 3 of DATE, HOUR, CAMPAIGN_ID, AD_GROUP_ID, AD_ID,
            COUNTRY, REGION, COMMUNITY, KEYWORD, INTEREST, PLACEMENT, GENDER,
            OS_TYPE (4 when COUNTRY and REGION are both included; HOUR and
            DATE cannot be combined).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        date_range_start: First day, YYYY-MM-DD (account-local day). Empty
            means 29 days before date_range_end (a 30-day window).
        date_range_end: Last day (inclusive), YYYY-MM-DD (account-local day).
            Empty means today.
        filter: Reddit filter expression (e.g. "campaign_id==abc123"). Empty
            means no filter.
        time_zone_id: IANA time zone for the day boundaries and DATE/HOUR
            rows, e.g. "Europe/Berlin". Empty uses the ad account's time zone.
search_audience_segmentstool Find Google's in-market and affinity segments by name, with the segment_id to attach.FilesCredentialsEnv varsSensitive pathsoutside text
Find Google's in-market and affinity segments by name, with the segment_id to attach.

    In-market segments are people actively researching a purchase; affinity
    segments are long-term interests. Matching is on the segment name, in
    English, e.g. "running", "insurance", "travel".

    Args:
        query: Part of the segment name to look for (at least 2 characters).
        kind: "in_market", "affinity" or "all" (default).
        limit: Maximum number of segments to return (1-100, default 25).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
search_microsoft_locationstool Find Microsoft Advertising location ids (countries, states, metros, cities, postal codes) by name.FilesCredentialsEnv varsSensitive pathsoutside text
Find Microsoft Advertising location ids (countries, states, metros, cities, postal codes) by name.

    Reads Microsoft's geographic location file (cached until Microsoft
    publishes a new version) and returns location_id, name, type and
    status, the ids the targeting and new-campaign tools take.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        query: Name or postal code, e.g. "Chicago" or "60601".
        location_type: Optional filter such as "City", "Metro", "State" or "PostalCode".
        limit: Most results (1–100).
search_reddit_targetingtool Look up targeting options for draft_reddit_ad_group.FilesCredentialsEnv varsSensitive pathsoutside text
Look up targeting options for draft_reddit_ad_group.

    Returns ids/names to pass into the targeting lists, with the kind, the
    query and the total number of matches. Communities target by name,
    interests by id, geolocations by id (e.g. "DE" or "DE:2874225"),
    languages by code (e.g. "DE"), carriers by id (e.g. "O2_DEUTSCHLAND").
    Devices come back as make/model pairs for the label_map of a device
    target. Keyword suggestions carry Reddit-wide monthly views, not search
    volume.

    Args:
        kind: What to look up: "communities" (subreddits; query required),
            "interests" (query filters by name), "geolocations" (country ISO
            code and/or city query), "languages" (upper-case ISO 639-1
            codes), "keywords" (comma-separated seed terms → suggestions with
            Reddit-wide monthly views), "community_suggestions" (Reddit's
            related-community picks for seed communities in query and/or a
            website_url), "devices" (device makes and models; query filters
            by make or model) or "carriers" (mobile carrier ids; query
            filters by name, country by country code).
        query: Search text for the chosen kind: a community search term, an
            interest or language name filter, a city name, comma-separated
            seed keywords, comma-separated seed communities for
            community_suggestions (e.g. "PPC,googleads"), a device make or
            model filter, or a carrier name filter.
        country: Country ISO code (e.g. "DE") for kinds "geolocations" and
            "carriers"; ignored for other kinds.
        website_url: Website for kind "community_suggestions"; ignored for
            other kinds.
        limit: Maximum number of results, clamped to 1-100.
store_image_uploadtool Store a file dropped on the AdLoop upload card.Filesoutside text
Store a file dropped on the AdLoop upload card.

    Called only by the upload card; AI apps keep this tool out of the
    model's tool list. Returns the upload's id, type and size (dimensions
    for images, lines for CSVs).

    Args:
        name: The file name, used for the asset name.
        data_base64: The file content, base64-encoded.
        code: The upload card's code from upload_images or
            upload_conversion_csv.
        kind: "image" (default) or "csv" for a conversion CSV.
suggest_brandstool Resolve a brand name to the brands Google recognizes for it.FilesCredentialsEnv varsSensitive pathsoutside text
Resolve a brand name to the brands Google recognizes for it.

    Mirrors the brand picker in the Google Ads UI
    (BrandSuggestionService.SuggestBrands): takes a free-text name such as
    "EscapeGame München" or "NoWayOut" and returns the matching brands with
    their ID, display name, state, and associated URLs.

    The returned brand ID is the Commercial Knowledge Graph ID. Brand
    criteria — brand lists, brand exclusions — target that ID, not a display
    name, so a name is resolved here before it can go into a brand list.

    Args:
        brand_prefix: The brand name to look up, free text (e.g. "NoWayOut").
        selected_brand_ids: Commercial Knowledge Graph MIDs already picked,
            handed back so Google keeps them in the suggestion set while the
            prefix narrows. Optional.
        customer_id: Ads account ID. Defaults to the configured account.
update_ad_grouptool Draft an ad group update for name and/or manual CPC bid — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft an ad group update for name and/or manual CPC bid — returns a PREVIEW.

    A bid change applies only when the campaign uses MANUAL_CPC: automated
    bidding strategies ignore ad-group CPC bids, so such a change is refused
    (for Maximize Clicks the campaign cpc_bid_ceiling, set through
    update_campaign, is the active constraint). Bid increases above the
    configured safety.max_bid_increase_pct are refused. Returns a preview with
    a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        ad_group_id: Numeric ID of the ad group to update.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        ad_group_name: New ad group name. Empty leaves the name unchanged.
        max_cpc: New maximum CPC bid in the account's currency (an amount, not
            micros). 0 leaves the bid unchanged; negative values are rejected.
            At least one of ad_group_name or max_cpc is required.
update_call_assettool Draft changing a call asset in place — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changing a call asset in place — returns a PREVIEW.

    Only the fields passed change. The asset keeps its ID and its links, so
    the change shows everywhere it is linked. The preview shows the current
    values and pins them; an edit in Google Ads before the apply stops it.

    Args:
        asset_id: Numeric ID of the CALL asset.
        phone_number: New number, national or international; needs
            country_code.
        country_code: ISO 3166-1 alpha-2 country of the new number. Required
            with phone_number, and only accepted together with it.
        call_conversion_action_id: Numeric ID of the conversion action that
            counts calls; sets USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.
        call_conversion_reporting_state: DISABLED,
            USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION or
            USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.
        ad_schedule: Windows that replace the number's whole schedule (same
            shape as draft_call_asset). Empty leaves the schedule as it is.
        clear_ad_schedule: True removes the schedule, so the number shows at
            all hours.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
update_callouttool Draft changing a callout asset in place — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changing a callout asset in place — returns a PREVIEW.

    Only what is passed changes. The asset keeps its ID and performance
    history, and the change shows everywhere it is linked. The preview pins
    the current values; if someone edits the asset in Google Ads before the
    apply, nothing is sent.

    Args:
        asset_id: Numeric ID of the callout asset.
        callout_text: The new text, at most 25 characters. Empty keeps it.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        start_date: First day the callout shows, YYYY-MM-DD. Empty keeps it.
        end_date: Last day the callout shows, YYYY-MM-DD. Empty keeps it.
        clear_fields: "start_date" and/or "end_date" to remove that date.
update_campaigntool Draft an update to an existing campaign — returns a PREVIEW, does NOT apply.FilesCredentialsEnv varsSensitive pathsoutside text
Draft an update to an existing campaign — returns a PREVIEW, does NOT apply.

    Only the parameters passed are changed; omitted ones stay as they are, and at
    least one change is required. Replacing geo targets keeps the campaign's
    negative geo exclusions (the preview lists them) unless geo_exclude_ids is
    passed too. A budget change shows the current amount; when the budget is
    shared with other campaigns, the preview names them and needs a double
    confirmation, because the new amount covers all of them. A bidding change
    on a campaign in a portfolio bid strategy takes it out of the portfolio,
    also with a double confirmation.

    Returns a preview with a plan_id plus any warnings; nothing changes until
    confirm_and_apply applies it.

    Args:
        campaign_id: The numeric ID of the campaign to update (required).
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        bidding_strategy: MAXIMIZE_CONVERSIONS | TARGET_CPA | TARGET_ROAS |
            MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | MANUAL_CPC. Empty leaves
            the strategy unchanged.
        target_cpa: Target CPA in the account's currency; required if
            bidding_strategy is TARGET_CPA. 0 leaves it unchanged.
        target_roas: Target ROAS as a ratio (e.g. 4.0 = 400%); required if
            bidding_strategy is TARGET_ROAS. 0 leaves it unchanged.
        daily_budget: New daily budget in the account's currency (not micros),
            at most the config's max_daily_budget. 0 leaves it unchanged. On a
            shared budget it is the amount for every campaign sharing it.
        geo_target_ids: REPLACES all positive geo targets; must not be empty
            when given. Common IDs: "2276" Germany, "2040" Austria, "2756"
            Switzerland, "2840" USA, "2826" UK.
        language_ids: REPLACES all language targets; must not be empty when
            given. Common IDs: "1001" German, "1000" English, "1002" French,
            "1003" Spanish, "1004" Italian.
        search_partners_enabled: Include ads on Search partners. Omitted leaves
            the setting unchanged.
        display_network_enabled: Enable Search campaign display expansion.
            Omitted leaves the setting unchanged.
        display_expansion_enabled: Alias for display_network_enabled; both must
            match when both are given.
        max_cpc: Maximize Clicks CPC cap in the account's currency when
            bidding_strategy is TARGET_SPEND, or when the existing campaign
            already uses TARGET_SPEND. Increases are limited by the config's
            max_bid_increase_pct. 0 leaves it unchanged.
        location_option: PRESENCE | PRESENCE_OR_INTEREST | SEARCH_INTEREST.
            Who the geo targets reach; the preview shows the current value
            (current_location_option) and warns when the new one is anything
            but PRESENCE. Empty leaves it unchanged.
        negative_location_option: PRESENCE | PRESENCE_OR_INTEREST. Who the
            location exclusions exclude; the preview shows the current value.
            PRESENCE excludes fewer people (only those physically there), so
            it widens reach and the preview warns. Empty leaves it unchanged.
        tracking_url_template: Campaign tracking template; must contain {lpurl}
            or a variant. Omitted leaves it unchanged; "" removes it.
        final_url_suffix: Parameters appended to the landing page URL. Omitted
            leaves it unchanged; "" removes it.
        url_custom_parameters: List of {"key", "value"}; REPLACES the
            campaign's custom parameters. Keys alphanumeric, max 8 characters.
            Omitted leaves them unchanged; [] removes them. The preview shows
            each current value (current_tracking_url_template etc.), names any
            removal, and gives example_click: one of the campaign's final URLs
            with the campaign's options applied. It is approximate: a template
            on the ad group, ad or keyword overrides the campaign's.
        keyword_match_type: Campaign-level broad match. BROAD turns it on and
            CONVERTS every existing phrase and exact keyword in the campaign to
            broad match (the originals show as Removed; turning it off does not
            restore them), and since September 2026 Google upgrades such
            campaigns to AI Max. Refused unless the campaign uses Smart Bidding
            (MAXIMIZE_CONVERSIONS, MAXIMIZE_CONVERSION_VALUE, TARGET_CPA,
            TARGET_ROAS), checked again at apply; needs a double confirmation.
            UNSPECIFIED turns it off: no further conversions, but converted
            keywords stay broad. Moving a campaign with broad match on to a
            non-Smart bidding_strategy is refused unless the same call passes
            UNSPECIFIED. The preview shows the current value. Empty leaves it
            unchanged.
        geo_exclude_ids: REPLACES the campaign's negative location criteria.
            Omitted leaves them unchanged; [] removes them. May not overlap
            geo_target_ids. The preview shows the current ones
            (current_geo_exclude_ids); dropping any needs a double confirmation,
            because the campaign can serve there again. A location can move
            between geo_target_ids and geo_exclude_ids in one call: its old
            criterion is removed before the new one is created.
        ad_schedule: REPLACES the campaign's schedule windows (shape as in
            draft_campaign). Omitted leaves them unchanged; [] removes them, so
            the campaign serves at all hours. The preview shows the current ones
            (current_ad_schedule). A first schedule and clearing a schedule both
            need a double confirmation. Only windows that differ are removed or
            added, removals first. Apply refuses if the exclusions or windows
            changed after the preview.
update_microsoft_ad_grouptool Draft Microsoft Advertising ad group changes: name, default bid, search network, Audience Network adjustment.FilesCredentialsEnv varsSensitive pathsoutside text
Draft Microsoft Advertising ad group changes: name, default bid, search network, Audience Network adjustment.

    A bid raise is capped by max_bid_increase_pct. audience_ads_bid_adjustment
    -100 keeps the ad group off the Microsoft Audience Network. The returned
    plan_id is applied with confirm_and_apply, which refuses if a changed
    setting was edited after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        name: New name.
        cpc_bid: New default max CPC.
        network: OwnedAndOperatedOnly or OwnedAndOperatedAndSyndicatedSearch.
        audience_ads_bid_adjustment: -100 (off) to 900 percent.
update_microsoft_campaigntool Draft Microsoft Advertising campaign setting changes: name, bid strategy and targets, tracking template, final URL suffix.FilesCredentialsEnv varsSensitive pathsoutside text
Draft Microsoft Advertising campaign setting changes: name, bid strategy and targets, tracking template, final URL suffix.

    Bid strategies: EnhancedCpc, MaxClicks, MaxConversions (with an optional
    target_cpa; TargetCpa is accepted and becomes MaxConversions, as Microsoft
    now does). Microsoft retired manual CPC for search campaigns and stores it
    as EnhancedCpc, so ManualCpc is drafted as EnhancedCpc with a note. Moving to a strategy that is not conversion-based
    (manual bids or MaxClicks) is refused while the campaign has active
    broad-match keywords, and moving to MaxConversions is refused while the
    account has no active conversion goal. The daily budget has its own
    tool, update_microsoft_campaign_budget. The returned plan_id is applied
    with confirm_and_apply, which refuses if a changed setting was edited
    after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id.
        name: New name (at most 128 characters, unique in the account).
        bidding_strategy: EnhancedCpc, MaxClicks or MaxConversions (ManualCpc becomes EnhancedCpc).
        target_cpa: Target cost per conversion for MaxConversions.
        max_cpc: Maximum CPC for MaxClicks / MaxConversions (only changes an existing cap).
        tracking_url_template: New template ({lpurl}...); "" removes it.
        final_url_suffix: New suffix (e.g. utm parameters); "" removes it.
update_microsoft_campaign_budgettool Draft a new daily budget for a Microsoft Advertising campaign (preview only; nothing changes yet).FilesCredentialsEnv varsSensitive pathsoutside text
Draft a new daily budget for a Microsoft Advertising campaign (preview only; nothing changes yet).

    Shows the current and new budget and the monthly maximum (30.4 × daily).
    Refuses campaigns on a shared budget and amounts above the configured
    safety cap (max_daily_budget). The returned plan_id is applied with
    confirm_and_apply; a dry run re-reads the campaign and sends nothing, and
    the apply refuses if the budget changed since the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (from get_microsoft_campaigns).
        daily_budget: New daily budget in the account currency.
update_microsoft_campaign_targetingtool Draft Microsoft Advertising campaign targeting: included and excluded locations, location intent, ad schedule.FilesCredentialsEnv varsSensitive pathsoutside text
Draft Microsoft Advertising campaign targeting: included and excluded locations, location intent, ad schedule.

    Location lists are the full new sets; the preview shows what is added
    and removed. location_intent PeopleIn keeps ads to people in the
    locations. ad_schedule replaces every window ([] serves at all hours);
    the hours follow the account time zone, or each searcher's own when the
    campaign uses AdScheduleUseSearcherTimeZone (the preview says which), and
    a campaign's first schedule needs a double confirmation because it
    switches all other hours off.
    The returned plan_id is applied with confirm_and_apply, which refuses if
    the targeting changed after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id.
        location_ids: Full new list of included location ids (search_microsoft_locations); cannot be empty.
        excluded_location_ids: Full new list of excluded location ids.
        location_intent: PeopleIn or PeopleInOrSearchingForOrViewingPages.
        ad_schedule: Windows like {"day_of_week": "Monday", "start_hour": 8, "end_hour": 17,
            "start_minute": 0, "end_minute": 0} (minutes 0/15/30/45).
update_microsoft_keyword_bidstool Draft keyword bid changes in one Microsoft Advertising ad group (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft keyword bid changes in one Microsoft Advertising ad group (preview only).

    Each raise is capped by max_bid_increase_pct against the keyword's
    current bid (or the ad group default). A null bid removes the keyword's
    own bid so the ad group default applies. The returned plan_id is applied
    with confirm_and_apply, which refuses if a bid changed after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        bids: [{"keyword_id", "bid"}].
update_microsoft_responsive_search_adtool Draft changes to a Microsoft Advertising responsive search ad (preview only).FilesCredentialsEnv varsSensitive pathsoutside text
Draft changes to a Microsoft Advertising responsive search ad (preview only).

    headlines or descriptions replace that whole list; paths "" remove
    them. Edited ads go back to editorial review. The returned plan_id is
    applied with confirm_and_apply, which refuses if the ad changed after
    the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_id: Ad id.
        headlines: Full new list (text or {"text", "pinned_field"}).
        descriptions: Full new list.
        final_url: New landing page.
        path1: New first display path; "" removes it.
        path2: New second display path; "" removes it.
update_promotiontool Draft changing a promotion asset in place — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changing a promotion asset in place — returns a PREVIEW.

    Only the fields passed change; everything else stays as it is. The
    asset keeps its ID and history, and the change shows everywhere it is
    linked. Passing money_off replaces a percent_off (and the other way
    round); passing promotion_code replaces an orders_over_amount (and the
    other way round). The preview shows old and new values; an edit in
    Google Ads before the apply stops it.

    Args:
        asset_id: Numeric ID of the PROMOTION asset.
        promotion_target: New target text, at most 20 characters.
        final_url: New landing page; must be reachable.
        money_off: New fixed discount.
        percent_off: New percentage discount, at most 100.
        currency_code: ISO 4217 code for the amounts. Empty keeps the
            promotion's currency (or uses the account currency).
        promotion_code: New coupon code, at most 15 characters.
        orders_over_amount: New minimum order value.
        occasion: New occasion such as BLACK_FRIDAY.
        discount_modifier: "UP_TO", or clear it with clear_fields.
        language_code: New language of the promotion's text.
        start_date: First day the promotion shows, YYYY-MM-DD.
        end_date: Last day the promotion shows, YYYY-MM-DD.
        redemption_start_date: First day the offer can be redeemed, YYYY-MM-DD.
        redemption_end_date: Last day the offer can be redeemed, YYYY-MM-DD.
        clear_fields: Optional fields to remove: promotion_code,
            orders_over_amount, occasion, discount_modifier, start_date,
            end_date, redemption_start_date, redemption_end_date,
            ad_schedule.
        ad_schedule: Windows that replace the promotion's whole schedule (same
            shape as draft_promotion). Empty leaves the schedule as it is.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
update_reddit_adtool Draft changes to a Reddit ad — name, landing URL (click_url), comments on/off.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changes to a Reddit ad — name, landing URL (click_url), comments on/off.

    The headline and body of a live Reddit post cannot be edited; new copy
    means a new ad via draft_reddit_ad, with the old ad paused. Returns a
    preview with a plan_id showing old → new; nothing changes until
    confirm_and_apply executes it.

    Args:
        ad_id: Reddit ad id (from get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        name: New ad name; empty keeps the current one.
        click_url: New landing URL (http:// or https://), verified to be
            reachable. TEXT (free-form) ads open the post itself and take no
            click_url.
        allow_comments: true or false turns comments on the ad's post on or
            off; omitted leaves them unchanged.
update_reddit_ad_grouptool Draft changes to a Reddit ad group — budget, bid, run dates, weekly schedule, targeting.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changes to a Reddit ad group — budget, bid, run dates, weekly schedule, targeting.

    Budget (daily_budget or lifetime_budget + end_time) is checked against
    max_daily_budget; bid_value against max_bid_increase_pct. Targeting lists
    REPLACE the current value of each key passed (each takes the full list);
    omitted keys are preserved. Ids/names come from search_reddit_targeting.
    Budget and schedule of an ad group in a campaign-budget-optimization
    campaign are set on the campaign (update_reddit_campaign). Returns a
    preview with a plan_id showing old → new per field; nothing changes until
    confirm_and_apply applies it.

    Args:
        ad_group_id: Reddit ad group id (from get_reddit_ad_groups).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        name: New ad group name; empty keeps the current one.
        daily_budget: New daily budget in account currency (positive).
            Mutually exclusive with lifetime_budget; the budget type (daily vs
            lifetime) cannot change after publishing.
        lifetime_budget: New lifetime budget in account currency (positive).
            Needs an end_time (passed or already set); compared to
            max_daily_budget by its per-day share.
        bid_value: New bid in account currency.
        bid_strategy: BIDLESS, MANUAL_BIDDING, MAXIMIZE_VOLUME or TARGET_CPX.
        bid_type: CPC, CPM, CPV, CPV6 or CPV15.
        start_time: New start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day.
        end_time: New end, same formats as start_time.
        geolocations: Full list of geolocation ids to target (e.g. "DE" or
            "DE:2874225").
        excluded_geolocations: Full list of geolocation ids to exclude.
        communities: Full list of community (subreddit) names to target.
        excluded_communities: Full list of community names to exclude.
        interests: Full list of interest ids to target.
        keywords: Full list of keywords to target.
        excluded_keywords: Full list of keywords to exclude.
        languages: Full list of language codes (ISO 639-1, upper-cased
            automatically, e.g. "DE").
        gender: FEMALE or MALE; empty leaves gender targeting unchanged.
        platforms: Full list of platforms: ALL, DESKTOP, DESKTOP_LEGACY,
            MOBILE_NATIVE, MOBILE_WEB, MOBILE_WEB_3X or SHREDTOP.
        expand_targeting: Whether Reddit may expand delivery beyond the
            targeting; omitted leaves it unchanged.
        schedule: Weekly delivery windows ("time of day" in Ads Manager), a
            list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. [] clears it (deliver at any time). Hours apply in
            each viewer's local time, not the account time zone.
        locations: Placements, FEED and/or COMMENTS_PAGE (conversation
            pages); cannot be an empty list.
        excluded_interests: Full list of interest ids to exclude (Reddit
            marks this field deprecated). [] clears it.
        devices: Full list of device targets, objects like {"type":
            "MOBILE", "os": "IOS", "min_version": "16"} (type DESKTOP or
            MOBILE; optional os ANDROID or IOS, major OS versions with iOS at
            least 14, and label_map {make: [models]} with makes/models from
            search_reddit_targeting kind "devices"). [] clears it (every
            device).
        carriers: Full list of mobile carrier ids (from
            search_reddit_targeting kind "carriers", e.g. "O2_DEUTSCHLAND"),
            checked against Reddit's carrier list. [] clears it.
        view_modes: Full list of feed layouts: ALL, CARD, CLASSIC, COMPACT
            or IMMERSIVE. [] clears it.
        custom_audience_ids: Full list of custom audiences to target (from
            get_reddit_audiences). It narrows the ad group to those people.
            [] clears it.
        excluded_custom_audience_ids: Full list of custom audiences to
            exclude, e.g. existing customers. [] clears it.
update_reddit_campaigntool Draft changes to a Reddit campaign — name, run dates, spend cap, and (CBO only) budget/bid/schedule.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changes to a Reddit campaign — name, run dates, spend cap, and (CBO only) budget/bid/schedule.

    daily_budget / lifetime_budget / bid_* / schedule apply only when the
    campaign uses campaign budget optimization; otherwise the budget lives on
    its ad groups (changed via update_reddit_ad_group). Budgets are in
    account currency and checked against max_daily_budget; bid_value against
    max_bid_increase_pct. Returns a preview with a plan_id showing old → new
    per field; nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: Reddit campaign id (from get_reddit_campaigns).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        name: New campaign name; empty keeps the current one.
        daily_budget: New daily budget in account currency (positive; CBO
            only). Mutually exclusive with lifetime_budget; the budget type
            (daily vs lifetime) cannot change after publishing.
        lifetime_budget: New lifetime budget in account currency (positive;
            CBO only). Needs an end_time (passed or already set); compared to
            max_daily_budget by its per-day share.
        spend_cap: Campaign spend cap in account currency; 0 removes it.
        bid_strategy: BIDLESS, MAXIMIZE_VOLUME or TARGET_CPX (CBO only).
        bid_type: CPC, CPM, CPV, CPV6 or CPV15 (CBO only).
        bid_value: New bid in account currency (CBO only).
        start_time: New start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day.
        end_time: New end, same formats as start_time.
        schedule: Weekly delivery windows ("time of day" in Ads Manager; CBO
            only), a list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. [] clears it (deliver at any time). Hours apply in
            each viewer's local time, not the account time zone. A campaign
            schedule replaces every ad group's.
update_responsive_search_adtool Update mutable fields on an existing RSA in place — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Update mutable fields on an existing RSA in place — returns a PREVIEW.

    Edits an existing RSA without creating a new ad; the ad keeps its ID.
    Google Ads API v23 (``AdService.MutateAds``) permits in-place mutation of
    ``final_urls``, ``path1``, ``path2``, ``headlines``, and ``descriptions``.
    At least one mutation must be requested.

    IMPORTANT: replacing headlines or descriptions is NOT a free in-place
    edit. Even though the ad ID is preserved, swapping the creative text
    RESETS the ad's asset-combination learning and performance history and
    sends the ad BACK THROUGH Google policy review — Google treats the
    creative as new for optimization. URL-only and path-only edits do not
    incur this. When headlines/descriptions change, the returned preview
    includes a ``warnings`` entry stating this trade-off before anything
    is applied.

    Returns a preview with a plan_id; nothing changes until confirm_and_apply
    applies it.

    Args:
        ad_id: Numeric ID of the existing responsive search ad.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        headlines: LIST-REPLACE: None or [] means no change; a non-empty list
            fully swaps in for the existing headlines. Google's RSA constraints
            apply: 3-15 headlines, max 30 chars each, every pin position fillable.
            Each entry is a plain string (unpinned) or {"text": "...",
            "pinned_field": "HEADLINE_1"} (HEADLINE_1-3). Insertion tags such as
            {KeyWord:Clogged Drain Service} count as their default text, which
            is required.
        descriptions: LIST-REPLACE: None or [] means no change; a non-empty list
            fully swaps in. 2-4 descriptions, max 90 chars each, pins to
            DESCRIPTION_1 or DESCRIPTION_2 with every position fillable. Same
            entry format and insertion-tag counting as headlines.
        final_url: Empty means no change; non-empty replaces the final URL and
            is checked for reachability.
        path1: Empty means no change; non-empty sets the first display path
            (max 15 chars).
        path2: Empty means no change; non-empty sets the second display path
            (max 15 chars).
        clear_path1: True sets path1 to an empty string (overrides path1).
        clear_path2: True sets path2 to an empty string (overrides path2).
update_sitelinktool Draft changing a sitelink asset in place — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changing a sitelink asset in place — returns a PREVIEW.

    Only the fields passed change; empty fields stay as they are. The asset
    keeps its ID and performance history everywhere it is linked. A new
    final_url is checked for reachability. The preview pins the current
    values; an edit in Google Ads before the apply stops it.

    Args:
        asset_id: Numeric ID of the sitelink asset.
        link_text: New link text, at most 25 characters.
        final_url: New landing page URL; must be reachable.
        description1: New first description line, at most 35 characters.
        description2: New second description line, at most 35 characters.
            Google needs both description lines or neither.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        start_date: First day the sitelink shows, YYYY-MM-DD. Empty keeps it.
        end_date: Last day the sitelink shows, YYYY-MM-DD. Empty keeps it.
        clear_fields: "start_date" and/or "end_date" to remove that date.
update_structured_snippettool Draft changing a structured snippet asset in place — returns a PREVIEW.FilesCredentialsEnv varsSensitive pathsoutside text
Draft changing a structured snippet asset in place — returns a PREVIEW.

    Replaces the snippet's values (and header, if given). The asset keeps
    its ID and performance history everywhere it is linked. The preview
    pins the current header and values; an edit in Google Ads before the
    apply stops it.

    Args:
        asset_id: Numeric ID of the structured snippet asset.
        values: The complete new list of 3-10 values, each at most 25
            characters.
        header: New header (English or translated, as in
            draft_structured_snippets); empty keeps the current one as Google
            stores it, whatever its language.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
upload_conversion_csvtool Let the user upload a conversion CSV for an offline conversion upload.Filesoutside text
Let the user upload a conversion CSV for an offline conversion upload.

    For the CSV behind draft_upload_call_conversions or
    draft_upload_enhanced_conversions_for_leads when the file is not on the
    machine running AdLoop, as on AdLoop Cloud. Apps that show AdLoop's
    cards display an upload card where the user drops the .csv file; the
    card then posts the upload id into the chat. Other apps on AdLoop Cloud
    get an upload link for the user (or a coding agent, with curl). The
    file holds personal data (phone numbers, emails), so it is kept for two
    hours at most and deleted as soon as a draft has read it. Returns the
    CSV uploads waiting to be used and how to add one.
upload_imagestool Let the user upload images (PNG, JPEG, GIF up to 5 MB) for ad assets.Filesoutside text
Let the user upload images (PNG, JPEG, GIF up to 5 MB) for ad assets.

    For images without a public URL, such as a file on the user's computer
    or an image attached in the chat. An attached image cannot reach a tool,
    so the user drops the same file on the card. Apps that show AdLoop's
    cards display an upload card where the user drops the files; the card
    then posts the upload ids into the chat. On AdLoop Cloud in other apps the result
    carries an upload link for the user (or a coding agent, with curl).
    Uploads expire after a day. The ids go into upload_ids of
    draft_image_assets, or as "upload:<id>" into the image fields of
    draft_reddit_ad. Returns the current uploads and how to add more.
validate_trackingtool Compare tracking events found in the codebase against actual GA4 data.FilesCredentialsEnv varsSensitive pathsoutside text
Compare tracking events found in the codebase against actual GA4 data.

    Takes the event names found in the codebase's gtag('event', ...) or
    dataLayer.push calls and checks which ones actually fire in GA4.

    Returns matched events with their GA4 counts, events missing from GA4,
    unexpected GA4 events, auto-collected events (page_view, session_start,
    etc.), insights on likely causes, and the date range.

    Args:
        expected_events: Event names found in the codebase, e.g. ["sign_up",
            "purchase"].
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        date_range_start: Start date: "today", "yesterday", "NdaysAgo" (e.g.
            "28daysAgo"), or "YYYY-MM-DD".
        date_range_end: End date, same formats as date_range_start.

Text the model reads (208)

Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.

get_gtm_tag tool
Get the full RAW configuration for a single GTM tag.

    Includes every parameter, firing/blocking triggers (with their filter
    conditions resolved to text), priority, pause status, sampling, and
    monitoring metadata. Suited to inspecting a tag flagged by
    audit_event_coverage. An unknown tag_id returns an error with the
    available tag IDs. Reads the live container, or a workspace's
    unpublished state when workspace_id is set.

    Args:
        tag_id: Numeric GTM tag ID, as listed by list_gtm_tags.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
get_microsoft_conversion_setup tool
Audit Microsoft Advertising conversion tracking: UET tags, conversion goals, campaign goals and conversions against clicks.

    Returns a verdict (ok, needs attention, broken) with checks[]: a UET tag
    exists and is active; active goals exist, record conversions and count in
    Conversions (not only All conversions); campaign-level goals; campaigns
    with many clicks and no conversion. Also returns the tags, goals and
    per-campaign clicks and conversions.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        date_range_start: First day of the activity window, YYYY-MM-DD.
        date_range_end: Last day (inclusive). Empty means yesterday.
        min_clicks: Clicks from which a campaign without conversions is
            flagged (default 30).
fn tool
health_check tool
Test AdLoop connectivity — checks OAuth token, GA4 API, Google Ads API,
    and (when configured) the Reddit Ads and Microsoft Advertising APIs.

    Returns the status of each service and actionable guidance when something
    is broken, which makes it the diagnostic for failures in other tools.
get_account_summaries tool
List all GA4 accounts and properties accessible by the authenticated user.

    Serves as the discovery step for which GA4 properties are available.
    Returns account names, property names, and property IDs.
run_ga4_report tool
Run a custom GA4 report with optional filters, ordering, paging and a comparison period.

    Returns the property, the date range, the dimension and metric headers,
    one row per dimension combination (values as strings), row_count and
    total_row_count (plus next_offset while more rows remain). At least one
    dimension or metric is required. With compare_start/compare_end the
    comparison period is a second date range: every row then carries a
    dateRange value of "current" or "comparison", and date_ranges maps both
    labels to their dates. Invalid filters or ordering return "Validation
    failed" with details, before anything is sent. insights[] says when GA4
    thresholded or sampled the data, grouped rows into "(other)", or the
    property is close to its API quota, because each makes numbers differ
    from the GA4 interface. Reports over time (a date-type dimension) or
    comparing periods also return the property's annotations in those dates,
    which often explain a jump in the rows.

    Queries the GA4 Data API. Dimensions and metrics:
    https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema

    Args:
        dimensions: GA4 dimension API names, e.g. date, pagePath,
            sessionSource, sessionMedium, country, deviceCategory, eventName.
            Custom ones (customEvent:...) and every valid name are listed by
            list_ga4_dimensions_and_metrics.
        metrics: GA4 metric API names, e.g. sessions, totalUsers, newUsers,
            screenPageViews, keyEvents, eventCount, bounceRate.
        date_range_start: Start date: "today", "yesterday", "NdaysAgo" (e.g.
            "7daysAgo", "28daysAgo", "90daysAgo"), or "YYYY-MM-DD".
        date_range_end: End date, same formats as date_range_start.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        limit: Maximum number of rows returned (positive).
        dimension_filter: Conditions on dimensions, all of which must hold
            (AND). Each is {"field": <dimension>, "op": <match>, "value":
            <string>}; op is EXACT (default), BEGINS_WITH, ENDS_WITH,
            CONTAINS, FULL_REGEXP, PARTIAL_REGEXP, or IN_LIST with "values":
            [<strings>]. Optional keys: "case_sensitive" (default false) and
            "not": true to exclude matches. Example: [{"field":
            "sessionDefaultChannelGroup", "op": "EXACT", "value": "Paid
            Search"}]. For OR, put a group in the list: {"any_of":
            [<conditions>]} matches when any holds, {"all_of": [...]} when
            all hold; groups take "not" too and nest up to three levels.
            Example: [{"any_of": [{"field": "sessionSource", "value":
            "google"}, {"field": "sessionSource", "value": "bing"}]}].
        metric_filter: Conditions on metrics, applied after aggregation, all
            of which must hold (AND). Each is {"field": <metric>, "op": <op>,
            "value": <number>}; op is EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL,
            GREATER_THAN, GREATER_THAN_OR_EQUAL (or =, <, <=, >, >=), or
            BETWEEN with "value": [from, to]. Optional "not": true. Groups
            work as in dimension_filter.
            Example: [{"field": "sessions", "op": ">", "value": 100}].
        order_by: Sort order as [{"field": <name>, "desc": true|false}]; each
            field must be one of the requested dimensions or metrics.
        offset: Zero-based row offset for paging; pass next_offset from the
            previous result to get the following page.
        compare_start: Start of the comparison period (same formats as
            date_range_start). Set together with compare_end.
        compare_end: End of the comparison period.
        date_ranges: Up to four named periods in one report, replacing
            date_range_start/end (not combinable with compare_start/end):
            [{"start": "2026-10-01", "end": "2026-10-31", "name": "october"},
            {"start": "2025-10-01", "end": "2025-10-31", "name":
            "october_last_year"}]. Rows then carry a dateRange value with the
            name. Names default to range_1, range_2, ...
        currency_code: ISO 4217 code (e.g. "EUR") to report revenue and cost
            metrics in that currency instead of the property's own.
run_realtime_report tool
Run a GA4 realtime report showing current active users and events.

    Useful for checking if tracking is firing correctly after code changes:
    filter on the event that just shipped, or compare the last few minutes
    with the minutes before. Returns the dimension and metric headers and one
    row per dimension combination over the realtime window (the last 30
    minutes unless minute_ranges says otherwise). When a filter matches
    nothing, insights[] lists the usual causes.

    Args:
        dimensions: GA4 realtime dimension API names, e.g. unifiedScreenName,
            eventName, country, deviceCategory, minutesAgo.
        metrics: GA4 realtime metric API names, e.g. activeUsers, eventCount,
            keyEvents. Defaults to ["activeUsers"].
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        dimension_filter: Same format as in run_ga4_report, e.g.
            [{"field": "eventName", "value": "purchase"}].
        metric_filter: Same format as in run_ga4_report.
        order_by: [{"field": <requested dimension or metric>, "desc": true}].
        limit: Maximum rows; 0 uses GA4's default.
        minute_ranges: Up to two windows, e.g. [{"start_minutes_ago": 4,
            "end_minutes_ago": 0, "name": "last_5"}, {"start_minutes_ago": 29,
            "end_minutes_ago": 5, "name": "before"}]. start_minutes_ago is at
            most 29 on standard properties (59 on 360). With two windows rows
            carry a dateRange value with the window's name.
get_ga4_property tool
Show a GA4 property's configuration in one call: details, linked Google Ads accounts, data streams and data retention.

    Returns the property's display name, time zone, currency, industry,
    service level (standard or 360), type and create time; every linked
    Google Ads account (customer ID, whether it is a manager account,
    personalized advertising); every data stream with its measurement ID or
    app ID; how many months event and user data are kept; and the number of
    key events. insights[] flags settings that cost data: two-month
    retention, no Google Ads link while key events exist, the configured Ads
    account not being linked, a property in the trash. A part the user may
    not read is listed under unavailable instead of failing the call. Reads
    the GA4 Admin API (properties.get, googleAdsLinks.list, dataStreams.list,
    getDataRetentionSettings, keyEvents.list).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID (see get_account_summaries). If empty, uses the
            default from config.
get_tracking_events tool
List all GA4 events and their volume for the given date range.

    Returns every distinct event name with its total event count, sorted by
    count (highest first). Shows what tracking is configured and active.

    Args:
        date_range_start: Start date: "today", "yesterday", "NdaysAgo" (e.g.
            "28daysAgo"), or "YYYY-MM-DD".
        date_range_end: End date, same formats as date_range_start.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
list_key_events tool
List the key events (conversions) configured on a GA4 property.

    Returns each key event's event name, counting method (ONCE_PER_EVENT or
    ONCE_PER_SESSION), create time, whether GA4 allows deleting it, whether
    it is a custom event, and its resource name, sorted by event name, plus
    the total. Reads the GA4 Admin API (keyEvents.list).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID (see get_account_summaries). If empty, uses the
            default from config.
list_ga4_dimensions_and_metrics tool
List the dimensions and metrics a GA4 property can report on, including custom ones.

    Returns the exact API names valid in run_ga4_report for this property:
    each with its UI name, category, whether it is a custom definition
    (customEvent:..., customUser:...), and deprecated API names; metrics
    also carry their type and, for calculated metrics, the expression.
    Reads the GA4 Data API metadata (properties.getMetadata), which uses no
    report quota.

    Args:
        search: Case-insensitive text matched against API name, UI name,
            category, description and deprecated API names (e.g. "channel",
            "revenue", or the legacy "conversions", which finds keyEvents).
            Empty returns everything.
        kind: "all" (default), "dimensions" or "metrics".
        custom_only: True returns only the property's custom dimensions and
            metrics.
        include_descriptions: Include each field's description. Defaults to
            true when search is set and false otherwise (the full list is
            long).
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
run_ga4_funnel tool
Run a GA4 funnel report: how many users go from one step to the next, and where they drop off.

    Steps are event names or pages, in order. Returns per step the users,
    completion rate to the next step, abandonments and abandonment rate,
    plus how many started and finished, the overall completion rate and the
    biggest drop (after which step most users leave). With breakdown, the
    same per value of a dimension (e.g. deviceCategory); with next_action,
    the most common next event or page after each step, i.e. what users do
    instead. Uses the GA4 Data API v1alpha (runFunnelReport), the endpoint
    behind GA4's funnel explorations; data reaches back as far as the
    property's data retention.

    Args:
        steps: 2 to 10 steps. Each is an event name ("add_to_cart") or an
            object: {"event": "purchase", "name": "Bought"}, {"page":
            "/checkout"} (page views whose URL contains the text), optional
            "directly_followed": true (no other event in between) and
            "within_minutes": 30 (must follow the previous step within that
            time).
        date_range_start: "today", "yesterday", "NdaysAgo" or "YYYY-MM-DD".
        date_range_end: Same formats.
        open_funnel: False (default) counts only users who start at step 1;
            true lets users enter at any step.
        breakdown: Dimension to split every step by, e.g. deviceCategory,
            sessionDefaultChannelGroup, country.
        breakdown_limit: How many values of the breakdown dimension (1-15).
        next_action: Dimension for "what came next" after each step, e.g.
            eventName or pagePath.
        dimension_filter: Only count users matching these conditions, same
            format as in run_ga4_report, e.g. [{"field": "deviceCategory",
            "value": "mobile"}].
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
run_ga4_attribution tool
Show which channels, campaigns or sources get the credit for conversions under GA4's attribution models, or compare data-driven with last click.

    The view of GA4's Advertising workspace: conversions, revenue, ad cost
    and ROAS per channel (or campaign, source, country, device) attributed
    by the model, not by session. attribution_model COMPARE runs data-driven
    and last click side by side and returns each row's share of the credit
    under both and the shift in percentage points, with insights naming the
    channels that gain or lose most. Conversions can be named by key event
    name; empty means all. Uses the GA4 Data API v1alpha (runReport with a
    conversion spec), which Google is still rolling out: a property without
    it gets an explanation and the fallback. Ad cost and ROAS need Google
    Ads linked to the property.

    Args:
        dimensions: Any of campaignName, continent, country,
            defaultChannelGroup (default), deviceCategory, medium, platform,
            primaryChannelGroup, source, sourceMedium, sourcePlatform,
            subcontinent.
        metrics: Any of allConversionsByConversionDate,
            allConversionsByInteractionDate, totalRevenueByConversionDate,
            totalRevenueByInteractionDate, advertiserAdCost,
            advertiserAdClicks, advertiserAdImpressions,
            advertiserAdCostPerClick,
            advertiserAdCostPerAllConversionsByConversionDate,
            advertiserAdCostPerAllConversionsByInteractionDate,
            returnOnAdSpendByConversionDate, returnOnAdSpendByInteractionDate.
            Default: conversions, revenue, ad cost and ROAS by conversion date.
        date_range_start: "today", "yesterday", "NdaysAgo" or "YYYY-MM-DD".
        date_range_end: Same formats.
        conversions: Key event names (e.g. ["purchase"]) or GA4 conversion
            action IDs ("conversionActions/123"); empty for all.
        attribution_model: DATA_DRIVEN (default), LAST_CLICK, or COMPARE.
        limit: Maximum rows per model.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
audit_ga4_property tool
Audit a GA4 property's setup in one call: the settings that quietly cost data or conversions.

    Checks data retention (two months is GA4's default and cuts
    explorations short), the Google Ads link (and whether the configured
    Ads account is linked), each data stream's activity in the last 7 days,
    key events that never fired in 28 days or no key events at all,
    enhanced measurement per web stream, Google signals (and the
    thresholding they cause), the custom dimension and metric limits, and a
    property in the trash. Returns checks with status warn, info or ok
    (warnings first), a summary count, and the warnings as insights[]; a
    check the user may not read is listed under unavailable. Reads GA4 only
    (Admin API, part v1alpha, and two small Data API reports); for whether
    Google Ads imports the key events, run check_key_event_imports.

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_ga4_annotations tool
List a GA4 property's annotations, the notes GA4 shows on a date or date range in its charts.

    Returns each annotation's ID (resource name), title, description, color,
    and its date or start and end date, newest first; Google's own
    annotations are marked system_generated. With a date range, only the
    annotations that overlap it. The first stop for "what happened on that
    day?" next to get_change_history in Google Ads. Reads the GA4 Admin API
    v1alpha (reportingDataAnnotations.list).

    Args:
        date_range_start: Optional start: "today", "yesterday", "NdaysAgo" or
            "YYYY-MM-DD". Set together with date_range_end.
        date_range_end: Optional end, same formats.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_ga4_audiences tool
List a GA4 property's audiences and check whether they reach Google Ads.

    GA4 shares its audiences with every linked Google Ads account that
    allows personalized advertising; there they are remarketing lists
    (get_audience_lists) that draft_audience_attachment puts on a campaign.
    Returns each audience's resource name, display name, description,
    membership duration and what includes or excludes users: events,
    pages (include_pages / exclude_pages: the URL contains the text) or
    a sequence of steps (audiences built with other conditions in GA4's
    editor carry
    custom_conditions and the raw conditions; "All Users" and "Purchasers",
    which GA4 creates itself, carry predefined), the audience slots used
    against the limit (100, or 400 on a 360 property), and
    google_ads_readiness: checks for the Google Ads link, personalized
    advertising on it, Google signals, consent and list size, each with a
    status (ok, warn or info). insights repeats the warnings. Reads the GA4
    Admin API (audiences.list, googleAdsLinks.list, googleSignalsSettings).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_ga4_custom_definitions tool
List a GA4 property's custom dimensions and custom metrics, with how many slots are left.

    Returns each custom dimension's resource name, parameter name, display
    name, scope (EVENT, USER or ITEM) and description, and each custom
    metric's resource name, parameter name, display name, measurement unit
    and description, plus usage per kind against the property's limit
    (standard: 50 event, 25 user, 10 item dimensions, 50 metrics; 360:
    125, 100, 25, 125). Use it before draft_ga4_custom_dimension or
    draft_ga4_custom_metric. For the field names to use in reports, see
    list_ga4_dimensions_and_metrics. Reads the GA4 Admin API
    (customDimensions.list, customMetrics.list).

    Args:
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
list_gsc_sites tool
List all Google Search Console properties the authenticated user can access.

    Serves as the discovery step for the site URLs that search analytics
    reports (run_gsc_report) take. Returns the site URL and permission level
    for each property.
run_gsc_report tool
Run a Google Search Console search analytics report.

    Returns clicks, impressions, CTR, and average position broken down by
    the requested dimensions. Useful for diagnosing organic traffic drops,
    finding keyword opportunities, and cross-referencing with GA4 and Ads data.
    One request returns at most 25,000 rows; a full page carries
    next_start_row for the following request. With data_state "all" the
    response metadata names the first date whose data is still incomplete.

    Queries the Search Console API:
    https://developers.google.com/webmaster-tools/v1/searchanalytics/query

    Args:
        site_url: The GSC property URL (e.g. "https://example.com/" or
            "sc-domain:example.com"), as listed by list_gsc_sites. Defaults to
            the configured Search Console site (gsc.site_url).
        dimensions: One or more of "query", "page", "country", "device",
            "date", "searchAppearance" (search result feature, e.g. rich
            results) or "hour" (hourly rows for roughly the last 10 days;
            switches data_state to "hourly_all"). Defaults to ["query"].
        date_range_start: Start date as ISO "YYYY-MM-DD" or a relative value
            like "7daysAgo", "30daysAgo", "today".
        date_range_end: End date, same formats as date_range_start.
        limit: Maximum rows to return (default 100, max 25000 per request;
            higher values are capped at 25000).
        search_type: "web" (default), "image", "video", "news", "discover",
            or "googleNews".
        dimension_filter_groups: Optional list of GSC DimensionFilterGroup
            objects to filter by query, page, country, or device, e.g.
            [{"filters": [{"dimension": "query", "operator": "contains",
            "expression": "analytics"}]}]. searchAppearance is filterable too.
        data_state: "final" (default) returns finalized data only; "all"
            adds fresh data from the last days that can still change;
            "hourly_all" is the state the hour dimension uses.
        aggregation_type: "auto" (default), "byPage" (aggregate by canonical
            URL) or "byProperty" (aggregate by property; not combinable with
            grouping or filtering by page).
        start_row: Zero-based offset of the first row, for paging past the
            25,000-row cap (pass the previous response's next_start_row).
analyze_page_speed tool
Run PageSpeed Insights for a landing page — Lighthouse + real-user data.

    Returns the performance score (0-100), lab Core Web Vitals (LCP, CLS,
    TBT, FCP), CrUX field data from real Chrome users where available
    (p75 LCP/INP/CLS/FCP/TTFB + FAST/AVERAGE/SLOW ratings), and the top
    improvement opportunities with estimated savings. When the page itself
    has too little traffic for field data, the origin-wide field data is
    returned instead, marked field.scope="origin".

    Typical input is an ad final_url: slow landing pages depress Quality
    Score and waste paid clicks. Takes 10-30s; that is normal for a
    Lighthouse run.

    Args:
        url: Full URL of the page to analyze, e.g. an ad's final_url
            ("https://example.com/landing").
        strategy: "mobile" (default — most paid traffic) or "desktop".
list_merchant_accounts tool
List Google Merchant Center accounts the connected user can access.

    Returns each account's numeric ID, name and whether it is a test
    account. Provides the account_id used by get_merchant_feed_health;
    not needed when merchant.account_id is set in the config.
get_merchant_feed_health tool
Merchant Center feed health — disapproved products + account issues.

    Disapproved feed items silently starve Shopping and Performance Max
    campaigns; this reports approved/pending/disapproved counts per
    reporting context (Shopping ads, free listings, ...), the top product
    issues by affected products (with documentation links), and
    account-level issues — CRITICAL ones stop offers serving entirely.
    Product-status data lags reality by ~30 minutes.

    Args:
        account_id: Numeric Merchant Center ID from list_merchant_accounts.
            Defaults to merchant.account_id in the config.
get_merchant_product_issues tool
The products behind the feed-health counts, each with its issues.

    Lists products by status with offer id, title, brand, click potential
    and every item issue: its code, the attribute it concerns, severity per
    reporting context with the affected countries, and whether the
    merchant has to act or Google is still processing. Products with high
    click potential come first, because fixing them recovers the most
    traffic. issues_by_code counts the products per issue. Data lags feed
    changes by about 30 minutes.

    Args:
        account_id: Numeric Merchant Center ID from list_merchant_accounts.
            Defaults to merchant.account_id in the config.
        status: "disapproved" (default, not serving), "limited" (serving
            with restrictions), "pending" (still in review) or "any"
            (every product with at least one issue).
        issue_code: Only products with this issue code (from
            issues_by_code or get_merchant_feed_health).
        limit: Maximum number of products to return (1-200, default 50).
list_accounts tool
List accessible Google Ads accounts.

    Returns account names, IDs, status, and whether each is a manager account.
    When more accounts exist than `limit`, the response has
    'truncated: true'; a much higher limit (e.g. list_accounts(limit=1000))
    returns the full list. Workflows that target a specific account need no
    enumeration at all: get_campaign_performance, run_gaql, etc. take
    customer_id directly.

    Args:
        limit: Maximum number of accounts listed under the manager (MCC)
            account. The default cap of 200 covers the vast majority of agency
            MCCs in one call.
get_campaign_performance tool
Get campaign-level performance metrics for a date range.

    Returns campaign name, status, type, impressions, clicks, cost,
    conversions, CPA, ROAS, CTR for each campaign, plus Search impression
    share and the share lost to budget and to ad rank (fractions with
    matching *_pct percentages; null for campaigns that do not serve on
    Search or had no impressions). Insights flag converting campaigns that
    lose a significant share of impressions to budget.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews on large accounts), returns
            account totals, status/type breakdowns, the top-10 spenders,
            zero-conversion offenders and budget-limited converters instead
            of every row (~90% smaller).
get_ad_performance tool
Get ad-level performance data including headlines, descriptions, and metrics.

    Returns ad type, headlines, descriptions, final URL, impressions,
    clicks, CTR, conversions, cost for each ad, plus its policy approval
    status, review status and policy topic names. Disapproved and
    limited-by-policy ads are listed under policy_issues with their spend.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews), returns totals, the top-10
            ads with headline/description COUNTS instead of full asset lists,
            plus incomplete-RSA, single-ad ad-group and policy findings with
            approval-status counts (~90% smaller).
get_keyword_performance tool
Get keyword metrics including quality scores and competitive data.

    Returns keyword text, match type, quality score, impressions,
    clicks, CTR, CPC, conversions for each keyword.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews), returns totals, match-type
            distribution, the top-10 spenders, low-quality-score keywords, and
            zero-conversion spenders instead of every row (~90% smaller).
get_search_terms tool
Get search terms report — what users actually typed before clicking your ads.

    Critical for finding negative keyword opportunities and understanding user
    intent. Returns search term, campaign, ad group, impressions, clicks,
    conversions.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        compact: When true (for audits/overviews), returns totals, the top-10
            terms by clicks, ready-made negative-keyword waste candidates
            (5+ clicks, zero conversions), and top converters (~90% smaller).
get_negative_keywords tool
List existing negative keywords for a campaign or all campaigns.

    Shows the existing negatives, which reveals duplicates before new
    negative keywords are added. Returns each negative's campaign, keyword
    text, match type, and a resource_id ("campaignId~criterionId") as taken
    by remove_entity, plus the total count.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        campaign_id: Numeric campaign ID to filter by. If empty, returns
            negatives across all campaigns.
get_negative_keyword_lists tool
List all shared negative keyword lists (SharedSets) in the account.

    Returns each list's ID, name, status, and keyword count. Useful before
    propose_negative_keyword_list: a suitable list may already exist and
    just need attaching to a campaign.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_negative_keyword_list_keywords tool
List the keywords inside a shared negative keyword list.

    Returns each negative keyword's text, match type, and a resource_id
    ("sharedSetId~criterionId"), with the total keyword count.

    Args:
        shared_set_id: Numeric ID from get_negative_keyword_lists (shared_set.id).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_negative_keyword_list_campaigns tool
List which campaigns a shared negative keyword list is attached to.

    Returns each list-to-campaign attachment with the list and campaign IDs
    and names.

    Args:
        shared_set_id: Numeric ID from get_negative_keyword_lists. When
            omitted, returns all list-to-campaign attachments across the account.
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_recommendations tool
Retrieve Google's auto-generated recommendations with estimated impact.

    Returns each recommendation's ID, type, associated campaign/ad group,
    current (base) and projected (potential) metrics, and the estimated
    improvement. Includes insights that flag budget-increase recommendations
    (their projected gain comes from spending more) and highlight high-impact
    suggestions. The `recommendation.id` is what draft_dismiss_recommendations
    takes.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        recommendation_types: Optional filter of Google Ads RecommendationType
            names, e.g. ["KEYWORD", "TARGET_CPA_OPT_IN",
            "MAXIMIZE_CONVERSIONS_OPT_IN", "RESPONSIVE_SEARCH_AD"].
            Empty = all types.
        campaign_id: Optional numeric campaign ID to scope to a single campaign.
draft_dismiss_recommendations tool
Dismiss Google Ads recommendations — returns a PREVIEW.

    Turns down recommendations you will not take (e.g. "add broad match" on a
    deliberately narrow account) so they stop reappearing in
    get_recommendations. Nothing in the account changes, and Google can show a
    dismissed recommendation again later, so a single confirmation is enough.

    Each ID must be an active recommendation: unknown or already dismissed
    IDs are refused by name. The preview lists each one's type, campaign and
    estimated improvement, so the user sees what they are turning down.

    DismissRecommendation has no validate-only mode: the dry run re-reads the
    account and checks every recommendation is still active instead of
    sending the call to Google. The returned plan_id is applied with
    confirm_and_apply.

    Args:
        recommendation_ids: `recommendation.id` values from
            get_recommendations, or full resource names
            (customers/{customer_id}/recommendations/{id}). Duplicates are
            collapsed.
        customer_id: Ads account ID. Defaults to the configured account.
get_recommendation_subscriptions tool
List the recommendation types Google applies automatically (auto-apply).

    A subscription makes Google apply every new recommendation of its type
    without asking, so changes reach the account with no preview. Returns each
    subscription's type, status (ENABLED or PAUSED), create_date_time and
    modify_date_time. A type that is not listed is not auto-applied.
    insights[] names every ENABLED type and flags one modified in the last 30
    days, so a recurring audit can catch auto-apply being switched on.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
draft_recommendation_subscriptions tool
Pause auto-apply for recommendation types — returns a PREVIEW.

    Pausing is the only change this tool can make: it sets each type's
    subscription to PAUSED, so Google stops applying those recommendations on
    its own. Their recommendations still appear in get_recommendations.
    Re-enabling auto-apply is deliberately not supported; it lets Google change
    the account without a preview, so it stays a decision for the Google Ads
    UI. Pausing reduces automation, so a single confirmation is enough.

    Each type must have an ENABLED subscription (see
    get_recommendation_subscriptions); a type with none, or one already
    paused, is refused by name. The dry run sends the request to Google with
    validate_only. The returned plan_id is applied with confirm_and_apply.

    Args:
        recommendation_types: RecommendationType names with an ENABLED
            subscription, e.g. ["KEYWORD", "USE_BROAD_MATCH_KEYWORD"].
            Duplicates are collapsed.
        customer_id: Ads account ID. Defaults to the configured account.
get_pmax_performance tool
Get Performance Max campaign and asset group performance.

    Returns two result sets. campaigns: PMax campaign metrics broken down by
    ad_network_type (SEARCH, CONTENT, YOUTUBE_SEARCH, YOUTUBE_WATCH, MIXED).
    MIXED is a catch-all that Google uses for most PMax traffic — full channel
    splits are not available via the API. asset_groups: per-asset-group
    metrics including ad_strength (EXCELLENT, GOOD, AVERAGE, POOR).

    Includes insights flagging weak ad strength, zero-conversion asset groups,
    and network type distribution.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
get_pmax_assets tool
List the assets of Performance Max campaigns with type, status and content.

    Returns each asset's field_type (HEADLINE, DESCRIPTION, MARKETING_IMAGE,
    YOUTUBE_VIDEO, etc.), primary_status (ELIGIBLE, NOT_ELIGIBLE, PAUSED,
    PENDING), and content (text or image URL), plus by_status and
    by_field_type summaries.

    Per-asset performance labels (BEST/GOOD/LOW) are not available for
    PMax assets in the Google Ads API. get_detailed_asset_performance reports
    which asset combinations Google selects most — the closest proxy for
    individual asset quality.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        campaign_id: Optional numeric ID to filter to a single PMax campaign.
get_detailed_asset_performance tool
Get top-performing asset combinations for Performance Max campaigns.

    Shows which headline + description + image combinations Google selects
    most often. Returns each combination with the assets used and their field
    types. This data helps identify which creative elements work well together.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        campaign_id: Optional numeric ID to filter to a single PMax campaign.
get_audience_performance tool
Get audience segment performance metrics.

    Returns performance by audience type — remarketing lists (USER_LIST),
    in-market segments (USER_INTEREST), affinity, demographics (AGE_RANGE,
    GENDER), etc. Shows display_name, impressions, clicks, cost, conversions,
    CTR, and CPC for each audience.

    Works for campaigns with explicit audience targeting (Search, Display).
    PMax audience targeting is automatic and may not appear in this report.

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        campaign_id: Optional numeric ID to filter to a single campaign.
get_demographic_targeting tool
List demographic targeting criteria (age, gender, parental status, income).

    Takes exactly one of ad_group_id or campaign_id. Returns each
    criterion's value, whether it's negative (excluded) or positive
    (narrowing), status, and a remove_id (composite resource ID) that
    can be passed directly to remove_entity with
    entity_type='ad_group_criterion' or 'campaign_criterion'.

    By default, Google Ads serves ads to ALL demographic segments — a
    criterion only appears here once a segment has been actively excluded
    or narrowed.

    Args:
        ad_group_id: Numeric ad group ID. Mutually exclusive with campaign_id.
        campaign_id: Numeric campaign ID. Mutually exclusive with ad_group_id.
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
get_change_history tool
List recent account changes: who changed what, when, and through which tool.

    Answers "what changed before the drop?". Returns each change newest
    first with its time, the user's email, the client it came through
    (Google Ads UI, API, Google Ads scripts, Editor, automated rules,
    auto-applied recommendations, ...), the changed resource type, the
    operation (CREATE, UPDATE, REMOVE), the changed field paths, and the
    campaign and ad group names. Also returns counts by resource type,
    client, user and day, plus insights on auto-applied recommendations
    and budget or bidding changes. Google Ads keeps change history for 30
    days, so older start dates are moved to the earliest available day.

    Reads the change_event resource:
    https://developers.google.com/google-ads/api/docs/change-event

    Args:
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        date_range_start: Start date as "YYYY-MM-DD", at most 30 days back.
            Empty starts at the oldest day Google Ads still keeps.
        date_range_end: End date as "YYYY-MM-DD" (inclusive). Empty means today.
        campaign_id: Optional numeric campaign ID; only changes attributed to
            that campaign are returned.
        resource_types: Optional filter of ChangeEventResourceType names,
            e.g. ["CAMPAIGN", "CAMPAIGN_BUDGET", "AD_GROUP_AD",
            "AD_GROUP_CRITERION"]. Empty = all types.
        limit: Maximum number of changes returned, newest first (1 to
            10000; default 1000). The response is marked truncated when
            the limit is reached.
analyze_campaign_conversions tool
Campaign clicks → GA4 conversions mapping — the real cost-per-conversion.

    Combines Google Ads campaign metrics with GA4 session/conversion data to
    reveal click-to-session ratios (GDPR indicator), compare Ads-reported vs
    GA4-reported conversions, and compute cost-per-GA4-conversion.
    Also returns non-paid channel conversion rates for comparison context.
    GA4 conversions are the property's key events (GA4 metric keyEvents).

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        campaign_name: Optional case-insensitive substring; only campaigns
            whose name contains it are included. Empty = all campaigns.
landing_page_analysis tool
Analyze which landing pages convert and which don't.

    Combines ad final URLs with GA4 page-level data. Returns paid traffic
    sessions, conversion rates, bounce rates, and engagement per landing page,
    and identifies pages that get ad clicks but zero conversions and orphaned
    URLs.

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
attribution_check tool
Compare Ads-reported conversions vs GA4 — find tracking discrepancies.

    Checks whether conversions reported by Google Ads match what GA4 records,
    diagnoses GDPR consent gaps, attribution model differences, and missing
    conversion event configuration. Returns both sides' totals with the
    discrepancy and diagnostic insights. GA4 conversions are the property's
    key events (GA4 metric keyEvents).

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes
            (e.g. "123-456-7890"). Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        conversion_events: Optional list of GA4 event names to specifically
            check (e.g. ["sign_up", "purchase"]). If omitted, compares
            aggregate totals only.
draft_conversion_tracking_setup tool
Set up conversion tracking from GA4 into Google Ads in one approved plan, returning a PREVIEW of only the missing steps.

    Use it when the user wants their conversions (sign-ups, purchases,
    leads) tracked and used for bidding, or after audit_ga4_property or
    check_key_event_imports found a gap. It reads both products and plans
    what is missing, in order: link the GA4 property to the Google Ads
    account, mark the events as GA4 key events, turn on auto-tagging, import
    the conversion actions Google Ads created for the key events (they start
    hidden and record nothing), make them primary, and use their goal for
    bidding. Steps already in place are listed under already_done. Google
    Ads creates the conversion action for a newly linked property or new key
    event by itself, not instantly: such events come back as "After this"
    warnings, and running the tool again later imports them. NO_CHANGE when
    everything is set up. The website must send the events; this tool
    cannot add tracking code (see generate_tracking_code). Nothing changes
    until confirm_and_apply applies it: the dry run validates the Google Ads
    steps with validate_only and re-reads the GA4 ones, and every step skips
    itself if already done, so confirming again after a failed step
    continues where it stopped.

    Args:
        events: GA4 event names to track as conversions, e.g. ["sign_up"],
            or objects {"event": "generate_lead", "counting_method":
            "ONCE_PER_SESSION"} (counting applies when the event is not a
            key event yet; default ONCE_PER_EVENT). Empty uses the
            property's key events that fired in the last 28 days.
        primary: True (default) makes the imports primary conversions that
            Smart Bidding optimizes toward; False imports them as secondary
            (reported only).
        data_retention: Optional, e.g. 14: also lengthen GA4 event data
            retention (months). Only lengthens; empty leaves it.
        ads_personalization: Only for a new link. False (default) keeps
            personalized advertising off, so GA4 shares no audiences or
            remarketing data with Google Ads.
        customer_id: Google Ads customer ID, digits with or without dashes.
            Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
check_key_event_imports tool
Check that every GA4 key event reaches Google Ads: imported, used for bidding, and actually receiving conversions.

    Matches the property's key events with the Google Ads conversion actions
    that import them (by GA4 property and event name), and compares GA4's
    key events from Google Ads traffic (google / cpc) with the conversions
    Google Ads recorded for each import. insights[] names key events no
    conversion action imports, imports that are only secondary (reported,
    not bid on), imports that stay at zero while GA4 counts Google Ads
    conversions (a broken link or auto-tagging), and imports of events that
    are no longer key events. Imports from other GA4 properties are listed
    separately.

    Args:
        date_range_start: Start date as "YYYY-MM-DD". Both dates must be set
            to apply a range; if either is empty, the last 30 days are used.
        date_range_end: End date as "YYYY-MM-DD" (inclusive).
        customer_id: Google Ads customer ID, digits with or without dashes.
            Defaults to the configured ads.customer_id.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
audit_event_coverage tool
Three-way audit: codebase events ↔ GTM tags ↔ GA4 actual fires.

    Fetches the LIVE GTM container, joins it against GA4 event counts for the
    date range, and returns a per-event matrix with one of these statuses:
      ok                          — tag active and event firing
      ok_auto_collected           — GA4 Enhanced Measurement event, no tag needed
      no_tag_no_fire              — codebase event, no GTM tag, never fires
      tag_paused                  — GTM tag exists but is paused
      tag_active_but_not_firing   — tag is active but no GA4 hits
      gtm_only_firing             — GA4 event from a tag, not in codebase
      gtm_paused_but_firing       — only paused tag(s), not in codebase, yet
                                    GA4 still fires (event comes from elsewhere)
      gtm_only_not_firing         — tag exists, not in codebase, no fires
      ga4_only                    — fires in GA4, no tag, no codebase ref
      ga4_fires_no_tag            — codebase event firing without a GTM tag
      auto_event_only             — Enhanced Measurement event with no codebase ref

    The result also lists dynamic-event tags ({{Event}} variables) and Custom
    HTML tags that the audit cannot interpret automatically.

    Args:
        expected_events: Distinct event names found in the codebase's
            gtag('event', ...) and dataLayer.push({event: ...}) calls.
        gtm_account_id: Numeric GTM account ID (Tag Manager UI → Admin →
            Container Settings, or list_gtm_accounts). Empty uses
            gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (not the GTM-XXXXXXX public
            ID; see list_gtm_containers). Empty uses gtm.container_id from the
            config.
        property_id: GA4 property as "properties/123456789". Empty uses the
            default from config.
        date_range_start: Start date "YYYY-MM-DD". Empty (or an empty
            date_range_end) means the last 30 days.
        date_range_end: End date "YYYY-MM-DD". Empty (or an empty
            date_range_start) means the last 30 days.
list_gtm_accounts tool
List all GTM accounts the AdLoop service account / OAuth user can read.

    The first-time discovery step: provides the account_id that
    audit_event_coverage takes. Returns each account's ID and name. An empty
    list means the service account hasn't been added to any GTM container
    with at least Read permission.
list_gtm_containers tool
List all containers under a GTM account.

    Returns container_id (the numeric ID needed by audit_event_coverage),
    public_id (the GTM-XXXXXXX string shown in the UI), name, and usage
    context (web / iOS / Android / amp / server).

    Args:
        gtm_account_id: Numeric GTM account ID from list_gtm_accounts. Empty
            uses gtm.account_id from the config; the tool errors when neither
            is set.
list_gtm_tags tool
List every tag in the LIVE GTM container, or in one workspace.

    Each tag includes type, status, parsed parameters, the GA4 event name
    (for GA4 event tags), and resolved firing/blocking trigger names.
    Complements audit_event_coverage for inspecting specific tags. With
    workspace_id the list shows that workspace's unpublished state, so a
    just-drafted tag is visible; `source` says which state was read.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers),
            not the GTM-XXXXXXX public ID. Empty uses gtm.container_id from
            the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
list_gtm_triggers tool
List every trigger in the LIVE GTM container, or in one workspace.

    Each trigger has its filter conditions parsed to readable text
    (e.g. "{{Page Path}} matches RegExp ^/service-promotions/"). Helps
    diagnose why a tag fires or doesn't fire on specific pages. With
    workspace_id the list shows that workspace's unpublished state.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
get_gtm_trigger tool
Get the full RAW configuration for a single GTM trigger.

    Includes filters, auto-event filters, custom-event filters, validation
    settings, and a list of every tag that uses this trigger. Helps
    diagnose why a tag with a specific trigger ID does or doesn't fire. An
    unknown trigger_id returns an error with the available trigger IDs.
    Reads the live container, or a workspace's unpublished state when
    workspace_id is set.

    Args:
        trigger_id: Numeric GTM trigger ID, as listed by list_gtm_triggers or
            a tag's firing/blocking triggers.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
list_gtm_variables tool
List GTM variables — both custom and enabled built-in.

    Without workspace_id both come from the live container version (the
    Default Workspace supplies the built-ins only when the live version lists
    none; built_in_source names where they came from). With workspace_id both
    come from that workspace's unpublished state. Variables matter because
    triggers reference them: if a trigger uses {{Form ID}} but Form ID isn't
    enabled, the trigger never matches.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        workspace_id: Workspace to read (see list_gtm_workspaces), which
            includes drafted changes that are not published yet. Empty reads
            the live (published) container version.
list_gtm_workspaces tool
List workspaces (drafts) under a GTM container.

    Returns each workspace's ID, name and description; the IDs are what
    `get_gtm_workspace_diff` takes. Most containers have a single Default
    Workspace; multiple workspaces appear when the team uses parallel drafts.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
get_gtm_workspace_diff tool
Show drafted-but-not-published changes in a GTM workspace.

    Returns the list of entities (tags, triggers, variables) added,
    modified, or deleted relative to the live published version, plus
    any merge conflicts. Common cause of "I edited a tag but nothing
    happened" — the workspace was never published. is_clean=true means
    no pending changes and no conflicts.

    Args:
        workspace_id: Numeric GTM workspace ID from list_gtm_workspaces.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
list_gtm_versions tool
List GTM container version headers (newest first).

    Version headers include version_id, name, archived flag and entity
    counts. The Tag Manager API returns no creation or publish time and no
    author for a version, and does not mark which versions were published;
    get_gtm_version returns a version's notes and get_gtm_version_diff what
    changed between two versions.

    Args:
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
        page_size: Maximum number of version headers returned (newest first).
get_gtm_version tool
Get metadata + entity counts for a single GTM container version.

    Returns name, description (the version notes), fingerprint, and lists of
    tag/trigger/variable names at that point in time. The API returns no
    timestamps or author for a version.

    Args:
        container_version_id: Numeric container version ID from
            list_gtm_versions.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
get_gtm_version_diff tool
Compare two GTM container versions: what a publish changed.

    Returns added, removed and changed tags, triggers and variables (with
    names, types and the changed fields; parameters and trigger conditions
    are diffed key by key), plus built-in variables enabled or disabled. By
    default compares the live version with the version created before it.
    The Tag Manager API does not mark which versions were published, so that
    default "before" version may never have been live. Makes two or three
    Tag Manager API calls.

    Args:
        from_version_id: Older version ID (see list_gtm_versions). Empty uses
            the newest non-archived version created before to_version_id.
        to_version_id: Newer version ID. Empty uses the live (published)
            version.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_gtm_tag tool
Draft creating or updating a Tag Manager tag — returns a PREVIEW.

    Without tag_id this creates a tag in a workspace; with tag_id it updates
    the existing tag. The edit lands in the workspace and changes nothing on
    the site until the workspace is published. Refused unless
    gtm.write_enabled is set, and Custom HTML (html) is refused as well
    unless gtm.allow_custom_html is set. Returns the resolved workspace, the
    tag type, the fields that would change and a plan_id.

    Args:
        name: Tag name, 1-200 characters. Required when creating a tag.
        tag_type: Tag type, required when creating a tag because GTM cannot
            change a tag's type later: googtag, gaawe (GA4 event), awct (Ads
            conversion), awcc, awud, sp (Ads remarketing), gclidw, flc, fls,
            img, html (Custom HTML) or cvt_<id> for a Community Gallery
            template.
        parameters: GTM parameter dicts with at least "type" and "key", for
            example gaawe [{"type": "TEMPLATE", "key": "eventName", "value":
            "form_submit"}] or awct [{"type": "TEMPLATE", "key":
            "conversionId", "value": "123456789"}, {"type": "TEMPLATE",
            "key": "conversionLabel", "value": "AbC-dEf"}]. On update they
            merge by key: passed keys replace, other keys stay.
        firing_trigger_ids: Trigger IDs that fire the tag (see
            list_gtm_triggers). The built-in All Pages trigger is
            "2147479553".
        blocking_trigger_ids: Trigger IDs that must not fire the tag.
        paused: True stores the tag paused instead of deleting it. None keeps
            the current state.
        notes: Free-form note stored on the tag. None keeps the current note.
        tag_id: Existing tag ID to update (see list_gtm_tags). Empty creates
            a new tag.
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_gtm_trigger tool
Draft creating or updating a Tag Manager trigger — returns a PREVIEW.

    Without trigger_id this creates a trigger in a workspace; with trigger_id
    it updates the existing one. The edit lands in the workspace and changes
    nothing on the site until the workspace is published. Refused unless
    gtm.write_enabled is set. Returns the resolved workspace, the trigger
    fields that would change and a plan_id.

    Args:
        name: Trigger name, 1-200 characters. Required when creating a
            trigger.
        trigger_type: Trigger type, required when creating a trigger and
            rejected on an existing one, because GTM cannot change it later:
            pageview, domReady, windowLoaded, click, linkClick,
            formSubmission, customEvent, elementVisibility, scrollDepth,
            youTubeVideo, historyChange, timer, jsError or triggerGroup.
        custom_event_name: The dataLayer event name. Required for trigger type
            customEvent, rejected for every other type, and rejected on an
            existing trigger, where the event name sits in its custom event
            filter.
        filters: GTM conditions, each a dict with "type" (EQUALS, CONTAINS,
            MATCH_REGEX, ...) and "parameter" (arg0 = variable, arg1 =
            value), for example clicks on tel: links [{"type": "CONTAINS",
            "parameter": [{"type": "TEMPLATE", "key": "arg0", "value":
            "{{Click URL}}"}, {"type": "TEMPLATE", "key": "arg1", "value":
            "tel:"}]}]. On update the list replaces the existing one.
        custom_event_filters: Conditions on custom event parameters, same
            shape as filters. On update the list replaces the existing one.
        auto_event_filters: Conditions on automatic event parameters, same
            shape as filters. On update the list replaces the existing one.
        parameters: GTM parameter dicts with at least "type" and "key". On
            update they merge by key: passed keys replace, other keys stay.
        notes: Free-form note stored on the trigger. None keeps the current
            note.
        trigger_id: Existing trigger ID to update (see list_gtm_triggers).
            Empty creates a new trigger.
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_gtm_variable tool
Draft creating or updating a Tag Manager variable: returns a PREVIEW.

    Without variable_id this creates a variable in a workspace; with
    variable_id it updates the existing one. Data Layer Variables, the usual
    source for GA4 ecommerce values, take data_layer_key (e.g.
    "ecommerce.value") instead of raw parameters. Tags and triggers use a
    variable as {{name}}; renaming one they reference is refused, because
    the references would break (the GTM UI renames safely). Custom
    JavaScript variables run code on the site and are refused unless
    gtm.allow_custom_html is set. The edit lands in the workspace and
    changes nothing on the site until the workspace is published. Refused
    unless gtm.write_enabled is set.

    Args:
        name: Variable name, 1-200 characters without curly braces.
            Required when creating a variable.
        variable_type: Required when creating, fixed afterwards: v (Data
            Layer Variable), c (Constant), u (URL), k (1st-party cookie), j
            (JavaScript Variable, reads a global), aev (Auto-Event
            Variable), d (DOM element), f (HTTP referrer), e (Custom event),
            smm (Lookup table), remm (RegEx table), jsm (Custom JavaScript,
            gated) or cvt_<id> for a custom template.
        data_layer_key: For Data Layer Variables: the dataLayer key to read,
            dot notation for nested values, e.g. "ecommerce.transaction_id".
        default_value: For Data Layer Variables: the value when the key is
            missing. None sets no default.
        parameters: GTM parameter dicts with at least "type" and "key" for
            the other types, e.g. a Constant's [{"type": "TEMPLATE", "key":
            "value", "value": "G-ABC123"}]. On update they merge by key.
        notes: Free-form note stored on the variable. None keeps the current
            note.
        variable_id: Existing variable ID to update (see list_gtm_variables).
            Empty creates a new variable.
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_delete_gtm_entity tool
Draft deleting a Tag Manager tag, trigger or variable — returns a PREVIEW.

    The entity is removed from a workspace and stays on the site until the
    workspace is published. A trigger that any tag still references, or a
    variable that a tag, trigger or other variable uses as {{name}}, is
    refused up front, with the references named. Refused unless
    gtm.write_enabled is set. Returns the entity that would be deleted, the
    resolved workspace and a plan_id.

    Args:
        entity_type: "tag", "trigger" or "variable".
        entity_id: Numeric ID of the entity (see list_gtm_tags,
            list_gtm_triggers and list_gtm_variables).
        workspace_id: Workspace to edit (see list_gtm_workspaces). Empty uses
            the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_publish_gtm_workspace tool
Draft publishing a Tag Manager workspace LIVE — returns a PREVIEW.

    Every pending change in the workspace goes live, including changes other
    people made in the GTM UI; the preview lists them all. Apply refuses when
    the workspace changed after the preview, has merge conflicts, or reports
    compiler errors in a quick preview, and it refuses a Custom HTML tag
    being added or changed while gtm.allow_custom_html is off. Refused unless
    gtm.write_enabled is set. Returns the pending changes, the version that
    is live now (for a one-step rollback), the version name that would be
    created and a plan_id. That gate matches the tag type html; a Custom
    JavaScript variable or a custom template tag (cvt_…), which can inject a
    script, is not covered and needs review in the GTM UI.

    Args:
        version_name: Name of the container version created by the publish.
            Empty uses "AdLoop publish <UTC timestamp>".
        version_notes: Notes stored on the created version. Empty leaves them
            out.
        workspace_id: Workspace to publish (see list_gtm_workspaces). Empty
            uses the Default Workspace, or the only workspace there is.
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
draft_rollback_gtm_version tool
Draft republishing an older Tag Manager version LIVE; returns a PREVIEW.

    A rollback publishes an existing container version again. The preview
    diffs the live version against the target, so it lists every tag,
    trigger and variable that changes on the site, and it pins the live
    version: apply refuses when another version went live after the
    preview, or when the target was modified or archived. Workspaces are not
    changed. Refused unless gtm.write_enabled is set, and refused when the
    target adds or changes a Custom HTML tag while gtm.allow_custom_html is
    off. Returns the diff, previous_live_version_id (the version that
    restores today's state), the target version and a plan_id.

    Args:
        version_id: Container version ID to make live again (see
            list_gtm_versions and get_gtm_version_diff).
        gtm_account_id: Numeric GTM account ID (see list_gtm_accounts). Empty
            uses gtm.account_id from the config.
        gtm_container_id: Numeric GTM container ID (see list_gtm_containers).
            Empty uses gtm.container_id from the config.
run_gaql tool
Execute an arbitrary GAQL (Google Ads Query Language) query.

    For queries beyond the dedicated report tools. Returns the result rows
    in the requested format with the query echoed back; cost fields stay in
    raw micros (cost_micros / 1,000,000 = account currency). A failing query
    returns an error with a hint.

    Queries the Google Ads API. GAQL syntax and fields:
    https://developers.google.com/google-ads/api/docs/query/overview

    Args:
        query: The GAQL query, e.g. "SELECT campaign.name, metrics.clicks
            FROM campaign WHERE segments.date DURING LAST_7_DAYS".
        customer_id: Google Ads customer ID, digits with or without dashes
            (123-456-7890). Empty uses the configured default account.
        format: Output format: "table" (default, readable), "json"
            (structured), or "csv" (exportable).
get_audience_lists tool
The account's own audiences: remarketing and customer lists, custom segments, combined segments.

    Each user list comes with its type, membership status (OPEN or CLOSED),
    size for Search and Display, eligibility and membership duration;
    custom and combined segments with their id and description. Insights
    flag lists below the 100 active users Search needs and closed lists. Use the
    ids with draft_audience_attachment; for Google's in-market and affinity
    segments use search_audience_segments.

    Args:
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
search_audience_segments tool
Find Google's in-market and affinity segments by name, with the segment_id to attach.

    In-market segments are people actively researching a purchase; affinity
    segments are long-term interests. Matching is on the segment name, in
    English, e.g. "running", "insurance", "travel".

    Args:
        query: Part of the segment name to look for (at least 2 characters).
        kind: "in_market", "affinity" or "all" (default).
        limit: Maximum number of segments to return (1-100, default 25).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
get_audience_targeting tool
Audiences attached to one campaign or ad group, its exclusions, and the audience mode.

    audience_mode is "observation" (audiences only adjust bids and report),
    "targeting" (ads only reach the audiences) or "not set". Every audience
    and exclusion carries a remove_id for remove_entity (entity_type
    "campaign_criterion" or "ad_group_criterion").

    Args:
        campaign_id: Numeric campaign id. Pass this or ad_group_id.
        ad_group_id: Numeric ad group id. Pass this or campaign_id.
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_audience_attachment tool
Draft attaching audiences to a campaign or ad group as observation, targeting or exclusion: returns a PREVIEW.

    Observation (the default) keeps the reach: the audiences adjust bids and
    show up in reports. Targeting narrows delivery to the audiences and needs
    a double confirmation. Exclusions keep the people out and leave the mode
    alone. The draft refuses combinations Google does not allow (custom
    segments on Search, combined segments outside Search, audiences at both
    campaign and ad group level) and lists that cannot serve; Performance Max
    is refused with a pointer to draft_asset_group_signals. Nothing changes
    until confirm_and_apply applies the plan_id; a dry run has Google
    validate it.

    Args:
        campaign_id: Numeric campaign id. Pass this or ad_group_id.
        ad_group_id: Numeric ad group id. Pass this or campaign_id.
        user_list_ids: Remarketing or customer lists (user_list_id from
            get_audience_lists).
        segment_ids: In-market or affinity segments (segment_id from
            search_audience_segments).
        custom_audience_ids: Custom segments (custom_audience_id from
            get_audience_lists); Display and Video only.
        combined_audience_ids: Combined segments (combined_audience_id from
            get_audience_lists); Search only.
        mode: "observation" (default) or "targeting". Ignored for exclusions.
        exclude: True to exclude the audiences instead of adding them.
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
get_shopping_product_performance tool
Spend, clicks, conversions, CPA and ROAS per product across Shopping and Performance Max.

    Each product (item id) is summed over the campaigns it ran in. Returns
    the account totals, the top products by spend, and the products that
    spent without a conversion, with insights on what to do with them.

    Args:
        date_range_start: Start date "YYYY-MM-DD". Both dates empty means
            the last 30 days.
        date_range_end: End date "YYYY-MM-DD" (inclusive).
        campaign_id: Optional numeric campaign id to limit the report to.
        limit: Maximum number of products to return (1-200, default 50).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
get_asset_group_signals tool
Search themes and the audience signal of a Performance Max asset group, plus the account's audiences.

    Returns each search theme and audience signal with its signal_id and
    approval status, the enabled audiences of the account that can become
    the group's audience signal (audience_id, name), and insights when a
    group has no themes or no audience signal.

    Args:
        asset_group_id: Numeric asset group id (from get_pmax_performance).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_asset_group_signals tool
Draft adding search themes or an audience signal to a Performance Max asset group, or removing signals — PREVIEW.

    Signals are hints that steer Performance Max, not targeting. A group has
    at most one audience signal and up to 50 search themes; replacing the
    audience means removing the current one in the same draft. Themes already
    on the group are skipped. Nothing changes until confirm_and_apply applies
    the plan_id; a dry run has Google validate it.

    Args:
        asset_group_id: Numeric asset group id (from get_pmax_performance).
        add_search_themes: Search themes to add, short phrases people search
            for (at most 80 characters each).
        audience_id: Audience to set as the group's audience signal (from
            get_asset_group_signals available_audiences).
        remove_signal_ids: Signals to remove (signal_id from
            get_asset_group_signals).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_pmax_product_exclusions tool
Draft which products a retail Performance Max asset group excludes — returns a PREVIEW.

    Sets the full list of excluded values on one product dimension (item id,
    brand or a custom label); everything else stays included. Pass the
    complete list each time: values left out are included again, and an
    empty list includes all products. Works on asset groups that advertise
    all products or are already split on that one dimension; more complex
    product filters are refused and stay a job for Google Ads. The filter is
    rebuilt in one atomic request. Nothing changes until confirm_and_apply
    applies the plan_id; a dry run has Google validate it.

    Args:
        asset_group_id: Numeric asset group id of a Performance Max campaign
            with a Merchant Center feed (from get_pmax_performance).
        exclude_values: Every value to exclude, e.g. item ids from the feed,
            brand names or custom label values. [] removes all exclusions.
        dimension: "item_id" (default), "brand", or "custom_label_0" to
            "custom_label_4".
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_asset_group_assets tool
Draft adding and/or removing assets of a Performance Max asset group — returns a PREVIEW.

    Adds new text, image and YouTube assets and unlinks existing ones in one
    atomic request, so an asset is replaced without the group dropping below
    Google's minimums (3 headlines, 1 long headline, 2 descriptions, one of
    them at most 60 characters). Texts already in the group are skipped.
    Images are checked and sorted by aspect ratio; removed assets stay in the
    account's asset library. The preview lists the asset counts per type
    after the change. Nothing changes until confirm_and_apply applies the
    plan_id; a dry run has Google validate it.

    Args:
        asset_group_id: Numeric asset group id (from get_pmax_performance or
            get_pmax_assets).
        headlines: Headlines to add, at most 30 characters each (up to 15 in
            the group).
        long_headlines: Long headlines to add, at most 90 characters (up to 5).
        descriptions: Descriptions to add, at most 90 characters (up to 5).
        business_name: Business name to add, at most 25 characters (one per
            group).
        images: Images to add, each {"url": "..."} or {"upload_id": "up_..."}
            with an optional "role": "marketing" (default; landscape 1.91:1,
            square 1:1 or portrait 4:5 by aspect ratio), "logo" (1:1) or
            "landscape_logo" (4:1). PNG, JPEG or GIF up to 5120 KB.
        youtube_video_ids: YouTube video ids to add (the 11 characters after
            "v=" in the URL), up to 5 per group.
        remove_asset_ids: Asset ids to unlink from the group (from
            get_pmax_assets).
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_shopping_campaign tool
Draft a Standard Shopping campaign that advertises a Merchant Center feed — returns a PREVIEW.

    Creates the budget, the campaign (PAUSED), a product ad group with its
    Shopping ad, and one "All products" product group, in one atomic request.
    The Merchant Center account must be linked to the Google Ads account;
    the draft checks that. Shopping campaigns take no keywords and no
    language targeting (the feed's language applies). Nothing changes until
    confirm_and_apply applies the plan_id; a dry run has Google validate it.

    Args:
        campaign_name: Name of the new campaign.
        daily_budget: Daily budget in account currency, checked against the
            max_daily_budget safety cap.
        merchant_id: Numeric Merchant Center id (from list_merchant_accounts)
            whose products the campaign advertises.
        product_bid: CPC bid of the "All products" group in account currency.
            Google requires it even when the bid strategy sets bids.
        geo_target_ids: Countries or regions as geo target constant ids, e.g.
            ["2276"] for Germany. Required.
        bidding_strategy: MANUAL_CPC (default), TARGET_SPEND (Maximize clicks)
            or TARGET_ROAS.
        target_roas: Target return on ad spend for TARGET_ROAS, e.g. 4.0 for
            400%.
        max_cpc: Optional CPC ceiling for TARGET_SPEND, in account currency.
        campaign_priority: LOW (default), MEDIUM or HIGH. With several
            Shopping campaigns on the same products, the higher priority
            serves first.
        feed_label: Optional feed label to limit the campaign to one feed of
            the Merchant Center account.
        ad_group_name: Optional ad group name; defaults to "<campaign> - All
            products".
        search_partners_enabled: Also serve on Google search partners.
        customer_id: Google Ads customer ID (digits, dashes optional).
            Defaults to the configured account.
draft_campaign tool
Draft a full campaign structure — returns a PREVIEW, does NOT create anything.

    Creates: CampaignBudget + Campaign (PAUSED) + AdGroup + optional Keywords
    + geo targeting + language targeting + optional geo exclusions and ad
    schedule, all in one atomic request.
    Ads are NOT included — draft_responsive_search_ad adds them once the
    campaign exists. Only SEARCH campaigns can be created: Performance Max
    needs an asset group with all its assets in one request, and DISPLAY,
    SHOPPING and VIDEO need channel-specific settings and ad group types, so
    the draft refuses them.

    Returns a preview with a plan_id plus any warnings (e.g. a daily budget
    below 5x target CPA, MANUAL_CPC); nothing changes until confirm_and_apply
    applies the returned plan_id.

    Args:
        campaign_name: Name of the new campaign.
        daily_budget: Daily budget in the account's currency (not micros);
            must be greater than 0 and at most the config's max_daily_budget.
        bidding_strategy: MAXIMIZE_CONVERSIONS | TARGET_CPA | TARGET_ROAS |
            MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | MANUAL_CPC. BROAD
            keywords require a Smart Bidding strategy (MAXIMIZE_CONVERSIONS,
            MAXIMIZE_CONVERSION_VALUE, TARGET_CPA, TARGET_ROAS).
        geo_target_ids: REQUIRED list of geo target constant IDs.
            Common: "2276" Germany, "2040" Austria, "2756" Switzerland, "2840" USA,
            "2826" UK, "2250" France. Full list: Google Ads API geo target constants.
        language_ids: REQUIRED list of language constant IDs.
            Common: "1001" German, "1000" English, "1002" French, "1003" Spanish,
            "1004" Italian, "1014" Portuguese. Full list: Google Ads API
            language constants.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        target_cpa: Target cost per acquisition in the account's currency;
            required if bidding_strategy is TARGET_CPA, optional target for
            MAXIMIZE_CONVERSIONS. 0 means none.
        target_roas: Target return on ad spend as a ratio (e.g. 4.0 = 400%);
            required if bidding_strategy is TARGET_ROAS, optional target for
            MAXIMIZE_CONVERSION_VALUE. 0 means none.
        channel_type: SEARCH (default). DISPLAY, SHOPPING, VIDEO and
            PERFORMANCE_MAX are refused with the reason (see above).
        ad_group_name: Name of the initial ad group. Empty uses campaign_name.
        keywords: Optional list of {"text": "keyword", "match_type":
            "EXACT|PHRASE|BROAD"} added to the initial ad group.
        search_partners_enabled: Include ads on Search partners (SEARCH
            campaigns only).
        display_network_enabled: Enable Search campaign display expansion
            (SEARCH campaigns only). Defaults to off.
        display_expansion_enabled: Alias for display_network_enabled; both must
            match when both are given.
        max_cpc: In the account's currency: the manual CPC bid for the initial
            ad group when bidding_strategy is MANUAL_CPC, or the Maximize Clicks
            CPC cap when bidding_strategy is TARGET_SPEND. Not allowed with
            other strategies; 0 means none.
        location_option: Who the geo targets reach. PRESENCE (people in or
            regularly in the locations), PRESENCE_OR_INTEREST (also people
            elsewhere who show interest in them) or SEARCH_INTEREST (people
            searching for them). Empty leaves Google's default,
            PRESENCE_OR_INTEREST. Anything but PRESENCE adds a warning.
        negative_location_option: Who the location exclusions exclude.
            PRESENCE or PRESENCE_OR_INTEREST; empty leaves Google's default,
            PRESENCE_OR_INTEREST. PRESENCE excludes fewer people (only those
            physically there), so it widens reach and the preview warns.
        tracking_url_template: Campaign tracking template, e.g.
            "{lpurl}?utm_source=google&utm_campaign={campaignid}". Must contain
            {lpurl} or a variant ({lpurl+2}, {unescapedlpurl},
            {escapedlpurl+3}, ...). Omitted leaves it unset.
        final_url_suffix: Parameters appended to the landing page URL, e.g.
            "utm_medium=cpc". Omitted leaves it unset.
        url_custom_parameters: List of {"key": "grp", "value": "b2c"}, used as
            {_grp} in the template. Keys alphanumeric, max 8 characters; values
            up to 250.
        geo_exclude_ids: Geo target constant IDs to exclude (negative location
            criteria), e.g. a city inside a targeted state. May not overlap
            geo_target_ids.
        ad_schedule: Windows the campaign serves in: list of {day_of_week
            (MONDAY..SUNDAY), start_hour 0-23, end_hour 0-24, start_minute,
            end_minute (0, 15, 30 or 45)}, whole numbers, in the account time
            zone. No overlaps, at most six a day. Once the campaign is enabled it
            serves only inside them; the preview warns about that. No double
            confirmation, since the campaign is created PAUSED.
draft_ad_group tool
Draft a new ad group within an existing campaign — returns a PREVIEW, does NOT create.

    Creates an ad group (ENABLED, type SEARCH_STANDARD) in the specified campaign,
    optionally with keywords in the same atomic operation. Only SEARCH campaigns
    are supported. Ads are not included, so the ad group cannot serve until one
    of its ads is created and enabled.

    Returns a preview with a plan_id plus warnings (BROAD keywords on a
    non-Smart-Bidding campaign, a duplicate ad group name, a CPC bid that Smart
    Bidding ignores); nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: The campaign to add the ad group to (numeric ID as returned
            by get_campaign_performance).
        ad_group_name: Name for the new ad group.
        keywords: Optional list of {"text": "keyword", "match_type":
            "EXACT|PHRASE|BROAD"}.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        cpc_bid_micros: Optional ad group CPC bid in micros (1,000,000 = one
            unit of the account's currency); only used by MANUAL_CPC campaigns.
            0 means no ad-group bid; must not be negative.
update_campaign tool
Draft an update to an existing campaign — returns a PREVIEW, does NOT apply.

    Only the parameters passed are changed; omitted ones stay as they are, and at
    least one change is required. Replacing geo targets keeps the campaign's
    negative geo exclusions (the preview lists them) unless geo_exclude_ids is
    passed too. A budget change shows the current amount; when the budget is
    shared with other campaigns, the preview names them and needs a double
    confirmation, because the new amount covers all of them. A bidding change
    on a campaign in a portfolio bid strategy takes it out of the portfolio,
    also with a double confirmation.

    Returns a preview with a plan_id plus any warnings; nothing changes until
    confirm_and_apply applies it.

    Args:
        campaign_id: The numeric ID of the campaign to update (required).
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        bidding_strategy: MAXIMIZE_CONVERSIONS | TARGET_CPA | TARGET_ROAS |
            MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | MANUAL_CPC. Empty leaves
            the strategy unchanged.
        target_cpa: Target CPA in the account's currency; required if
            bidding_strategy is TARGET_CPA. 0 leaves it unchanged.
        target_roas: Target ROAS as a ratio (e.g. 4.0 = 400%); required if
            bidding_strategy is TARGET_ROAS. 0 leaves it unchanged.
        daily_budget: New daily budget in the account's currency (not micros),
            at most the config's max_daily_budget. 0 leaves it unchanged. On a
            shared budget it is the amount for every campaign sharing it.
        geo_target_ids: REPLACES all positive geo targets; must not be empty
            when given. Common IDs: "2276" Germany, "2040" Austria, "2756"
            Switzerland, "2840" USA, "2826" UK.
        language_ids: REPLACES all language targets; must not be empty when
            given. Common IDs: "1001" German, "1000" English, "1002" French,
            "1003" Spanish, "1004" Italian.
        search_partners_enabled: Include ads on Search partners. Omitted leaves
            the setting unchanged.
        display_network_enabled: Enable Search campaign display expansion.
            Omitted leaves the setting unchanged.
        display_expansion_enabled: Alias for display_network_enabled; both must
            match when both are given.
        max_cpc: Maximize Clicks CPC cap in the account's currency when
            bidding_strategy is TARGET_SPEND, or when the existing campaign
            already uses TARGET_SPEND. Increases are limited by the config's
            max_bid_increase_pct. 0 leaves it unchanged.
        location_option: PRESENCE | PRESENCE_OR_INTEREST | SEARCH_INTEREST.
            Who the geo targets reach; the preview shows the current value
            (current_location_option) and warns when the new one is anything
            but PRESENCE. Empty leaves it unchanged.
        negative_location_option: PRESENCE | PRESENCE_OR_INTEREST. Who the
            location exclusions exclude; the preview shows the current value.
            PRESENCE excludes fewer people (only those physically there), so
            it widens reach and the preview warns. Empty leaves it unchanged.
        tracking_url_template: Campaign tracking template; must contain {lpurl}
            or a variant. Omitted leaves it unchanged; "" removes it.
        final_url_suffix: Parameters appended to the landing page URL. Omitted
            leaves it unchanged; "" removes it.
        url_custom_parameters: List of {"key", "value"}; REPLACES the
            campaign's custom parameters. Keys alphanumeric, max 8 characters.
            Omitted leaves them unchanged; [] removes them. The preview shows
            each current value (current_tracking_url_template etc.), names any
            removal, and gives example_click: one of the campaign's final URLs
            with the campaign's options applied. It is approximate: a template
            on the ad group, ad or keyword overrides the campaign's.
        keyword_match_type: Campaign-level broad match. BROAD turns it on and
            CONVERTS every existing phrase and exact keyword in the campaign to
            broad match (the originals show as Removed; turning it off does not
            restore them), and since September 2026 Google upgrades such
            campaigns to AI Max. Refused unless the campaign uses Smart Bidding
            (MAXIMIZE_CONVERSIONS, MAXIMIZE_CONVERSION_VALUE, TARGET_CPA,
            TARGET_ROAS), checked again at apply; needs a double confirmation.
            UNSPECIFIED turns it off: no further conversions, but converted
            keywords stay broad. Moving a campaign with broad match on to a
            non-Smart bidding_strategy is refused unless the same call passes
            UNSPECIFIED. The preview shows the current value. Empty leaves it
            unchanged.
        geo_exclude_ids: REPLACES the campaign's negative location criteria.
            Omitted leaves them unchanged; [] removes them. May not overlap
            geo_target_ids. The preview shows the current ones
            (current_geo_exclude_ids); dropping any needs a double confirmation,
            because the campaign can serve there again. A location can move
            between geo_target_ids and geo_exclude_ids in one call: its old
            criterion is removed before the new one is created.
        ad_schedule: REPLACES the campaign's schedule windows (shape as in
            draft_campaign). Omitted leaves them unchanged; [] removes them, so
            the campaign serves at all hours. The preview shows the current ones
            (current_ad_schedule). A first schedule and clearing a schedule both
            need a double confirmation. Only windows that differ are removed or
            added, removals first. Apply refuses if the exclusions or windows
            changed after the preview.
draft_responsive_search_ad tool
Draft a Responsive Search Ad — returns a PREVIEW, does NOT create the ad.

    The preview shows exactly what will be created; confirm_and_apply executes
    the returned plan_id. The ad is created PAUSED. final_url is checked for
    reachability first and an unreachable URL is refused. Several headlines
    may pin to the same position (Google rotates them there) as long as every
    position stays fillable, by an asset pinned to it or by a distinct
    unpinned one. Mixed plain-string and dict entries are allowed within a
    single call (e.g. brand pinned to HEADLINE_1, the rest unpinned). Warnings note fewer than 8
    headlines or 3 descriptions.

    Args:
        ad_group_id: Numeric ID of the ad group that gets the ad.
        headlines: 3-15 headlines, max 30 chars each. Each entry is a plain
            string (unpinned) or {"text": "...", "pinned_field": "HEADLINE_1"};
            valid pins are HEADLINE_1, HEADLINE_2, HEADLINE_3. Keyword or
            location insertion such as {KeyWord:Drain Cleaning} counts as its
            default text, which is required.
        descriptions: 2-4 descriptions, max 90 chars each. Each entry is a plain
            string (unpinned) or {"text": "...", "pinned_field": "DESCRIPTION_1"};
            valid pins are DESCRIPTION_1, DESCRIPTION_2. Insertion tags count
            as their default text, as for headlines.
        final_url: Landing page URL the ad links to; must be reachable.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        path1: Optional first display-URL path segment (Google allows up to 15
            chars).
        path2: Optional second display-URL path segment (Google allows up to 15
            chars).
update_responsive_search_ad tool
Update mutable fields on an existing RSA in place — returns a PREVIEW.

    Edits an existing RSA without creating a new ad; the ad keeps its ID.
    Google Ads API v23 (``AdService.MutateAds``) permits in-place mutation of
    ``final_urls``, ``path1``, ``path2``, ``headlines``, and ``descriptions``.
    At least one mutation must be requested.

    IMPORTANT: replacing headlines or descriptions is NOT a free in-place
    edit. Even though the ad ID is preserved, swapping the creative text
    RESETS the ad's asset-combination learning and performance history and
    sends the ad BACK THROUGH Google policy review — Google treats the
    creative as new for optimization. URL-only and path-only edits do not
    incur this. When headlines/descriptions change, the returned preview
    includes a ``warnings`` entry stating this trade-off before anything
    is applied.

    Returns a preview with a plan_id; nothing changes until confirm_and_apply
    applies it.

    Args:
        ad_id: Numeric ID of the existing responsive search ad.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        headlines: LIST-REPLACE: None or [] means no change; a non-empty list
            fully swaps in for the existing headlines. Google's RSA constraints
            apply: 3-15 headlines, max 30 chars each, every pin position fillable.
            Each entry is a plain string (unpinned) or {"text": "...",
            "pinned_field": "HEADLINE_1"} (HEADLINE_1-3). Insertion tags such as
            {KeyWord:Clogged Drain Service} count as their default text, which
            is required.
        descriptions: LIST-REPLACE: None or [] means no change; a non-empty list
            fully swaps in. 2-4 descriptions, max 90 chars each, pins to
            DESCRIPTION_1 or DESCRIPTION_2 with every position fillable. Same
            entry format and insertion-tag counting as headlines.
        final_url: Empty means no change; non-empty replaces the final URL and
            is checked for reachability.
        path1: Empty means no change; non-empty sets the first display path
            (max 15 chars).
        path2: Empty means no change; non-empty sets the second display path
            (max 15 chars).
        clear_path1: True sets path1 to an empty string (overrides path1).
        clear_path2: True sets path2 to an empty string (overrides path2).
draft_keywords tool
Draft keyword additions — returns a PREVIEW, does NOT add keywords.

    Returns a preview with a plan_id, plus a warning when BROAD keywords go into
    a campaign without Smart Bidding; nothing changes until confirm_and_apply
    applies the returned plan_id.

    Args:
        ad_group_id: Numeric ID of the ad group that gets the keywords.
        keywords: List of {"text": "keyword phrase", "match_type":
            "EXACT|PHRASE|BROAD"}; at least one is required.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
get_custom_conversion_goals tool
Read the custom conversion goals and the campaign goal configuration.

    Returns every custom goal with its name, status and conversion actions,
    plus — optionally for one campaign — the goal config the campaign uses
    (`goal_config_level` CUSTOMER or CAMPAIGN and the assigned custom goal).

    A custom conversion goal bundles conversion actions into a named set that a
    campaign can be pointed at. Ahead of drafting, this shows which goals
    exist, which actions they contain and what a campaign currently uses.

    Args:
        campaign_id: Numeric campaign ID. When omitted, the campaign config
            is skipped.
        customer_id: Ads account ID. Defaults to the configured account.
draft_custom_conversion_goal tool
Create a custom conversion goal — returns a PREVIEW.

    The goal bundles conversion actions into a named set that campaigns can
    then be pointed at with draft_assign_custom_conversion_goal. Only the goal
    is created: conversion actions are read for validation and never modified.
    It is always created ENABLED — a goal created as REMOVED would be invisible
    to every other tool, so there is nothing to plan.

    If a goal with the same name and exactly the same conversion actions
    already exists, nothing is planned and the result says `already_exists`
    with that goal's ID (REMOVED goals do not count). A name that exists with
    different actions is changed with draft_update_custom_conversion_goal.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        name: Name for the new goal, e.g. "OHL | Kauf + qualifizierte Anrufe".
        conversion_action_ids: Numeric conversion action IDs. Duplicates are
            collapsed; unknown or REMOVED actions are refused.
        customer_id: Ads account ID. Defaults to the configured account.
draft_update_custom_conversion_goal tool
Rename and/or re-scope an existing custom conversion goal — PREVIEW.

    conversion_action_ids REPLACES the whole action list, it does not append.
    An empty parameter stays unchanged. The preview shows the action
    list before and after.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        custom_conversion_goal_id: Numeric goal ID from get_custom_conversion_goals.
        name: New name. Empty leaves the name unchanged.
        conversion_action_ids: The complete new action list. Empty leaves the
            actions unchanged.
        customer_id: Ads account ID. Defaults to the configured account.
draft_assign_custom_conversion_goal tool
Point a campaign at a custom conversion goal — returns a PREVIEW.

    Sets goal_config_level=CAMPAIGN and the goal on that campaign's conversion
    goal config. Nothing else changes: conversion actions, bidding, budgets and
    the account-level goals stay as they are.

    A campaign must have at least one goal configured when it switches to
    campaign level — Google answers EMPTY_CONVERSION_GOALS otherwise. That is
    why this tool assigns a goal instead of clearing goals;
    draft_clear_custom_conversion_goal goes back to the account level.

    If the campaign already uses exactly this goal, nothing is planned and the
    result says `already_configured`. The preview carries a note that changing
    what a campaign optimises for restarts its Smart Bidding learning period.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        campaign_id: Numeric campaign ID to configure.
        custom_conversion_goal_id: Numeric goal ID from get_custom_conversion_goals.
        customer_id: Ads account ID. Defaults to the configured account.
draft_clear_custom_conversion_goal tool
Put a campaign back on the account-level goals — returns a PREVIEW.

    Sets goal_config_level=CUSTOMER and clears the custom goal: the rollback for
    draft_assign_custom_conversion_goal. The account-level goals themselves are
    not touched.

    The returned plan_id is applied with confirm_and_apply.

    Args:
        campaign_id: Numeric campaign ID to reset.
        customer_id: Ads account ID. Defaults to the configured account.
add_negative_keywords tool
Draft negative keyword additions — returns a PREVIEW.

    Negative keywords prevent your ads from showing for irrelevant searches.
    They are added at campaign level. Returns a preview with a plan_id; nothing
    changes until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the campaign that gets the negatives.
        keywords: Negative keyword texts; at least one is required. All share
            the same match_type.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
        match_type: "EXACT" (default), "PHRASE", or "BROAD".
add_negative_locations tool
Draft negative geo location additions — returns a PREVIEW.

    Excludes cities/regions from a campaign while keeping broader positive
    targets such as State of Sao Paulo. Returns a preview with a plan_id;
    nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the campaign to add the location exclusions to.
        geo_target_ids: Numeric Google geo target constant IDs to exclude (e.g.
            "1001773"). Duplicates are collapsed; non-numeric IDs are rejected.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
propose_negative_keyword_list tool
Draft a shared negative keyword list and attach it to a campaign — returns a PREVIEW.

    Creates a reusable negative keyword list (shared set) that can later be
    applied to multiple campaigns, whereas add_negative_keywords adds negatives
    directly to one campaign. Returns a preview with a plan_id; nothing changes
    until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the campaign the new list is attached to.
        list_name: Name of the new shared negative keyword list.
        keywords: Negative keyword texts to put in the list (at least one).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        match_type: Match type applied to every keyword: "EXACT" (default),
            "PHRASE", or "BROAD" (case-insensitive).
add_to_negative_keyword_list tool
Append keywords to an EXISTING shared negative keyword list — returns a PREVIEW.

    Adds terms to a list that already exists (propose_negative_keyword_list
    creates a new list instead); get_negative_keyword_list_keywords shows the
    terms already in a list. Returns a preview with a plan_id; nothing changes
    until confirm_and_apply applies it.

    Args:
        shared_set_id: Numeric ID of the list (shared_set.id from
            get_negative_keyword_lists).
        keywords: Keyword strings to append. Blank entries are dropped and
            duplicates in the input list are collapsed (case-insensitive).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        match_type: Match type applied to every keyword: "EXACT" (default),
            "PHRASE", or "BROAD" (case-insensitive).
attach_shared_set_to_campaigns tool
Attach an existing shared set to one or more campaigns — returns a PREVIEW.

    Creates CampaignSharedSet linkages so the campaigns inherit the shared
    set's criteria (e.g. negative keywords). Most commonly used to attach a
    shared negative keyword list to newly-built campaigns;
    get_negative_keyword_list_campaigns lists existing attachments. Returns a
    preview with a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        shared_set_id: Numeric ID of the shared set (from
            get_negative_keyword_lists).
        campaign_ids: Numeric campaign IDs to attach the set to (at least one).
            Blank entries are dropped and duplicates collapsed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
detach_shared_set_from_campaigns tool
Detach a shared set from one or more campaigns — returns a PREVIEW.

    Removes CampaignSharedSet linkages so the campaigns no longer inherit the
    shared set's criteria. The shared set itself is unchanged; only the
    per-campaign attachment is removed. get_negative_keyword_list_campaigns
    lists the existing attachments. Returns a preview with a plan_id; nothing
    changes until confirm_and_apply applies it.

    Args:
        shared_set_id: Numeric ID of the shared set (from
            get_negative_keyword_lists).
        campaign_ids: Numeric campaign IDs to detach the set from (at least one).
            Blank entries are dropped and duplicates collapsed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
get_ai_max_settings tool
Read the AI Max controls of Search campaigns, per campaign and ad group.

    Returns for every campaign: id, name, status, advertising channel type,
    campaign.ai_max_setting.enable_ai_max, campaign.ai_max_setting.bundling_required
    (output only) and the full campaign.asset_automation_settings list. Each
    campaign also carries its non-REMOVED ad groups with
    ad_group.ai_max_ad_group_setting.disable_search_term_matching.

    Shows the current state ahead of draft_ai_max_settings, and what the
    account actually looks like after confirm_and_apply.

    Args:
        campaign_id: Numeric campaign ID. When omitted, every non-removed
            Search campaign in the account is listed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
get_campaign_settings tool
Read every setting that decides how far a Search campaign reaches, in one call.

    Returns one flat record per campaign: status, bidding strategy and its
    target or CPC ceiling, daily budget and whether it is shared, the Google
    Search / search partner / Display network flags, the location option
    (positive_geo_target_type) and its negative counterpart, campaign-level
    broad match (keyword_match_type), the tracking template, final URL suffix
    and custom parameters, and the AI Max state get_ai_max_settings reports
    (enable_ai_max, asset automation per type). Money is in the account
    currency (`currency`).

    Each campaign lists its `widening_settings`: search partners or Display on,
    a presence-or-interest location option, broad match on, AI Max on, an
    automation opted in. `insights[]` names the campaigns that have any. Made
    for recurring audits: the same call every week diffs cleanly.

    Args:
        campaign_id: Numeric campaign ID of a Search campaign. When omitted,
            every non-removed Search campaign in the account is listed.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_ai_max_settings tool
Draft AI Max controls for a Search campaign — returns a PREVIEW.

    AI Max is the container that makes brand exclusions usable in Search:
    Google rejects a brand list on a plain Search campaign ("For search
    advertising channel, brand lists can only be applied to exclusive
    targeting, broad match campaigns for inclusive targeting or PMax generated
    campaigns"). Turning AI Max on while leaving its automations running is the
    trap, so both belong to the same plan. An automation the caller never mentioned is
    refused outright (the plan says which switch to pass); one named explicitly
    (disable_search_term_matching=False, text_asset_automation="OPTED_IN") is
    planned with requires_double_confirm=True, because switching to AI Max with
    its automations is a real configuration some accounts want.

    Reads the campaign and its ad groups first, so the preview names concrete
    ad groups and shows current values per knob. Returns a preview with a
    plan_id; nothing is written until confirm_and_apply runs.

    Args:
        campaign_id: Numeric ID of the Search campaign to prepare.
        enable_ai_max: Value for campaign.ai_max_setting.enable_ai_max. When
            omitted, it stays untouched.
        disable_search_term_matching: Value for
            ad_group.ai_max_ad_group_setting.disable_search_term_matching on the
            selected ad groups. When omitted, they stay untouched.
        ad_group_ids: Explicit ad group IDs. Empty means every non-removed ad
            group of the campaign.
        include_paused_ad_groups: Default true — paused groups are set as well,
            so re-enabling one later cannot silently restore search term
            matching. REMOVED ad groups are never touched.
        text_asset_automation: OPTED_IN, OPTED_OUT or UNCHANGED (default) for
            TEXT_ASSET_AUTOMATION.
        final_url_expansion: OPTED_IN, OPTED_OUT or UNCHANGED (default) for
            FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION (the v25 field name for
            final URL expansion).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_prepare_brand_exclusions tool
Draft the safe standard state for brand exclusions — returns a PREVIEW.

    Exactly one combination, nothing else: enable_ai_max = true,
    disable_search_term_matching = true (all non-removed ad groups),
    TEXT_ASSET_AUTOMATION = OPTED_OUT and
    FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION = OPTED_OUT.

    No bidding, keyword, match type, ad, URL or budget change, and no brand list
    is attached — attaching stays a separate step with propose_brand_list /
    attach_brand_list_to_campaigns once this state is verified in the account.

    Returns a preview with a plan_id (purpose brand_exclusions); nothing changes
    until confirm_and_apply applies it.

    Args:
        campaign_id: Numeric ID of the Search campaign to prepare.
        include_paused_ad_groups: Default true — paused ad groups are set too,
            so re-enabling one later cannot silently restore search term
            matching.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_demographic_targeting tool
Draft demographic targeting (age/gender/parental status/income) — returns a PREVIEW.

    By default, Google Ads serves to all demographic segments. This tool adds
    criteria that EXCLUDE a segment (negative=True, default) or NARROW
    targeting to it (negative=False — uncommon). Takes exactly one of
    ad_group_id or campaign_id, and at least one of the four demographic lists
    must contain a value.

    Returns a preview with a plan_id, plus warnings when the change narrows
    targeting, excludes 'undetermined' users, or excludes nearly a whole
    dimension; nothing changes until confirm_and_apply applies it.

    Args:
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        ad_group_id: Numeric ad group ID to add the criteria to. Mutually
            exclusive with campaign_id.
        campaign_id: Numeric campaign ID to add the criteria to. Mutually
            exclusive with ad_group_id; campaign-level criteria can only be
            exclusions (negative=True).
        age_ranges: Age buckets '18-24', '25-34', '35-44', '45-54', '55-64',
            '65+', 'undetermined' (or canonical names such as AGE_RANGE_18_24).
            Google's buckets are FIXED — 'Exclude 23-35' has no exact mapping
            and needs a choice of buckets.
        genders: 'female', 'male', 'undetermined'.
        parental_statuses: 'parent', 'not_a_parent', 'undetermined'.
        income_ranges: PERCENTILES (not currency): 'top-10', '11-20', '21-30',
            '31-40', '41-50', 'lower-50', 'undetermined'. Available in select
            countries only (US, AU, JP, etc.).
        negative: True (default) excludes the listed segments; False adds
            positive criteria that narrow an ad group's targeting to them.
update_ad_group tool
Draft an ad group update for name and/or manual CPC bid — returns a PREVIEW.

    A bid change applies only when the campaign uses MANUAL_CPC: automated
    bidding strategies ignore ad-group CPC bids, so such a change is refused
    (for Maximize Clicks the campaign cpc_bid_ceiling, set through
    update_campaign, is the active constraint). Bid increases above the
    configured safety.max_bid_increase_pct are refused. Returns a preview with
    a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        ad_group_id: Numeric ID of the ad group to update.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        ad_group_name: New ad group name. Empty leaves the name unchanged.
        max_cpc: New maximum CPC bid in the account's currency (an amount, not
            micros). 0 leaves the bid unchanged; negative values are rejected.
            At least one of ad_group_name or max_cpc is required.
draft_callouts tool
Draft callout assets for an ad group, a campaign or the account — returns a PREVIEW.

    Creates callout assets and links them where the id points: ad_group_id
    links to that ad group, campaign_id to that campaign. Account-wide
    linking (every campaign without callouts of its own) needs
    scope="account" and no id. Returns a preview with a plan_id; nothing
    changes until confirm_and_apply applies it.

    Args:
        callouts: Callout texts (at least one), each non-empty and at most 25
            characters after trimming.
        campaign_id: Numeric ID of the campaign to link the callouts to.
        ad_group_id: Numeric ID of the ad group to link them to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        start_date: First day the callouts show, YYYY-MM-DD. Empty: from now.
        end_date: Last day the callouts show, YYYY-MM-DD, so seasonal callouts
            switch off by themselves. Empty: no end.
draft_structured_snippets tool
Draft structured snippet assets for an ad group, a campaign or the account — returns a PREVIEW.

    Creates structured snippet assets and links them where the id points:
    ad_group_id links to that ad group, campaign_id to that campaign.
    Account-wide linking needs scope="account" and no id. Returns a preview
    with a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        snippets: At least one dict with "header" and "values". header is one of
            Google's snippet headers, in the language of the values: Amenities,
            Brands, Courses, Degree programs, Destinations, Featured Hotels,
            Insurance coverage, Models, Neighborhoods, Services, Shows, Styles,
            Types, or Google's translation of one (German: Typen, Marken,
            Dienstleistungen, Modelle, Kurse, ...; case does not matter).
            values is a list of 3-10 non-empty strings, each at most 25
            characters.
        campaign_id: Numeric ID of the campaign to link the snippets to.
        ad_group_id: Numeric ID of the ad group to link them to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_call_asset tool
Draft a call asset (a phone number shown with the ads) — returns a PREVIEW.

    Creates the call asset and links it where the id points: ad_group_id
    links to that ad group, campaign_id to that campaign. Account-wide
    linking needs scope="account" and no id. Google reviews the number
    before it serves. Returns a preview with a plan_id.

    Args:
        phone_number: The number, national ("030 1234567", "(916) 555-0142")
            or international ("+49 30 1234567"). Normalised to E.164.
        country_code: ISO 3166-1 alpha-2 country of the number ("DE", "US").
            Required; it decides how a national number is read and must
            match the country code of an international one.
        campaign_id: Numeric ID of the campaign to link the number to.
        ad_group_id: Numeric ID of the ad group to link it to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        call_conversion_action_id: Numeric ID of the conversion action that
            counts calls from this number. Empty keeps the account's call
            conversion setting.
        ad_schedule: Optional windows when the number shows, each
            {day_of_week: MONDAY..SUNDAY, start_hour: 0-23, end_hour: 0-24,
            start_minute/end_minute: 0, 15, 30 or 45}. Hours are in the
            account time zone.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
update_call_asset tool
Draft changing a call asset in place — returns a PREVIEW.

    Only the fields passed change. The asset keeps its ID and its links, so
    the change shows everywhere it is linked. The preview shows the current
    values and pins them; an edit in Google Ads before the apply stops it.

    Args:
        asset_id: Numeric ID of the CALL asset.
        phone_number: New number, national or international; needs
            country_code.
        country_code: ISO 3166-1 alpha-2 country of the new number. Required
            with phone_number, and only accepted together with it.
        call_conversion_action_id: Numeric ID of the conversion action that
            counts calls; sets USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.
        call_conversion_reporting_state: DISABLED,
            USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION or
            USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.
        ad_schedule: Windows that replace the number's whole schedule (same
            shape as draft_call_asset). Empty leaves the schedule as it is.
        clear_ad_schedule: True removes the schedule, so the number shows at
            all hours.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
add_ad_schedule tool
Draft ad schedule windows for a campaign — returns a PREVIEW.

    Adds the windows; existing ones stay. The preview lists the current
    windows (each with the remove_id that remove_entity takes as a
    campaign_criterion) and the account time zone the hours are in.
    Overlapping windows and more than six a day are refused. A campaign
    without any window serves at all hours, so its first windows restrict it
    to them: that preview needs a double confirmation.

    Args:
        campaign_id: Numeric ID of the campaign.
        schedule: Windows to add, each {day_of_week: MONDAY..SUNDAY,
            start_hour: 0-23, end_hour: 0-24, start_minute/end_minute: 0, 15,
            30 or 45 (default 0)}. Whole numbers only. Hours are in the
            account time zone.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_promotion tool
Draft a promotion asset ("20% off winter tyres") — returns a PREVIEW.

    Creates the promotion and links it where the id points: ad_group_id
    links to that ad group, campaign_id to that campaign. Account-wide
    linking needs scope="account" and no id. The final_url is checked for
    reachability. Returns a preview with a plan_id.

    Args:
        promotion_target: What the promotion is for, shown in the ad (at
            most 20 characters).
        final_url: Landing page of the promotion.
        language_code: Language of the promotion's text ("de", "en").
            Required: Google shows the promotion in that language.
        money_off: Fixed discount, in the account currency unless
            currency_code says otherwise. Pass this or percent_off.
        percent_off: Percentage discount, greater than 0 and at most 100
            (15.5 for 15.5%). Pass this or money_off.
        campaign_id: Numeric ID of the campaign to link the promotion to.
        ad_group_id: Numeric ID of the ad group to link it to, instead of a
            campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        currency_code: ISO 4217 code for money_off and orders_over_amount.
            Empty uses the account currency (shown in the preview).
        promotion_code: Optional coupon code (at most 15 characters). Pass
            this or orders_over_amount, not both.
        orders_over_amount: Optional minimum order value that unlocks the
            promotion.
        occasion: Optional occasion such as BLACK_FRIDAY, CHRISTMAS or
            SUMMER_SALE.
        discount_modifier: "UP_TO" shows "Up to 20% off"; empty for none.
        start_date: First day the promotion shows, YYYY-MM-DD.
        end_date: Last day the promotion shows, YYYY-MM-DD.
        redemption_start_date: First day the offer can be redeemed, YYYY-MM-DD.
        redemption_end_date: Last day the offer can be redeemed, YYYY-MM-DD.
        ad_schedule: Optional windows when the promotion shows, each
            {day_of_week: MONDAY..SUNDAY, start_hour: 0-23, end_hour: 0-24,
            start_minute/end_minute: 0, 15, 30 or 45}. Hours are in the
            account time zone.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
update_promotion tool
Draft changing a promotion asset in place — returns a PREVIEW.

    Only the fields passed change; everything else stays as it is. The
    asset keeps its ID and history, and the change shows everywhere it is
    linked. Passing money_off replaces a percent_off (and the other way
    round); passing promotion_code replaces an orders_over_amount (and the
    other way round). The preview shows old and new values; an edit in
    Google Ads before the apply stops it.

    Args:
        asset_id: Numeric ID of the PROMOTION asset.
        promotion_target: New target text, at most 20 characters.
        final_url: New landing page; must be reachable.
        money_off: New fixed discount.
        percent_off: New percentage discount, at most 100.
        currency_code: ISO 4217 code for the amounts. Empty keeps the
            promotion's currency (or uses the account currency).
        promotion_code: New coupon code, at most 15 characters.
        orders_over_amount: New minimum order value.
        occasion: New occasion such as BLACK_FRIDAY.
        discount_modifier: "UP_TO", or clear it with clear_fields.
        language_code: New language of the promotion's text.
        start_date: First day the promotion shows, YYYY-MM-DD.
        end_date: Last day the promotion shows, YYYY-MM-DD.
        redemption_start_date: First day the offer can be redeemed, YYYY-MM-DD.
        redemption_end_date: Last day the offer can be redeemed, YYYY-MM-DD.
        clear_fields: Optional fields to remove: promotion_code,
            orders_over_amount, occasion, discount_modifier, start_date,
            end_date, redemption_start_date, redemption_end_date,
            ad_schedule.
        ad_schedule: Windows that replace the promotion's whole schedule (same
            shape as draft_promotion). Empty leaves the schedule as it is.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_price_asset tool
Draft a price asset (the row of prices under an ad) — returns a PREVIEW.

    Creates a price asset with 3-8 offerings and links it where the id
    points: ad_group_id links to that ad group, campaign_id to that
    campaign. Account-wide linking needs scope="account" and no id. Every
    offering URL is checked for reachability. Google disapproves prices that
    differ from the landing page. Returns a preview with a plan_id.

    Args:
        offerings: 3-8 dicts, each with header and description (at most 25
            characters each, headers unique), price (greater than 0),
            final_url, and optional final_mobile_url and unit (PER_HOUR,
            PER_DAY, PER_WEEK, PER_MONTH, PER_YEAR, PER_NIGHT).
        price_type: SERVICES, BRANDS, EVENTS, LOCATIONS, NEIGHBORHOODS,
            PRODUCT_CATEGORIES, PRODUCT_TIERS, SERVICE_CATEGORIES or
            SERVICE_TIERS.
        language_code: Language of the offerings' text ("de", "en").
            Required.
        campaign_id: Numeric ID of the campaign to link the prices to.
        ad_group_id: Numeric ID of the ad group to link them to, instead of
            a campaign.
        scope: Empty (follows the id), "campaign", "ad_group" or "account".
        price_qualifier: FROM ("From 49 EUR"), UP_TO or AVERAGE; empty for
            none.
        currency_code: ISO 4217 code of the prices. Empty uses the account
            currency (shown in the preview).
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_business_name_asset tool
Draft a business name asset for a campaign or the account — returns a PREVIEW.

    Creates a text asset and links it as the business name shown with the
    ads. Google links business names at campaign or account level only.
    Account-wide needs scope="account" and no campaign_id. Returns a preview
    with a plan_id.

    Args:
        business_name: The name, at most 25 characters.
        campaign_id: Numeric ID of the campaign to link it to.
        scope: Empty (campaign, from campaign_id), "campaign" or "account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
link_asset_to_customer tool
Draft linking existing assets at account level — returns a PREVIEW.

    Account-level assets serve on every eligible campaign that has no asset
    of the same type linked at campaign or ad-group level. Each asset is
    checked to exist and to match its field type. Returns a preview with a
    plan_id.

    Args:
        links: Dicts with "asset_id" (numeric) and "field_type", one of
            BUSINESS_NAME, BUSINESS_LOGO, CALL, CALLOUT, HOTEL_CALLOUT,
            MOBILE_APP, PRICE, PROMOTION, SITELINK, STRUCTURED_SNIPPET.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
update_callout tool
Draft changing a callout asset in place — returns a PREVIEW.

    Only what is passed changes. The asset keeps its ID and performance
    history, and the change shows everywhere it is linked. The preview pins
    the current values; if someone edits the asset in Google Ads before the
    apply, nothing is sent.

    Args:
        asset_id: Numeric ID of the callout asset.
        callout_text: The new text, at most 25 characters. Empty keeps it.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        start_date: First day the callout shows, YYYY-MM-DD. Empty keeps it.
        end_date: Last day the callout shows, YYYY-MM-DD. Empty keeps it.
        clear_fields: "start_date" and/or "end_date" to remove that date.
update_sitelink tool
Draft changing a sitelink asset in place — returns a PREVIEW.

    Only the fields passed change; empty fields stay as they are. The asset
    keeps its ID and performance history everywhere it is linked. A new
    final_url is checked for reachability. The preview pins the current
    values; an edit in Google Ads before the apply stops it.

    Args:
        asset_id: Numeric ID of the sitelink asset.
        link_text: New link text, at most 25 characters.
        final_url: New landing page URL; must be reachable.
        description1: New first description line, at most 35 characters.
        description2: New second description line, at most 35 characters.
            Google needs both description lines or neither.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        start_date: First day the sitelink shows, YYYY-MM-DD. Empty keeps it.
        end_date: Last day the sitelink shows, YYYY-MM-DD. Empty keeps it.
        clear_fields: "start_date" and/or "end_date" to remove that date.
update_structured_snippet tool
Draft changing a structured snippet asset in place — returns a PREVIEW.

    Replaces the snippet's values (and header, if given). The asset keeps
    its ID and performance history everywhere it is linked. The preview
    pins the current header and values; an edit in Google Ads before the
    apply stops it.

    Args:
        asset_id: Numeric ID of the structured snippet asset.
        values: The complete new list of 3-10 values, each at most 25
            characters.
        header: New header (English or translated, as in
            draft_structured_snippets); empty keeps the current one as Google
            stores it, whatever its language.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_image_assets tool
Draft image assets from local files, public image URLs or uploads — returns a PREVIEW.

    At least one image in total is required across image_paths, image_urls
    and upload_ids.
    Images must be PNG, JPEG or GIF and at most 5120 KB (Google's limit).
    URL images are downloaded now and checked; applying re-downloads them
    and refuses if the image changed since the preview. Returns a preview with
    a plan_id and a per-image summary; nothing changes until confirm_and_apply
    applies it.

    Args:
        campaign_id: Numeric ID of the campaign to attach the images to. Leave
            empty with scope="account".
        image_paths: Local PNG/JPEG/GIF file paths on the machine running
            AdLoop. Not available on a hosted server, where image_urls
            applies instead.
        image_urls: Public http(s) URLs of PNG/JPEG/GIF images. Links to
            private, local or internal addresses are refused.
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        upload_ids: Ids of images the user uploaded (up_..., from
            upload_images or list_uploads). The way to use an image that has
            no public URL.
        scope: Empty follows campaign_id. "account" links the images
            account-wide, which Google allows for BUSINESS_LOGO only and which
            is never inferred from an empty campaign_id. An account takes one
            business logo: while one is linked, the draft is refused and
            names the link to remove first.
        field_types: One per image, in the order upload_ids, image_paths,
            image_urls: AD_IMAGE (campaign links; the default) or BUSINESS_LOGO
            (campaign or account links). Required with scope="account".
pause_entity tool
Draft pausing a campaign, ad group, ad, or keyword — returns a PREVIEW.

    Pausing is reversible with enable_entity. Returns a preview with a plan_id
    (target status PAUSED); nothing changes until confirm_and_apply applies it.

    Args:
        entity_type: "campaign", "ad_group", "ad", "keyword" or
            "asset_group" (Performance Max).
        entity_id: ID in the format for its type. campaign: campaign ID (e.g.
            "12345678"); ad_group: ad group ID (e.g. "12345678"); ad:
            "adGroupId~adId" (e.g. "12345678~987654"; a bare ad ID is resolved
            to its ad group at apply time); keyword: "adGroupId~criterionId"
            (e.g. "12345678~987654").
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
enable_entity tool
Draft enabling a paused campaign, ad group, ad, or keyword — returns a PREVIEW.

    Returns a preview with a plan_id (target status ENABLED); nothing changes
    until confirm_and_apply applies it.

    Args:
        entity_type: "campaign", "ad_group", "ad", "keyword" or
            "asset_group" (Performance Max).
        entity_id: ID in the format for its type. campaign: campaign ID (e.g.
            "12345678"); ad_group: ad group ID (e.g. "12345678"); ad:
            "adGroupId~adId" (e.g. "12345678~987654"; a bare ad ID is resolved
            to its ad group at apply time); keyword: "adGroupId~criterionId"
            (e.g. "12345678~987654").
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
remove_entity tool
Draft REMOVING an entity — returns a PREVIEW. This is IRREVERSIBLE.

    Removed entities cannot be re-enabled; pause_entity is the reversible way
    to temporarily disable something. Returns a preview with a plan_id and
    requires_double_confirm=true; nothing changes until confirm_and_apply
    applies it.

    Args:
        entity_type: "campaign", "ad_group", "ad", "keyword", "asset_group",
            "negative_keyword", "shared_criterion", "campaign_asset",
            "ad_group_asset", "asset", "customer_asset", "ad_group_criterion", or
            "campaign_criterion".
        entity_id: The resource ID. campaign / ad_group / asset_group / asset: simple numeric
            ID. ad: "adGroupId~adId" (a bare ad ID is resolved to its ad group).
            keyword and ad_group_criterion: "adGroupId~criterionId".
            negative_keyword and campaign_criterion: "campaignId~criterionId"
            (the resource_id field from get_negative_keywords).
            shared_criterion: "sharedSetId~criterionId" (the resource_id field
            from get_negative_keyword_list_keywords). campaign_asset:
            "campaignId~assetId~fieldType". ad_group_asset:
            "adGroupId~assetId~fieldType". customer_asset: "assetId~fieldType".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
draft_sitelinks tool
Draft sitelink extensions for a campaign or the account — returns a PREVIEW.

    Sitelinks appear as additional links below your ad, increasing click area
    and directing users to specific pages. Every final_url is fetched and an
    unreachable URL (HTTP 4xx/5xx) blocks the draft. Google recommends at least
    4 sitelinks per campaign; fewer than 2 may not show. Returns a preview with
    a plan_id and any warnings; nothing changes until confirm_and_apply applies
    it.

    Args:
        sitelinks: List of dicts (at least one), each with link_text (str,
            required, max 25 chars) — the clickable text shown; final_url (str,
            required) — destination URL for this sitelink; description1 (str,
            optional, max 35 chars) — first description line; description2
            (str, optional, max 35 chars) — second description line;
            start_date / end_date (str, optional, YYYY-MM-DD) — first and last
            day the sitelink shows, so seasonal links switch off by themselves.
        campaign_id: Numeric ID of the campaign to attach sitelinks to. Leave
            empty with scope="account".
        customer_id: Google Ads customer ID (digits, dashes optional). Defaults to
            the configured account.
        scope: Empty follows campaign_id. "account" links the sitelinks
            account-wide; they serve on every eligible campaign without sitelinks
            of its own. It is never inferred from an empty campaign_id.
confirm_and_apply tool
Execute a previously previewed change.

    IMPORTANT: Defaults to dry_run=True (validate only). Only an explicit
    dry_run=false applies the change to the ad account (Google Ads or Reddit
    Ads — the plan knows which platform it targets).

    Forced dry runs: when real changes are switched off (live changes off
    for the workspace in AdLoop Cloud, or safety.require_dry_run in a
    self-hosted config), dry_run=false is IGNORED and the result is still
    DRY_RUN_SUCCESS, with 'dry_run_forced_by' and 'remediation' fields.
    'remediation' says how the user switches that setting; until it is
    changed, repeated calls with dry_run=false change nothing.

    Two-phase apply: if 'safety.two_phase_apply: true' is set (always on
    for AdLoop Cloud tenants), dry_run=false is REFUSED with status
    DRY_RUN_REQUIRED until this plan_id has completed one dry_run=true
    pass. The sequence is: dry run, review of its result, then the real
    apply.

    Google Ads plans: the dry run sends the exact mutates to Google with
    validate_only=True, so Google checks the change and executes nothing
    (`checks` counts the validated calls). Steps that build on an object an
    earlier step would create cannot be validated and are counted as skipped.

    Reddit plans: Reddit has no validate-only mode, so the dry run re-reads
    the target entity and re-checks the safety caps (returned as `checks`).

    A DRY_RUN_FAILED result means the change does not go through as previewed.
    The real apply fails the same way, unless Google rejected only part of the
    request: then it carries out the rest and reports those operations again.

    Returns a status with the plan_id and operation: DRY_RUN_SUCCESS,
    DRY_RUN_FAILED, DRY_RUN_REQUIRED, BLOCKED, APPLIED, PARTIAL_UPLOAD,
    PARTIAL_APPLY, UNKNOWN_OUTCOME or APPLY_IN_PROGRESS. BLOCKED means the
    operation was added to safety.blocked_operations after the draft: nothing
    ran and the plan stays pending. APPLIED results carry the created or changed resource
    names under 'result'. PARTIAL_UPLOAD belongs to the upload tools: the
    batches it lists are already in the account, so the plan is retired.
    'sent_total', 'accepted_total', 'rejected_total' and 'resume_from_line'
    say how far the upload got and at which CSV line a new draft continues;
    when a batch's fate is unknown, 'unknown_status', 'uncertain_lines' and
    'row_errors' name the rows whose outcome has to be checked first.
    PARTIAL_APPLY and UNKNOWN_OUTCOME come from platforms without
    transactional writes: part of the change is in the account ('created'
    names it), or a create was never answered. The plan is retired; read the
    account back and draft only what is missing. APPLY_IN_PROGRESS means an
    earlier call claimed this plan first, so this call executed nothing.

    Approval cards: in AI apps that show AdLoop's approval card with the
    preview, dry_run=false is REFUSED with status APPROVE_ON_CARD, because
    only the user's click on the card applies the change. Dry runs still
    work. The workspace owner can allow approval in chat as well.

    Confirmation dialogs: in apps that show dialogs instead, dry_run=false
    first asks the user in a dialog. A declined dialog returns NOT_CONFIRMED;
    an app that receives the dialog but never answers it gets
    CONFIRMATION_UNANSWERED on the next call, with the ways out.

    Args:
        plan_id: The plan_id returned by a prior draft_*, update_*, add_*,
            pause/enable/remove or other preview tool call. An unknown or
            expired plan_id returns an error.
        dry_run: True (default) validates without changing anything; false
            applies the change for real.
approve_change tool
Run, apply or discard a previewed change from its approval card.

    Called only by the AdLoop approval card when the user clicks a button;
    AI apps keep this tool out of the model's tool list.

    Args:
        plan_id: The plan shown on the card.
        code: The card's approval code for this plan.
        action: "test" (dry run), "apply" (real change) or "discard".
        acknowledged: The user ticked "cannot be undone"; required to apply a
            plan that needs double confirmation.
upload_images tool
Let the user upload images (PNG, JPEG, GIF up to 5 MB) for ad assets.

    For images without a public URL, such as a file on the user's computer
    or an image attached in the chat. An attached image cannot reach a tool,
    so the user drops the same file on the card. Apps that show AdLoop's
    cards display an upload card where the user drops the files; the card
    then posts the upload ids into the chat. On AdLoop Cloud in other apps the result
    carries an upload link for the user (or a coding agent, with curl).
    Uploads expire after a day. The ids go into upload_ids of
    draft_image_assets, or as "upload:<id>" into the image fields of
    draft_reddit_ad. Returns the current uploads and how to add more.
upload_conversion_csv tool
Let the user upload a conversion CSV for an offline conversion upload.

    For the CSV behind draft_upload_call_conversions or
    draft_upload_enhanced_conversions_for_leads when the file is not on the
    machine running AdLoop, as on AdLoop Cloud. Apps that show AdLoop's
    cards display an upload card where the user drops the .csv file; the
    card then posts the upload id into the chat. Other apps on AdLoop Cloud
    get an upload link for the user (or a coding agent, with curl). The
    file holds personal data (phone numbers, emails), so it is kept for two
    hours at most and deleted as soon as a draft has read it. Returns the
    CSV uploads waiting to be used and how to add one.
store_image_upload tool
Store a file dropped on the AdLoop upload card.

    Called only by the upload card; AI apps keep this tool out of the
    model's tool list. Returns the upload's id, type and size (dimensions
    for images, lines for CSVs).

    Args:
        name: The file name, used for the asset name.
        data_base64: The file content, base64-encoded.
        code: The upload card's code from upload_images or
            upload_conversion_csv.
        kind: "image" (default) or "csv" for a conversion CSV.
list_uploads tool
List the files the user uploaded to AdLoop that have not expired.

    Returns each upload's upload_id, kind (image or csv), name, type, size,
    dimensions (images) or lines (CSVs) and hours until it expires: images
    last a day, conversion CSVs two hours or until a draft reads them. The
    ids of files the user sent through an upload link show up here.
list_reddit_accounts tool
List Reddit businesses and ad accounts the connected Reddit user can access.

    Returns the Reddit username, the businesses, and per ad account the
    ad_account_id values (plus currency, time zone and approval state) that
    every other Reddit tool takes. Requires the Reddit Ads connection
    (adloop init → Reddit step, or Settings → Reddit Ads in Cloud).
list_reddit_funding_instruments tool
Funding instruments (billing) and posting profiles of a Reddit ad account.

    Returns funding_instruments (funding_instrument_id, currency, is_servable,
    reasons_not_servable, credit limit and billable amount in account
    currency) and profiles (profile_id, username). draft_reddit_campaign needs
    a servable funding_instrument_id; draft_reddit_ad needs the profile_id
    that authors the post. Both come from here.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
get_reddit_campaigns tool
List Reddit campaigns with status, objective, budget mode and bids.

    Returns the account currency, the campaigns, and insights for campaigns
    blocked by account state. Each campaign carries configured_status (what
    was set) and effective_status (what Reddit computes: PENDING_APPROVAL,
    REJECTED, PENDING_BILLING_INFO, ...). Money is in account currency.
    Budgets live on ad groups unless is_campaign_budget_optimization is true.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        include_archived: Include ARCHIVED and DELETED campaigns, which are
            left out by default.
get_reddit_ad_groups tool
List Reddit ad groups (budget, bid, pixel, weekly schedule, targeting summary), optionally per campaign.

    Returns the account currency, the ad groups, and insights. Reddit
    requires conversion_pixel_id on every ad group; insights flag ad groups
    without one and name ad groups that run on a weekly schedule.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        campaign_id: Reddit campaign id (from get_reddit_campaigns) to limit
            the list to; empty lists every ad group of the account.
get_reddit_ads tool
List Reddit ads with status, rejection_reason, post and click URL.

    Returns the ads and insights: insights flag REJECTED ads (policy review)
    and ads still PENDING_APPROVAL.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        ad_group_id: Reddit ad group id (from get_reddit_ad_groups) to limit
            the list to; empty means no ad group filter.
        campaign_id: Reddit campaign id (from get_reddit_campaigns) to limit
            the list to; empty means no campaign filter.
        include_copy: When true, adds each ad's post: type (TEXT, IMAGE,
            VIDEO, CAROUSEL), headline, body, destination and media, one
            request per distinct post (at most 50 posts per call), so creative
            can be reviewed without opening Reddit.
get_reddit_performance tool
Reddit Ads performance: spend, impressions, clicks, CTR, CPC, conversions, CPA, ROAS.

    Returns rows per entity for the chosen level with names joined, plus
    totals and insights[] (zero-conversion spenders, rejected ads, empty
    windows). 'conversions' is the account's key conversion event. Money is
    in account currency. Data lags up to 6 hours.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        level: Row granularity: "account", "campaign" (default), "ad_group"
            or "ad".
        date_range_start: First day, YYYY-MM-DD, in the account's time zone.
            Empty means 29 days before date_range_end (a 30-day window).
        date_range_end: Last day (inclusive), YYYY-MM-DD, in the account's
            time zone. Empty means today.
        breakdown: Optional extra dimension: "date", "hour", "country",
            "region", "community", "keyword", "interest", "placement",
            "gender" or "os_type". Empty means none.
        compact: When true, returns totals + top-10 rows by spend + offender
            lists instead of every row.
run_reddit_report tool
Run a custom Reddit Ads report for metrics get_reddit_performance omits.

    Returns the requested fields per breakdown row, the date range and the
    account currency. Microcurrency and cent fields are converted to
    currency amounts.

    Queries the Reddit Ads API: https://ads-api.reddit.com/docs/v3/

    Args:
        fields: Reddit report field names (required), e.g. ["SPEND",
            "CLICKS", "REACH", "VIDEO_STARTED",
            "CONVERSION_PURCHASE_TOTAL_VALUE", "KEY_CONVERSION_TOTAL_COUNT"].
        breakdowns: Up to 3 of DATE, HOUR, CAMPAIGN_ID, AD_GROUP_ID, AD_ID,
            COUNTRY, REGION, COMMUNITY, KEYWORD, INTEREST, PLACEMENT, GENDER,
            OS_TYPE (4 when COUNTRY and REGION are both included; HOUR and
            DATE cannot be combined).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        date_range_start: First day, YYYY-MM-DD (account-local day). Empty
            means 29 days before date_range_end (a 30-day window).
        date_range_end: Last day (inclusive), YYYY-MM-DD (account-local day).
            Empty means today.
        filter: Reddit filter expression (e.g. "campaign_id==abc123"). Empty
            means no filter.
        time_zone_id: IANA time zone for the day boundaries and DATE/HOUR
            rows, e.g. "Europe/Berlin". Empty uses the ad account's time zone.
get_reddit_pixels tool
Reddit pixels of the account and when each event (purchase, sign_up, lead, ...) last fired.

    Returns each pixel's pixel_id, name, last_fired_at per standard event,
    custom events and a never_fired flag, plus insights. Relevant before
    conversion-optimized campaigns: insights flag pixels that never fired and
    ad groups optimizing for an event their pixel has never sent. Every new
    ad group needs a conversion_pixel_id from here.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
get_reddit_audiences tool
Reddit custom and saved audiences of the account, and which ad groups use them.

    Returns each custom audience's audience_id, name, type (PIXEL_RETARGETING,
    ENGAGEMENT_RETARGETING, CUSTOMER_LIST, LOOKALIKE, ...), status, estimated
    size_range, its source (pixel events or campaigns, lookback days) and the
    ad groups that target or exclude it; saved audiences with their
    targeting; and insights that flag audiences Reddit cannot use yet or that
    are too small to deliver. The audience_id goes into custom_audience_ids or
    excluded_custom_audience_ids on an ad group.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
search_reddit_targeting tool
Look up targeting options for draft_reddit_ad_group.

    Returns ids/names to pass into the targeting lists, with the kind, the
    query and the total number of matches. Communities target by name,
    interests by id, geolocations by id (e.g. "DE" or "DE:2874225"),
    languages by code (e.g. "DE"), carriers by id (e.g. "O2_DEUTSCHLAND").
    Devices come back as make/model pairs for the label_map of a device
    target. Keyword suggestions carry Reddit-wide monthly views, not search
    volume.

    Args:
        kind: What to look up: "communities" (subreddits; query required),
            "interests" (query filters by name), "geolocations" (country ISO
            code and/or city query), "languages" (upper-case ISO 639-1
            codes), "keywords" (comma-separated seed terms → suggestions with
            Reddit-wide monthly views), "community_suggestions" (Reddit's
            related-community picks for seed communities in query and/or a
            website_url), "devices" (device makes and models; query filters
            by make or model) or "carriers" (mobile carrier ids; query
            filters by name, country by country code).
        query: Search text for the chosen kind: a community search term, an
            interest or language name filter, a city name, comma-separated
            seed keywords, comma-separated seed communities for
            community_suggestions (e.g. "PPC,googleads"), a device make or
            model filter, or a carrier name filter.
        country: Country ISO code (e.g. "DE") for kinds "geolocations" and
            "carriers"; ignored for other kinds.
        website_url: Website for kind "community_suggestions"; ignored for
            other kinds.
        limit: Maximum number of results, clamped to 1-100.
get_reddit_account_history tool
Who changed what in the Reddit ad account: field, before/after, member, time.

    Returns the changes, most recent first, with changed_at, by, entity type,
    id and name, field, and before/after values. The first thing to check
    when performance moves. Child entities are included when filtering by
    entity. Changes made through AdLoop show under the connected Reddit user,
    like changes made in Ads Manager. Money fields are in account currency.

    Args:
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        date_range_start: First day, YYYY-MM-DD (account-local day). Empty
            means 29 days before date_range_end (default window is the last
            30 days).
        date_range_end: Last day (inclusive), YYYY-MM-DD (account-local day).
            Empty means today.
        entity_type: Optional filter to one entity type: "campaign",
            "ad_group" or "ad". Requires entity_ids.
        entity_ids: Ids of the entities of entity_type to filter to; required
            when entity_type is set.
        limit: Maximum number of changes returned, clamped to 1-500.
estimate_reddit_ad_group tool
Audience size, delivery estimate and Reddit's suggested bid for a planned ad group — read-only.

    Reddit's counterpart of estimate_budget: takes the same targeting and
    budget as draft_reddit_ad_group, ahead of drafting. Returns the reachable
    and targetable audience (fixed 30-day basis), estimated
    impressions/clicks/reach for the schedule, the minimum/suggested bid
    range for bid_type in account currency, and insights (audience under
    10,000 people, bid_value below the suggested minimum). Nothing is
    created. At least one of geolocations, communities, interests or keywords
    is required.

    Args:
        daily_budget: Daily budget in account currency (positive). One of
            daily_budget or lifetime_budget is required; daily_budget wins
            when both are given.
        lifetime_budget: Lifetime budget in account currency (positive),
            used when daily_budget is not given.
        objective: Campaign objective the estimate assumes, e.g. CLICKS
            (default), CONVERSIONS, IMPRESSIONS, LEAD_GENERATION,
            APP_INSTALLS, CATALOG_SALES or VIDEO_VIEWABLE_IMPRESSIONS.
        bid_type: CPC (default), CPM, CPV, CPV6 or CPV15; the bid suggestion
            is for this bid type.
        bid_strategy: BIDLESS, MANUAL_BIDDING, MAXIMIZE_VOLUME or TARGET_CPX.
            Empty means BIDLESS.
        bid_value: Planned bid in account currency; compared with Reddit's
            suggested minimum.
        optimization_goal: Pixel event to optimize for (PURCHASE, SIGN_UP,
            LEAD, PAGE_VISIT, ...). Empty means none.
        view_through_conversion_type: SEVEN_DAY_CLICKS or
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW, as draft_reddit_ad_group takes it.
            Empty: Reddit's default for CONVERSIONS and CATALOG_SALES.
        start_time: Schedule start, ISO 8601 (e.g. 2026-10-01T00:00:00Z).
            Empty means tomorrow 00:00 UTC.
        end_time: Schedule end, ISO 8601. Empty means 30 days after the
            default start.
        geolocations: Geolocation ids to target (e.g. "DE" or "DE:2874225",
            from search_reddit_targeting kind "geolocations").
        excluded_geolocations: Geolocation ids to exclude.
        communities: Community (subreddit) names to target.
        excluded_communities: Community names to exclude.
        interests: Interest ids to target (from search_reddit_targeting kind
            "interests").
        keywords: Keywords to target.
        languages: Language codes (ISO 639-1, upper-cased automatically,
            e.g. "DE"). Empty means all languages.
        gender: FEMALE or MALE; empty means all genders.
        platforms: Platforms to target, e.g. ALL, DESKTOP, MOBILE_NATIVE,
            MOBILE_WEB. Empty means no platform restriction.
        devices: Device targets, objects like {"type": "MOBILE", "os":
            "IOS", "min_version": "16"} (type DESKTOP or MOBILE; optional os
            ANDROID or IOS, major OS versions, and label_map {make: [models]}
            with makes/models from search_reddit_targeting kind "devices").
            Empty means every device.
        carriers: Mobile carrier ids (from search_reddit_targeting kind
            "carriers", e.g. "O2_DEUTSCHLAND"). Empty means every carrier.
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
pause_reddit_entity tool
Draft pausing a Reddit campaign, ad group or ad — returns a PREVIEW.

    Returns a preview with a plan_id, the current and target status (PAUSED)
    and warnings (e.g. already paused); nothing changes until
    confirm_and_apply applies the plan_id.

    Args:
        entity_type: "campaign", "ad_group" or "ad".
        entity_id: Reddit id of the entity, from the read tools
            (get_reddit_campaigns, get_reddit_ad_groups, get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
enable_reddit_entity tool
Draft enabling (configured_status=ACTIVE) a Reddit campaign, ad group or ad — PREVIEW.

    Enabling a new ad sends it to Reddit policy review (PENDING_APPROVAL).
    Returns a preview with a plan_id, the current and target status and
    warnings (e.g. an effective_status of REJECTED or PENDING_BILLING_INFO
    that keeps it from serving); nothing changes until confirm_and_apply
    applies the plan_id.

    Args:
        entity_type: "campaign", "ad_group" or "ad".
        entity_id: Reddit id of the entity, from the read tools
            (get_reddit_campaigns, get_reddit_ad_groups, get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
remove_reddit_entity tool
Draft ARCHIVING a Reddit campaign, ad group or ad — irreversible, PREVIEW.

    Reddit has no hard delete for entities that ran; ARCHIVED is permanent.
    pause_reddit_entity is the reversible alternative when the entity does
    not need to be gone. Returns a preview with a plan_id that requires
    double confirmation; confirm_and_apply executes it.

    Args:
        entity_type: "campaign", "ad_group" or "ad".
        entity_id: Reddit id of the entity, from the read tools
            (get_reddit_campaigns, get_reddit_ad_groups, get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
update_reddit_campaign tool
Draft changes to a Reddit campaign — name, run dates, spend cap, and (CBO only) budget/bid/schedule.

    daily_budget / lifetime_budget / bid_* / schedule apply only when the
    campaign uses campaign budget optimization; otherwise the budget lives on
    its ad groups (changed via update_reddit_ad_group). Budgets are in
    account currency and checked against max_daily_budget; bid_value against
    max_bid_increase_pct. Returns a preview with a plan_id showing old → new
    per field; nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: Reddit campaign id (from get_reddit_campaigns).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        name: New campaign name; empty keeps the current one.
        daily_budget: New daily budget in account currency (positive; CBO
            only). Mutually exclusive with lifetime_budget; the budget type
            (daily vs lifetime) cannot change after publishing.
        lifetime_budget: New lifetime budget in account currency (positive;
            CBO only). Needs an end_time (passed or already set); compared to
            max_daily_budget by its per-day share.
        spend_cap: Campaign spend cap in account currency; 0 removes it.
        bid_strategy: BIDLESS, MAXIMIZE_VOLUME or TARGET_CPX (CBO only).
        bid_type: CPC, CPM, CPV, CPV6 or CPV15 (CBO only).
        bid_value: New bid in account currency (CBO only).
        start_time: New start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day.
        end_time: New end, same formats as start_time.
        schedule: Weekly delivery windows ("time of day" in Ads Manager; CBO
            only), a list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. [] clears it (deliver at any time). Hours apply in
            each viewer's local time, not the account time zone. A campaign
            schedule replaces every ad group's.
update_reddit_ad_group tool
Draft changes to a Reddit ad group — budget, bid, run dates, weekly schedule, targeting.

    Budget (daily_budget or lifetime_budget + end_time) is checked against
    max_daily_budget; bid_value against max_bid_increase_pct. Targeting lists
    REPLACE the current value of each key passed (each takes the full list);
    omitted keys are preserved. Ids/names come from search_reddit_targeting.
    Budget and schedule of an ad group in a campaign-budget-optimization
    campaign are set on the campaign (update_reddit_campaign). Returns a
    preview with a plan_id showing old → new per field; nothing changes until
    confirm_and_apply applies it.

    Args:
        ad_group_id: Reddit ad group id (from get_reddit_ad_groups).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        name: New ad group name; empty keeps the current one.
        daily_budget: New daily budget in account currency (positive).
            Mutually exclusive with lifetime_budget; the budget type (daily vs
            lifetime) cannot change after publishing.
        lifetime_budget: New lifetime budget in account currency (positive).
            Needs an end_time (passed or already set); compared to
            max_daily_budget by its per-day share.
        bid_value: New bid in account currency.
        bid_strategy: BIDLESS, MANUAL_BIDDING, MAXIMIZE_VOLUME or TARGET_CPX.
        bid_type: CPC, CPM, CPV, CPV6 or CPV15.
        start_time: New start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day.
        end_time: New end, same formats as start_time.
        geolocations: Full list of geolocation ids to target (e.g. "DE" or
            "DE:2874225").
        excluded_geolocations: Full list of geolocation ids to exclude.
        communities: Full list of community (subreddit) names to target.
        excluded_communities: Full list of community names to exclude.
        interests: Full list of interest ids to target.
        keywords: Full list of keywords to target.
        excluded_keywords: Full list of keywords to exclude.
        languages: Full list of language codes (ISO 639-1, upper-cased
            automatically, e.g. "DE").
        gender: FEMALE or MALE; empty leaves gender targeting unchanged.
        platforms: Full list of platforms: ALL, DESKTOP, DESKTOP_LEGACY,
            MOBILE_NATIVE, MOBILE_WEB, MOBILE_WEB_3X or SHREDTOP.
        expand_targeting: Whether Reddit may expand delivery beyond the
            targeting; omitted leaves it unchanged.
        schedule: Weekly delivery windows ("time of day" in Ads Manager), a
            list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. [] clears it (deliver at any time). Hours apply in
            each viewer's local time, not the account time zone.
        locations: Placements, FEED and/or COMMENTS_PAGE (conversation
            pages); cannot be an empty list.
        excluded_interests: Full list of interest ids to exclude (Reddit
            marks this field deprecated). [] clears it.
        devices: Full list of device targets, objects like {"type":
            "MOBILE", "os": "IOS", "min_version": "16"} (type DESKTOP or
            MOBILE; optional os ANDROID or IOS, major OS versions with iOS at
            least 14, and label_map {make: [models]} with makes/models from
            search_reddit_targeting kind "devices"). [] clears it (every
            device).
        carriers: Full list of mobile carrier ids (from
            search_reddit_targeting kind "carriers", e.g. "O2_DEUTSCHLAND"),
            checked against Reddit's carrier list. [] clears it.
        view_modes: Full list of feed layouts: ALL, CARD, CLASSIC, COMPACT
            or IMMERSIVE. [] clears it.
        custom_audience_ids: Full list of custom audiences to target (from
            get_reddit_audiences). It narrows the ad group to those people.
            [] clears it.
        excluded_custom_audience_ids: Full list of custom audiences to
            exclude, e.g. existing customers. [] clears it.
update_reddit_ad tool
Draft changes to a Reddit ad — name, landing URL (click_url), comments on/off.

    The headline and body of a live Reddit post cannot be edited; new copy
    means a new ad via draft_reddit_ad, with the old ad paused. Returns a
    preview with a plan_id showing old → new; nothing changes until
    confirm_and_apply executes it.

    Args:
        ad_id: Reddit ad id (from get_reddit_ads).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        name: New ad name; empty keeps the current one.
        click_url: New landing URL (http:// or https://), verified to be
            reachable. TEXT (free-form) ads open the post itself and take no
            click_url.
        allow_comments: true or false turns comments on the ad's post on or
            off; omitted leaves them unchanged.
draft_reddit_custom_audience tool
Draft a Reddit retargeting audience (website visitors or engaged people) — PREVIEW.

    Builds the audience from data Reddit already has: people the pixel saw
    on the website, or people who saw or engaged with the account's
    campaigns. No personal data is uploaded. Nothing changes until
    confirm_and_apply applies the plan_id; Reddit then fills the audience
    (status PENDING, up to a day), and an ad group uses it through
    update_reddit_ad_group custom_audience_ids (target) or
    excluded_custom_audience_ids (exclude).

    Args:
        name: Audience name, 3 to 500 characters.
        audience_type: PIXEL_RETARGETING (website visitors, from the pixel)
            or ENGAGEMENT_RETARGETING (people who saw or engaged with
            campaigns).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        pixel_id: Pixel to build a website audience from (get_reddit_pixels).
        events: Website audiences: the pixel events that qualify, any of
            PAGE_VISIT (default), VIEW_CONTENT, SEARCH, ADD_TO_CART,
            ADD_TO_WISHLIST, PURCHASE, LEAD, SIGN_UP, CUSTOM.
        custom_events: Website audiences: custom pixel event names to
            include (adds CUSTOM to events), at most 50.
        campaign_ids: Engagement audiences: the campaigns whose audience to
            reuse (get_reddit_campaigns).
        engagements: Engagement audiences: what people did, any of CLICKS
            (default), IMPRESSIONS, UPVOTES, COMMENT_SUBMISSIONS,
            VIDEO_STARTED, VIDEO_WATCHED_50_PERCENT,
            VIDEO_WATCHED_100_PERCENT.
        lookback_window_days: How far back an action counts: 1 to 90 days for
            website audiences (default 30), 1 to 180 for engagement audiences
            (default 90).
draft_reddit_campaign tool
Draft a new Reddit campaign (created PAUSED) — returns a PREVIEW.

    By default the budget lives on the ad groups; campaign_budget_optimization
    holds it on the campaign. Budgets are checked against max_daily_budget.
    Ad groups are added with draft_reddit_ad_group. Returns a preview with a
    plan_id, the payload and warnings; nothing changes until
    confirm_and_apply applies it.

    Args:
        campaign_name: Name of the new campaign.
        objective: CLICKS, CONVERSIONS, IMPRESSIONS, LEAD_GENERATION,
            APP_INSTALLS, CATALOG_SALES or VIDEO_VIEWABLE_IMPRESSIONS. Other
            values only produce a warning, since Reddit is rolling out new
            objective enums.
        funding_instrument_id: Servable funding instrument id from
            list_reddit_funding_instruments.
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        campaign_budget_optimization: true holds the budget on the campaign
            (then daily_budget or lifetime_budget, bid_strategy, bid_type and
            conversion_pixel_id are required). false (default) leaves budget
            and bids to the ad groups, and none of the budget or bid
            parameters may be passed.
        daily_budget: Daily budget in account currency (positive; CBO only).
            Mutually exclusive with lifetime_budget.
        lifetime_budget: Lifetime budget in account currency (positive; CBO
            only); requires end_time and is compared to max_daily_budget by
            its per-day share.
        bid_strategy: BIDLESS, MAXIMIZE_VOLUME or TARGET_CPX (CBO only).
        bid_type: CPC, CPM, CPV, CPV6 or CPV15 (CBO only).
        bid_value: Bid in account currency (CBO only).
        optimization_goal: Pixel event to optimize for (PURCHASE, SIGN_UP,
            LEAD, PAGE_VISIT, ...); used with CBO only.
        conversion_pixel_id: Pixel id from get_reddit_pixels; required with
            CBO, optional otherwise.
        spend_cap: Campaign spend cap in account currency; 0 or empty means
            none.
        start_time: Start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day.
        end_time: End, same formats as start_time.
        schedule: Weekly delivery windows ("time of day" in Ads Manager; CBO
            only), a list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. [] clears it (deliver at any time). Hours apply in
            each viewer's local time, not the account time zone. A campaign
            schedule replaces every ad group's.
        view_through_conversion_type: The conversion attribution window of a
            CBO campaign, inherited by its ad groups: SEVEN_DAY_CLICKS or
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW. Empty: Reddit's default
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW for CONVERSIONS and CATALOG_SALES.
            Cannot be changed after publishing. Without CBO, set it on each ad
            group instead.
draft_reddit_ad_group tool
Draft a new Reddit ad group (created PAUSED) — returns a PREVIEW.

    Required: campaign_id, ad_group_name, conversion_pixel_id and at least
    one targeting list (geolocations, communities, interests or keywords —
    ids/names from search_reddit_targeting). For non-CBO campaigns also
    daily_budget (or lifetime_budget + end_time), bid_strategy and bid_type.
    Budgets are checked against max_daily_budget; keywords and geolocations
    are pre-validated with Reddit. Returns a preview with a plan_id, the
    payload and warnings; nothing changes until confirm_and_apply applies it.

    Args:
        campaign_id: Reddit campaign id (from get_reddit_campaigns).
        ad_group_name: Name of the new ad group.
        conversion_pixel_id: Pixel id (Reddit rule; from get_reddit_pixels).
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        daily_budget: Daily budget in account currency (positive). Required
            for non-CBO campaigns unless lifetime_budget is given; not allowed
            in CBO campaigns. Mutually exclusive with lifetime_budget.
        lifetime_budget: Lifetime budget in account currency (positive);
            requires end_time and is compared to max_daily_budget by its
            per-day share.
        bid_strategy: BIDLESS, MANUAL_BIDDING, MAXIMIZE_VOLUME or TARGET_CPX.
            Required for non-CBO campaigns; in CBO campaigns it must match the
            campaign's.
        bid_type: CPC, CPM, CPV, CPV6 or CPV15. Required for non-CBO
            campaigns.
        bid_value: Bid in account currency; MANUAL_BIDDING and TARGET_CPX
            (target cost per result) need it.
        optimization_goal: The pixel event to optimize for (PURCHASE,
            SIGN_UP, LEAD, PAGE_VISIT, ...). Empty in a CBO campaign inherits
            the campaign's.
        geolocations: Geolocation ids to target (e.g. "DE" or "DE:2874225").
        excluded_geolocations: Geolocation ids to exclude.
        communities: Community (subreddit) names to target.
        excluded_communities: Community names to exclude.
        interests: Interest ids to target.
        keywords: Keywords to target; Reddit refuses keywords that are not
            brand-safe.
        excluded_keywords: Keywords to exclude.
        languages: Language codes (ISO 639-1, upper-cased automatically,
            e.g. "DE"). Empty means every language.
        gender: FEMALE or MALE; empty means all genders.
        platforms: ALL, DESKTOP, DESKTOP_LEGACY, MOBILE_NATIVE, MOBILE_WEB,
            MOBILE_WEB_3X or SHREDTOP.
        expand_targeting: Whether Reddit may expand delivery beyond the
            targeting; omitted uses Reddit's default.
        start_time: Start, ISO 8601 (e.g. 2026-10-01T00:00:00Z); a bare
            YYYY-MM-DD means 00:00 UTC that day. Empty means now.
        end_time: End, same formats as start_time.
        schedule: Weekly delivery windows ("time of day" in Ads Manager), a
            list of blocks like {"days": "MON-FRI", "start_hour": 13,
            "end_hour": 23} (day names, hours 0-23, end_hour inclusive) or the
            native {"start_day": "FRI", "start_hour": 22, "end_day": "SAT",
            "end_hour": 3}. Omitted means delivery at any time. Hours apply in
            each viewer's local time, not the account time zone. Not allowed
            in CBO campaigns, whose schedule overrides every ad group.
        locations: Placements, FEED and/or COMMENTS_PAGE (conversation
            pages); cannot be an empty list.
        excluded_interests: Interest ids to exclude (Reddit marks this field
            deprecated).
        devices: Device targets, objects like {"type": "MOBILE", "os":
            "IOS", "min_version": "16"} (type DESKTOP or MOBILE; optional os
            ANDROID or IOS, major OS versions with iOS at least 14, and
            label_map {make: [models]} with makes/models from
            search_reddit_targeting kind "devices"). Omitted means every
            device; APP_INSTALLS campaigns take exactly one.
        carriers: Mobile carrier ids (from search_reddit_targeting kind
            "carriers", e.g. "O2_DEUTSCHLAND"), checked against Reddit's
            carrier list. Omitted means every carrier.
        view_modes: Feed layouts: ALL, CARD, CLASSIC, COMPACT or IMMERSIVE.
            Omitted uses Reddit's default.
        custom_audience_ids: Custom audiences to target (from
            get_reddit_audiences), e.g. website visitors for retargeting.
        excluded_custom_audience_ids: Custom audiences to exclude, e.g.
            people who already bought.
        view_through_conversion_type: The conversion attribution window:
            SEVEN_DAY_CLICKS (conversions within 7 days of a click) or
            SEVEN_DAY_CLICKS_ONE_DAY_VIEW (also within 1 day of a view).
            Empty: Reddit's default SEVEN_DAY_CLICKS_ONE_DAY_VIEW for
            CONVERSIONS and CATALOG_SALES campaigns, which require one. Under
            campaign budget optimization the ad group inherits the campaign's.
draft_reddit_ad tool
Draft a Reddit ad: creates a post on the profile, then the ad (PAUSED) — PREVIEW.

    click_url and the media URLs are checked before drafting, so ads do not
    point at unverified pages and Reddit gets real image and video files. Comments are public on Reddit
    ads. With post_id an EXISTING post is promoted instead, keeping its
    upvotes and comments: no post is created and the copy arguments are
    ignored. Returns a preview with a plan_id; nothing changes until
    confirm_and_apply applies it. Once enabled, the ad goes through Reddit
    policy review (PENDING_APPROVAL).

    Args:
        ad_group_id: Reddit ad group id (from get_reddit_ad_groups).
        profile_id: Reddit profile that authors the post, from
            list_reddit_funding_instruments (profiles). Required for a new
            post; with post_id it defaults to the post's.
        headline: Post headline, required for a new post, at most 300
            characters.
        click_url: Landing page (http:// or https://). Required for a new
            post. TEXT posts open themselves, so the full click_url must also
            appear in body. With post_id, TEXT posts take no click_url and
            media posts default it to the post's destination.
        ad_account_id: Reddit ad account id (from list_reddit_accounts).
            Empty uses reddit.ad_account_id from the config.
        ad_name: Ad name; empty uses the headline. Truncated to 200
            characters.
        post_type: TEXT (headline + optional body; default), IMAGE
            (public image_url), VIDEO (public video_url + thumbnail_url) or
            CAROUSEL (2 to 6 carousel_cards).
        body: Post body text, up to 40,000 characters. Optional for media
            posts.
        image_url: Publicly reachable image URL, required for IMAGE posts.
        call_to_action: One of Reddit's fixed labels for media posts: Apply
            Now, Book Now, Buy Tickets, Contact Us, Donate Now, Download, Get
            a Quote, Get Directions, Get Showtimes, Install, Learn More,
            Listen Now, Order Now, Play Now, Pre-order Now, Read More, Remind
            Me, See Menu, Shop Now, Sign Up, Subscribe, View More, Visit
            Store, Watch Now. On a carousel it is the default for every card.
        display_url: Optional display URL shown with media posts; must be on
            the click_url's domain.
        allow_comments: Whether Redditors can comment publicly on the ad
            (default true); false disables them.
        post_id: Existing post to promote (t3_...); headline, body, the
            media arguments, call_to_action and display_url are then ignored.
            Empty creates a new post.
        video_url: Direct link to the video file (MP4 or MOV, up to 1 GB),
            required for VIDEO posts. Reddit downloads it when the post is
            created; a page that embeds the video does not work.
        thumbnail_url: Publicly reachable image Reddit shows before the video
            plays, required for VIDEO posts.
        carousel_cards: For CAROUSEL posts, 2 to 6 cards, each
            {"image_url": "...", "caption": "...", "click_url": "...",
            "call_to_action": "..."}. Only image_url is required; caption is
            at most 180 characters, click_url and call_to_action default to
            the ad's.
list_microsoft_ads_accounts tool
List the Microsoft Advertising (Bing) ad accounts the signed-in user can reach.

    Returns the user, their customers (manager accounts) with roles, and per
    ad account the ad_account_id, customer_id, name, number, currency, time
    zone and status that the other Microsoft tools take.
get_microsoft_campaigns tool
List Microsoft Advertising campaigns with status, daily budget, bidding, languages and location targeting.

    Location targeting lists the included and excluded locations and the
    location intent (people in the area, or also people searching about it).
    Insights flag an inactive account, budget-paused or suspended campaigns,
    campaigns without locations, intent that reaches beyond the area, and
    shared budgets.

    Args:
        ad_account_id: Microsoft ad account id (from list_microsoft_ads_accounts).
            Empty uses microsoft_ads.ad_account_id from the config.
        include_targeting: Read each campaign's location criteria (three
            calls per campaign); default true.
get_microsoft_ad_groups tool
List Microsoft Advertising ad groups with bid, network, language, dates and campaign status.

    Insights flag ad groups that also run on syndicated search partners,
    ad groups that can show on the Microsoft Audience Network, and expired
    ad groups.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (from get_microsoft_campaigns); empty means
            every campaign.
get_microsoft_keywords tool
List Microsoft Advertising keywords with match type, bid, status and editorial review, plus the status of their ad group and campaign.

    Insights flag disapproved keywords and active broad-match keywords in
    campaigns without conversion-based bidding (manual bids or Maximize Clicks).

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign; empty means every campaign.
        ad_group_id: Limit to one ad group; empty means every ad group.
get_microsoft_ads tool
List Microsoft Advertising ads with headlines, descriptions, paths, final URLs, status and editorial review.

    Insights flag disapproved ads and ad groups without an active ad.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign; empty means every campaign.
        ad_group_id: Limit to one ad group; empty means every ad group.
get_microsoft_performance tool
Microsoft Advertising performance: spend, impressions, clicks, CTR, CPC, conversions, CPA, revenue, impression share.

    Rows per entity for the chosen level with the status of each level,
    totals and insights (zero-conversion spenders, converters losing
    impressions to budget, spend under paused levels). Campaign and ad
    group rows without a breakdown include impression share and the share
    lost to budget and to rank. Built from a Microsoft report, which takes a
    few seconds.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        level: "account", "campaign" (default), "ad_group", "keyword" or "ad".
        date_range_start: First day, YYYY-MM-DD, account time zone. Empty
            means 29 days before date_range_end.
        date_range_end: Last day (inclusive). Empty means yesterday.
        breakdown: Optional "date" (daily rows) or "device".
        campaign_id: Limit to one campaign; empty means the whole account.
        compact: Totals, top 10 rows by spend and zero-conversion spenders
            instead of every row.
get_microsoft_search_terms tool
Microsoft Advertising search terms: what people typed, the keyword and match type it matched, clicks, spend and conversions.

    Insights name terms with clicks and no conversion (negative keyword
    candidates) and exact/phrase keywords matching broadly as close
    variants. compact returns the top 25 terms by spend, the waste
    candidates and the top converters.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        date_range_start: First day, YYYY-MM-DD. Empty means 29 days before
            date_range_end.
        date_range_end: Last day (inclusive). Empty means yesterday.
        campaign_id: Limit to one campaign; empty means the whole account.
        min_clicks: Clicks from which a term without conversions counts as a
            waste candidate (default 2).
        compact: Summary instead of every term.
get_microsoft_location_performance tool
Where Microsoft Advertising clicks and spend came from, split into people physically there and people searching about the place.

    Rows per location with impressions, clicks, spend and conversions, and
    the share of spend from 'location of interest' traffic (people elsewhere
    searching about the area), which a local service business usually does
    not want.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        date_range_start: First day, YYYY-MM-DD. Empty means 29 days before
            date_range_end.
        date_range_end: Last day (inclusive). Empty means yesterday.
        campaign_id: Limit to one campaign; empty means the whole account.
        group_by: "city" (default), "metro", "state", "postal_code" or
            "most_specific".
update_microsoft_campaign_budget tool
Draft a new daily budget for a Microsoft Advertising campaign (preview only; nothing changes yet).

    Shows the current and new budget and the monthly maximum (30.4 × daily).
    Refuses campaigns on a shared budget and amounts above the configured
    safety cap (max_daily_budget). The returned plan_id is applied with
    confirm_and_apply; a dry run re-reads the campaign and sends nothing, and
    the apply refuses if the budget changed since the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (from get_microsoft_campaigns).
        daily_budget: New daily budget in the account currency.
pause_microsoft_entity tool
Draft pausing a Microsoft Advertising campaign, ad group, keyword or ad (preview only).

    The preview names the entity, its campaign and ad group, and its current
    status. The returned plan_id is applied with confirm_and_apply, which
    refuses if the status changed since the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        entity_type: "campaign", "ad_group", "keyword" or "ad".
        entity_id: The entity's id (from the read tools).
        parent_id: Optional: the campaign id of an ad group, or the ad group
            id of a keyword or ad, to find it faster.
enable_microsoft_entity tool
Draft enabling a paused Microsoft Advertising campaign, ad group, keyword or ad (preview only).

    Warnings name a paused parent or an editorial rejection that would still
    keep it from serving. The returned plan_id is applied with
    confirm_and_apply, which refuses if the status changed since the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        entity_type: "campaign", "ad_group", "keyword" or "ad".
        entity_id: The entity's id (from the read tools).
        parent_id: Optional: the campaign id of an ad group, or the ad group
            id of a keyword or ad, to find it faster.
search_microsoft_locations tool
Find Microsoft Advertising location ids (countries, states, metros, cities, postal codes) by name.

    Reads Microsoft's geographic location file (cached until Microsoft
    publishes a new version) and returns location_id, name, type and
    status, the ids the targeting and new-campaign tools take.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        query: Name or postal code, e.g. "Chicago" or "60601".
        location_type: Optional filter such as "City", "Metro", "State" or "PostalCode".
        limit: Most results (1–100).
get_microsoft_negative_keywords tool
List Microsoft Advertising negative keywords: those directly on campaigns and the shared negative keyword lists.

    Each list shows its keywords, the campaigns it is attached to and a
    remove_id per keyword; direct negatives also carry a remove_id.
    Insights flag direct negatives and lists attached to nothing.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign and the lists attached to it.
get_microsoft_ad_extensions tool
List sitelinks, callouts, structured snippets, call and image extensions on Microsoft Advertising ad groups, campaigns and the account.

    Each row has the level (account, campaign or ad_group), type, content,
    final URLs, editorial status and the remove_id that unlinks it. Image
    rows add alt_text, display_text, layouts, media_ids and images: each
    image's media type, size and a url that opens the picture, so a photo
    can be checked before its link is removed. Insights flag campaigns
    without sitelinks, disapproved extensions and accounts without image
    extensions.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Limit to one campaign.
update_microsoft_campaign tool
Draft Microsoft Advertising campaign setting changes: name, bid strategy and targets, tracking template, final URL suffix.

    Bid strategies: EnhancedCpc, MaxClicks, MaxConversions (with an optional
    target_cpa; TargetCpa is accepted and becomes MaxConversions, as Microsoft
    now does). Microsoft retired manual CPC for search campaigns and stores it
    as EnhancedCpc, so ManualCpc is drafted as EnhancedCpc with a note. Moving to a strategy that is not conversion-based
    (manual bids or MaxClicks) is refused while the campaign has active
    broad-match keywords, and moving to MaxConversions is refused while the
    account has no active conversion goal. The daily budget has its own
    tool, update_microsoft_campaign_budget. The returned plan_id is applied
    with confirm_and_apply, which refuses if a changed setting was edited
    after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id.
        name: New name (at most 128 characters, unique in the account).
        bidding_strategy: EnhancedCpc, MaxClicks or MaxConversions (ManualCpc becomes EnhancedCpc).
        target_cpa: Target cost per conversion for MaxConversions.
        max_cpc: Maximum CPC for MaxClicks / MaxConversions (only changes an existing cap).
        tracking_url_template: New template ({lpurl}...); "" removes it.
        final_url_suffix: New suffix (e.g. utm parameters); "" removes it.
update_microsoft_campaign_targeting tool
Draft Microsoft Advertising campaign targeting: included and excluded locations, location intent, ad schedule.

    Location lists are the full new sets; the preview shows what is added
    and removed. location_intent PeopleIn keeps ads to people in the
    locations. ad_schedule replaces every window ([] serves at all hours);
    the hours follow the account time zone, or each searcher's own when the
    campaign uses AdScheduleUseSearcherTimeZone (the preview says which), and
    a campaign's first schedule needs a double confirmation because it
    switches all other hours off.
    The returned plan_id is applied with confirm_and_apply, which refuses if
    the targeting changed after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id.
        location_ids: Full new list of included location ids (search_microsoft_locations); cannot be empty.
        excluded_location_ids: Full new list of excluded location ids.
        location_intent: PeopleIn or PeopleInOrSearchingForOrViewingPages.
        ad_schedule: Windows like {"day_of_week": "Monday", "start_hour": 8, "end_hour": 17,
            "start_minute": 0, "end_minute": 0} (minutes 0/15/30/45).
draft_microsoft_campaign tool
Draft a new Microsoft Advertising Search campaign, created PAUSED with its locations (preview only).

    Requires a daily budget (capped by max_daily_budget), languages and
    included locations (languages=["All"] is refused). Defaults to
    MaxConversions and PeopleIn; MaxConversions is refused while no active
    conversion goal counts toward Conversions, because Microsoft refuses the
    campaign then (pass MaxClicks or EnhancedCpc; Microsoft stores manual CPC as
    EnhancedCpc, so ManualCpc is drafted as EnhancedCpc). The apply creates the
    campaign, then its location criteria, and names what was created if the
    second step fails. The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        name: Campaign name (unique, at most 128 characters).
        daily_budget: Daily budget in the account currency.
        bidding_strategy: MaxConversions (default), MaxClicks or EnhancedCpc (ManualCpc becomes EnhancedCpc).
        target_cpa: Optional target cost per conversion.
        languages: Ad languages, e.g. ["English"].
        location_ids: Included location ids (search_microsoft_locations).
        excluded_location_ids: Excluded location ids.
        location_intent: PeopleIn (default) or PeopleInOrSearchingForOrViewingPages.
        tracking_url_template: Optional tracking template.
        final_url_suffix: Optional final URL suffix (e.g. utm parameters).
draft_microsoft_ad_group tool
Draft a new Microsoft Advertising ad group, optionally with keywords (preview only).

    The ad group is created active but serves only once one of its ads (new
    ads are paused) is enabled. Manual-bid campaigns need cpc_bid; broad
    match is refused unless the campaign uses conversion-based bidding
    (MaxConversions, MaxConversionValue or a target CPA/ROAS). network
    OwnedAndOperatedOnly (default) keeps ads off syndicated partner sites.
    The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Parent campaign id.
        name: Ad group name (unique in the campaign).
        cpc_bid: Default max CPC in the account currency.
        network: OwnedAndOperatedOnly or OwnedAndOperatedAndSyndicatedSearch.
        keywords: Keywords as text or {"text", "match_type": Exact|Phrase|Broad, "bid"}; text defaults to Phrase.
update_microsoft_ad_group tool
Draft Microsoft Advertising ad group changes: name, default bid, search network, Audience Network adjustment.

    A bid raise is capped by max_bid_increase_pct. audience_ads_bid_adjustment
    -100 keeps the ad group off the Microsoft Audience Network. The returned
    plan_id is applied with confirm_and_apply, which refuses if a changed
    setting was edited after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        name: New name.
        cpc_bid: New default max CPC.
        network: OwnedAndOperatedOnly or OwnedAndOperatedAndSyndicatedSearch.
        audience_ads_bid_adjustment: -100 (off) to 900 percent.
draft_microsoft_keywords tool
Draft adding keywords to a Microsoft Advertising ad group (preview only).

    Keywords already in the ad group are skipped; broad match is refused
    unless the campaign uses conversion-based bidding (MaxConversions,
    MaxConversionValue or a target CPA/ROAS). The returned plan_id is
    applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        keywords: Text or {"text", "match_type": Exact|Phrase|Broad, "bid"}; text defaults to Phrase.
update_microsoft_keyword_bids tool
Draft keyword bid changes in one Microsoft Advertising ad group (preview only).

    Each raise is capped by max_bid_increase_pct against the keyword's
    current bid (or the ad group default). A null bid removes the keyword's
    own bid so the ad group default applies. The returned plan_id is applied
    with confirm_and_apply, which refuses if a bid changed after the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        bids: [{"keyword_id", "bid"}].
add_microsoft_negative_keywords tool
Draft negative keywords directly on one Microsoft Advertising campaign or ad group (preview only).

    Negatives already there are skipped, and the preview names active
    keywords they would block. A shared list (propose_microsoft_negative_keyword_list)
    is the reusable alternative. The returned plan_id is applied with
    confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or ad_group_id, not both).
        ad_group_id: Ad group id.
        keywords: Negative keyword texts.
        match_type: Phrase (default) or Exact.
propose_microsoft_negative_keyword_list tool
Draft a new shared Microsoft Advertising negative keyword list and attach it to campaigns (preview only).

    Refuses a name that already exists (add_to_microsoft_negative_keyword_list
    appends to it) and campaigns already at Microsoft's 20-list limit; the
    preview names active keywords the negatives would block. The returned
    plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_name: List name.
        keywords: Negative keyword texts (up to 5,000).
        match_type: Phrase (default) or Exact.
        campaign_ids: Campaigns to attach the list to.
add_to_microsoft_negative_keyword_list tool
Draft appending negatives to an existing Microsoft Advertising negative keyword list (preview only).

    Items already in the list are skipped; the preview names active
    keywords in attached campaigns that the new negatives would block. The
    returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_id: Shared list id (get_microsoft_negative_keywords).
        keywords: Negative keyword texts.
        match_type: Phrase (default) or Exact.
attach_microsoft_negative_keyword_list tool
Draft attaching a shared Microsoft Advertising negative keyword list to campaigns (preview only).

    Campaigns already attached are skipped. The returned plan_id is applied
    with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_id: Shared list id.
        campaign_ids: Campaign ids.
detach_microsoft_negative_keyword_list tool
Draft detaching a shared Microsoft Advertising negative keyword list from campaigns; the list stays (preview only).

    The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        list_id: Shared list id.
        campaign_ids: Campaign ids.
draft_microsoft_responsive_search_ad tool
Draft a Microsoft Advertising responsive search ad, created PAUSED (preview only).

    Checks 3–15 headlines of at most 30 characters, 2–4 descriptions of at
    most 90, display paths of at most 15, pin slots that stay fillable and a
    reachable landing page. The returned plan_id is applied with
    confirm_and_apply; the dry run refuses an identical ad already in the
    ad group.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_group_id: Ad group id.
        headlines: Text or {"text", "pinned_field": HEADLINE_1|HEADLINE_2|HEADLINE_3}.
        descriptions: Text or {"text", "pinned_field": DESCRIPTION_1|DESCRIPTION_2}.
        final_url: Landing page.
        path1: First display path.
        path2: Second display path (needs path1).
update_microsoft_responsive_search_ad tool
Draft changes to a Microsoft Advertising responsive search ad (preview only).

    headlines or descriptions replace that whole list; paths "" remove
    them. Edited ads go back to editorial review. The returned plan_id is
    applied with confirm_and_apply, which refuses if the ad changed after
    the preview.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        ad_id: Ad id.
        headlines: Full new list (text or {"text", "pinned_field"}).
        descriptions: Full new list.
        final_url: New landing page.
        path1: New first display path; "" removes it.
        path2: New second display path; "" removes it.
draft_microsoft_sitelinks tool
Draft sitelinks for a Microsoft Advertising campaign or the account (preview only).

    Link text is at most 25 characters with descriptions (35 without);
    descriptions come in pairs of at most 35; every URL is checked.
    Sitelinks already linked are skipped. The returned plan_id is applied
    with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or scope="account").
        scope: "account" links them to every campaign without its own.
        sitelinks: [{"link_text", "final_url", "description1", "description2"}].
draft_microsoft_callouts tool
Draft callouts (at most 25 characters each) for a Microsoft Advertising campaign or the account (preview only).

    Callouts already linked are skipped. The returned plan_id is applied
    with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or scope="account").
        scope: "account" links them account-wide.
        callouts: Callout texts.
draft_microsoft_structured_snippet tool
Draft a structured snippet (a header and 3–10 values) for a Microsoft Advertising campaign or the account (preview only).

    The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or scope="account").
        scope: "account" links it account-wide.
        header: Microsoft header such as Services, Brands, Types.
        values: 3–10 values of at most 25 characters.
draft_microsoft_call_extension tool
Draft a call extension (phone number shown with the ads) for one Microsoft Advertising campaign (preview only).

    Microsoft allows one per campaign; a campaign that already has one is
    refused. The returned plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id.
        phone_number: The number to show (usually a call-tracking number).
        country_code: Two-letter country of the number, e.g. US.
draft_microsoft_image_extension tool
Draft image extensions (photos shown with Microsoft search ads) for a campaign, an ad group or the account (preview only).

    One image extension per image, up to 10 images. Each image is checked
    now against Microsoft's requirements: JPEG, PNG or non-animated GIF, at
    most 5 MB, a 1.91:1 aspect ratio (e.g. 1200x628), at least 703x368 and
    at most 2592 wide and 2048 high; a bad image is refused with the reason.
    Applying uploads the images to the account's media library, creates the
    extensions and links them; the dry run reads every image again and
    refuses one that changed. Image extensions can also take the ads into
    native placements on the Microsoft Audience Network. The returned
    plan_id is applied with confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        campaign_id: Campaign id (or ad_group_id, or scope="account").
        ad_group_id: Ad group id (from get_microsoft_ad_groups).
        scope: "account" links them to the whole account.
        image_paths: Local image files on the machine running AdLoop (not on
            a hosted server).
        image_urls: Public http(s) image URLs; private or internal addresses
            are refused.
        upload_ids: Ids of uploaded images (up_..., from upload_images or
            list_uploads), for images without a public URL.
        alt_text: Required, at most 35 characters: describes the image for
            screen readers and shows on hover. Used for every image.
        display_text: Optional caption (at most 35 characters) shown under each
            image in the multi-image layout; passing it makes the extensions
            eligible for that layout too.
        final_url: Optional landing page for clicks on the image (checked);
            empty uses the ad's own final URL.
remove_microsoft_entity tool
Draft deleting a Microsoft Advertising entity: irreversible, double confirmation (preview only).

    Removes a campaign, ad group, ad or keyword by id, or (by the remove_id
    the read tools return) a direct negative keyword, a negative list item,
    a location or schedule criterion, or an extension link (account,
    campaign or ad group, image extensions included). A criterion is read
    and named first; the last targeted location is refused (the campaign
    would serve everywhere; update_microsoft_campaign_targeting replaces
    the whole list). Pausing keeps
    history and can be undone. The returned plan_id is applied with
    confirm_and_apply.

    Args:
        ad_account_id: Microsoft ad account id. Empty uses the config default.
        entity_type: campaign, ad_group, ad, keyword, negative_keyword,
            negative_list_item, campaign_criterion or extension_association.
        entity_id: The id, or the remove_id for the composite types.
draft_key_event tool
Draft marking a GA4 event as a key event (conversion), or changing an existing one — returns a PREVIEW.

    The fix for "the event fires but isn't tracked as a conversion":
    attribution_check / validate_tracking diagnose it, this closes the loop.
    When the event already is a key event, the plan changes its counting
    method or default value instead and the preview shows before and after;
    nothing to change returns NO_CHANGE. Applies to future data only.
    Returns a preview with a plan_id and warnings; nothing changes until
    confirm_and_apply applies it.

    Args:
        event_name: Name of the GA4 event to mark as a key event, exactly as it
            fires (e.g. "sign_up", "purchase"). Required.
        counting_method: ONCE_PER_EVENT (counts every occurrence, e.g.
            purchases) or ONCE_PER_SESSION (counts once per session, e.g.
            sign-ups). Defaults to ONCE_PER_EVENT.
        property_id: Numeric GA4 property ID, with or without the "properties/"
            prefix. If empty, uses the default from config.
        default_value: Value GA4 gives each key event when the event sends
            no value parameter, e.g. 20 for a lead. Needs currency_code.
        currency_code: Three-letter currency of default_value, e.g. "EUR".
draft_delete_key_event tool
Draft removing a GA4 key event so the event no longer counts as a conversion, returning a PREVIEW.

    The event itself keeps firing and stays in event reports; only its
    key-event status goes, for future data (key events already recorded are
    not reclassified). The draft resolves the event name against the
    property's key events (keyEvents.list), so the preview names the exact
    key event, its counting method and create time; an unknown name returns
    the existing key events, and one GA4 marks as not deletable is refused.
    Returns a preview with a plan_id and warnings; nothing changes until
    confirm_and_apply applies it (GA4 Admin API keyEvents.delete).

    Args:
        event_name: Event name of the key event to remove, exactly as listed
            by list_key_events (e.g. "sign_up"). Required.
        property_id: Numeric GA4 property ID, with or without the "properties/"
            prefix. If empty, uses the default from config.
draft_ga4_annotation tool
Draft creating, changing or deleting a GA4 annotation (a note on a date or date range in GA4's charts), returning a PREVIEW.

    Use it to mark what explains a change in the data: a site relaunch, a
    price change, a campaign start, a tracking fix. Create needs title and
    date; update and delete need the annotation's ID from
    list_ga4_annotations, and an update changes only the fields passed (the
    preview shows before and after). Annotations Google created itself
    cannot be changed. Nothing changes until confirm_and_apply applies it;
    the dry run re-reads the annotation and refuses if it was changed in
    GA4 after the preview. GA4 Admin API v1alpha (reportingDataAnnotations).

    Args:
        action: "create" (default), "update" or "delete".
        title: Up to 60 characters. Required for create.
        date: The day as YYYY-MM-DD, or the first day of a range together
            with end_date. Required for create.
        end_date: Last day of a range (YYYY-MM-DD); leave empty for one day.
        description: Up to 150 characters. On update, "" clears it.
        color: BLUE (default on create), GREEN, RED, PURPLE, BROWN or CYAN.
        annotation: ID or resource name of the annotation to update or
            delete (list_ga4_annotations).
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_ga4_audience tool
Draft creating, renaming or archiving a GA4 audience — returns a PREVIEW.

    An audience is the users who sent certain events, viewed certain
    pages, or did a sequence of both in order. A linked Google Ads
    account receives it as a remarketing list within one to two days, to
    attach to campaigns with draft_audience_attachment: this is how to
    build a list of site visitors, of buyers, of visitors who did not
    buy, or of people who saw the pricing page without signing up. GA4
    fixes the conditions and the membership duration at creation;
    afterwards only the name and description can change, and archiving is
    permanent (it needs a double confirmation). The draft refuses a taken
    name and a full property, and the preview warns when the property's
    audiences would not reach Google Ads (see list_ga4_audiences). Nothing
    changes until confirm_and_apply applies the plan_id.

    Args:
        action: "create" (default), "update" (name and description only) or
            "archive".
        display_name: Name of the audience; required for create, the new
            name for update.
        include_events: Create only. Users who sent ANY of these events
            join, e.g. ["session_start"] for every visitor, ["purchase"]
            for buyers, ["sign_up", "generate_lead"] for leads. Together
            with include_pages it is still "any of".
        exclude_events: Create only. Users who sent any of these are kept
            out, e.g. include ["session_start"] and exclude ["purchase"]
            for visitors who did not buy.
        include_pages: Create only. Users who viewed a page whose full
            URL contains ANY of these texts join, e.g. ["/pricing"]
            (also matches /pricing/enterprise and /en/pricing). Not case
            sensitive.
        exclude_pages: Create only. Users who viewed such a page are kept
            out, e.g. ["/thank-you"].
        sequence: Create only, instead of include_events / include_pages.
            2 to 10 steps the user must do in this order. Each is an event
            name ("begin_checkout") or an object: {"event": "..."} or
            {"page": "/pricing"}, optionally with "directly_followed": true
            (no other event in between) and "within_minutes": 30 (after
            the step before). Exclusions can be added as usual.
        membership_duration_days: Create only. Days a user stays after
            last meeting the conditions, 1 to 540 (default 30).
        exclude_permanently: Create only. True keeps users out for good
            once they sent an excluded event; False (default) only while
            they keep meeting the exclusion within the membership window.
        description: Optional for create (one is written from the events);
            the new description for update.
        audience: For update and archive: the audience's display name or
            resource name from list_ga4_audiences.
        property_id: GA4 property as "properties/123456789" or the bare
            numeric ID. If empty, uses the default from config.
draft_ga4_custom_dimension tool
Draft registering, changing or archiving a GA4 custom dimension, returning a PREVIEW.

    Registering makes an event parameter (EVENT scope), a user property
    (USER) or an ecommerce item parameter (ITEM) reportable as a dimension.
    Before anything reaches Google the draft refuses a parameter that is
    already registered, a taken display name and a full property (see
    list_ga4_custom_definitions), and the preview warns that GA4 fills the
    dimension only from now on and that parameter_name and scope cannot
    change later. Update changes display_name, description or (USER scope)
    disallow_ads_personalization; archive removes it from reports and frees
    the slot, cannot be undone and needs a double confirmation. Nothing
    changes until confirm_and_apply applies it. GA4 Admin API
    (customDimensions).

    Args:
        action: "create" (default), "update" or "archive".
        parameter_name: The event parameter or user property name exactly as
            sent, e.g. "plan_type". Required for create; identifies the
            dimension for update and archive.
        scope: EVENT (default), USER or ITEM.
        display_name: Name shown in GA4; defaults to parameter_name on create.
        description: Up to 150 characters. On update, "" clears it.
        disallow_ads_personalization: USER scope only: keep this dimension out
            of ads personalization.
        custom_dimension: Resource name, instead of parameter_name, for update
            or archive.
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_ga4_custom_metric tool
Draft registering, changing or archiving a GA4 custom metric, returning a PREVIEW.

    Registering makes a numeric event parameter reportable as a metric. The
    draft refuses a parameter that is already registered, a taken display
    name and a full property (see list_ga4_custom_definitions), and the
    preview warns that GA4 fills the metric only from now on. Update changes
    display_name, description, measurement_unit or restricted_metric_type;
    archive removes it from reports, cannot be undone and needs a double
    confirmation. Nothing changes until confirm_and_apply applies it. GA4
    Admin API (customMetrics).

    Args:
        action: "create" (default), "update" or "archive".
        parameter_name: The numeric event parameter exactly as sent, e.g.
            "discount_amount". Required for create; identifies the metric for
            update and archive.
        display_name: Name shown in GA4; defaults to parameter_name on create.
        description: Up to 150 characters. On update, "" clears it.
        measurement_unit: STANDARD (default on create), CURRENCY, FEET,
            METERS, KILOMETERS, MILES, MILLISECONDS, SECONDS, MINUTES or HOURS.
        restricted_metric_type: For CURRENCY metrics, required: ["COST_DATA"]
            or ["REVENUE_DATA"] (or both).
        custom_metric: Resource name, instead of parameter_name, for update or
            archive.
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_ga4_data_retention tool
Draft a change to how long GA4 keeps event- and user-level data, returning a PREVIEW.

    GA4 defaults to 2 months, which cuts explorations, funnels and other
    user-level reports short; standard properties allow 14 months, GA4 360
    up to 50. Standard reports are aggregated and not affected. Lengthening
    applies from now on (data already deleted does not come back);
    shortening deletes older data for good and needs a double confirmation.
    The preview shows before and after and reminds the user that a privacy
    policy naming a retention period must match. NO_CHANGE when the settings
    already match. Nothing changes until confirm_and_apply applies it; the
    dry run re-reads the settings and refuses if they changed in GA4 after
    the preview.

    Args:
        event_data_retention: Months to keep event-level data: 2, 14, 26, 38
            or 50 (or TWO_MONTHS, FOURTEEN_MONTHS, ...). Empty leaves it.
        user_data_retention: Months to keep user-level data, same values.
            Empty leaves it.
        reset_user_data_on_new_activity: True restarts a user's retention
            period with each new event from that user. Empty leaves it.
        property_id: Numeric GA4 property ID, with or without the
            "properties/" prefix. If empty, uses the default from config.
draft_create_conversion_action tool
Draft a new Google Ads ConversionAction — returns a PREVIEW.

    Returns a preview with a plan_id (plus warnings where relevant); nothing
    changes until confirm_and_apply applies it. SMART_CAMPAIGN_* and
    GOOGLE_HOSTED types are auto-managed by Google and rejected with
    MUTATE_NOT_ALLOWED.

    Args:
        name: Conversion action name as it appears in Google Ads. Required.
        type_: ConversionActionType enum value, e.g. AD_CALL, WEBSITE_CALL,
            WEBPAGE, WEBPAGE_CODELESS, GOOGLE_ANALYTICS_4_CUSTOM,
            GOOGLE_ANALYTICS_4_PURCHASE, UPLOAD_CALLS, UPLOAD_CLICKS.
        category: ConversionActionCategory enum value, e.g. PHONE_CALL_LEAD,
            SUBMIT_LEAD_FORM, PURCHASE, ... (default DEFAULT).
        default_value: Value attributed to each conversion, in currency_code
            units (not micros). Must be >= 0. A positive default_value with
            always_use_default_value=False is a legal "fallback" config: the
            preview warns but does NOT flip the flag.
        currency_code: 3-letter ISO 4217 currency code for default_value
            (default USD).
        always_use_default_value: True ignores transaction values from the
            tag/import and always uses default_value; False uses default_value
            only as a fallback when no value is supplied.
        counting_type: ONE_PER_CLICK (default; one conversion per click, typical
            for lead gen) or MANY_PER_CLICK (every conversion counts, typical
            for ecommerce).
        phone_call_duration_seconds: Minimum call length in seconds for a call
            to count; only meaningful for call conversions (PHONE_CALL_LEAD
            category). 0 leaves Google's default.
        primary_for_goal: True (default) makes it a Primary action that Smart
            Bidding optimizes toward; False makes it Secondary (recorded only).
        include_in_conversions_metric: IMMUTABLE — Google derives it from
            primary_for_goal and the category's goal, so this value is not sent.
        click_through_window_days: Click-through attribution window in days,
            1-90. 0 leaves Google's default.
        view_through_window_days: View-through attribution window in days,
            1-30. 0 leaves Google's default.
        attribution_model: AttributionModel enum value, e.g.
            GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN. Empty leaves Google's default.
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
draft_update_conversion_action tool
Draft a partial UPDATE of an existing ConversionAction — returns PREVIEW.

    Only parameters passed non-empty/non-default are sent to the API.
    Covers renaming, demoting a Primary to Secondary, changing value,
    adjusting the call-duration threshold, changing attribution, or moving
    the action to another goal with category.
    SMART_CAMPAIGN_* and GOOGLE_HOSTED types reject mutations with
    MUTATE_NOT_ALLOWED at apply time. Returns a preview with a plan_id (plus
    warnings where relevant); nothing changes until confirm_and_apply applies
    it.

    Args:
        conversion_action_id: Numeric ConversionAction ID. It comes from:
            SELECT conversion_action.id, conversion_action.name FROM
            conversion_action.
        name: New name. Empty keeps the current name.
        primary_for_goal: True makes it Primary (Smart Bidding optimizes toward
            it); False demotes it to Secondary. Omit to leave unchanged.
        default_value: New default value in the action's currency (not micros),
            >= 0. 0 leaves it unchanged.
        currency_code: New 3-letter ISO 4217 currency code. Empty leaves it
            unchanged.
        always_use_default_value: True always uses default_value; False uses
            it only as a fallback when the tag/import supplies no value (the
            preview warns when combined with a positive default_value). Omit to
            leave unchanged.
        counting_type: ONE_PER_CLICK or MANY_PER_CLICK. Empty leaves it
            unchanged.
        phone_call_duration_seconds: Minimum call length in seconds for a call
            to count. 0 leaves it unchanged.
        include_in_conversions_metric: Refused when passed: Google answers
            IMMUTABLE_FIELD at apply, and a dry run does not catch it. It derives
            the value from primary_for_goal and whether the goal of the action's
            category is biddable; use those instead.
        click_through_window_days: Click-through attribution window in days,
            1-90. 0 leaves it unchanged.
        view_through_window_days: View-through attribution window in days,
            1-30. 0 leaves it unchanged.
        attribution_model: AttributionModel enum value, e.g.
            GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN. Empty leaves it unchanged.
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
        category: ConversionActionCategory to move the action to, e.g.
            PHONE_CALL_LEAD; that decides which goal it belongs to. The preview
            pins the current one (current_category); if the category is changed
            in Google Ads before the apply, nothing is sent. Empty leaves it
            unchanged.
draft_remove_conversion_action tool
Draft a REMOVAL of a ConversionAction — returns a PREVIEW.

    Removal stops counting and drops the action from goal lists; historical
    data is preserved but the action is irreversible. SMART_CAMPAIGN_* and
    GOOGLE_HOSTED types reject removal with MUTATE_NOT_ALLOWED. Returns a
    preview with a plan_id; nothing changes until confirm_and_apply applies it.

    Args:
        conversion_action_id: Numeric ConversionAction ID, e.g. from SELECT
            conversion_action.id, conversion_action.name FROM conversion_action.
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
draft_upload_call_conversions tool
Draft an offline CALL-conversion upload from a CSV — returns a PREVIEW.

    Uploads call conversions via ConversionUploadService.UploadCallConversions,
    matching the call against the ad click by the caller's phone number.
    The CSV must have columns: Caller's Phone Number,
    Call Start Time, Conversion Name, Conversion Time, Conversion Value,
    Conversion Currency. The Conversion Name must match an existing
    UPLOAD_CALLS-type conversion action — verified against the account while
    drafting, so a typo fails here rather than after the upload. Optional
    `Ad User Data` and `Ad Personalization` columns carry consent per row.

    The CSV comes from csv_path (a file on the machine running AdLoop) or
    from upload_id (a file uploaded with upload_conversion_csv, the only way
    on AdLoop Cloud). An uploaded file is deleted once the draft has read it.

    PII: the caller phone number is required RAW by Google (it cannot be
    hashed), so it lives in the plan's apply-only payload — the preview shows
    redacted ids and counts, the audit log and `plan.changes` show neither.
    Apply uploads exactly what you previewed (no CSV re-read).

    Phone numbers are normalized with libphonenumber semantics: a number
    carries no country code needs ``default_region``, an extension is dropped,
    and the German trunk marker in "+49 (0)89 …" is handled. Rows whose number
    stays unusable are skipped and reported in `skipped_rows` instead of being
    uploaded to no effect.

    Rows that repeat inside one file are named in `dedup_warnings`. A call
    upload has no dedup key at Google, so each of them still goes out as its
    own conversion — the warning is the only place that says so.

    Returns a preview with a plan_id, the row counts, the consent the rows
    actually carry (`consent_summary`) and the skipped rows; nothing is
    uploaded until that preview is confirmed.

    Args:
        csv_path: Path of the CSV file holding the upload rows, read on the
            machine that runs AdLoop. Refused on the hosted server; use
            upload_id there.
        upload_id: Id of a CSV uploaded with upload_conversion_csv (up_...),
            instead of csv_path.
        default_region: ISO 3166-1 alpha-2 country assumed for phone numbers
            that carry no country code, e.g. "DE" for "0151 12345678". Empty
            leaves such numbers unusable and the row is skipped.
        consent: Consent signals for GDPR/EEA, as an object with "ad_user_data"
            and/or "ad_personalization", each "GRANTED", "DENIED" or
            "UNSPECIFIED". None sends UNSPECIFIED. A row whose own "Ad User
            Data" / "Ad Personalization" columns are filled in overrides this
            for that row; empty cells fall back to it.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
draft_upload_enhanced_conversions_for_leads tool
Draft an Enhanced Conversions for LEADS upload from a CSV — PREVIEW.

    Uploads lead conversions via
    ConversionUploadService.UploadClickConversions with user_identifiers,
    matching hashed customer PII back to the Google users who clicked the ads.
    The CSV holds RAW PII in columns: Email, Phone
    Number, First Name, Last Name (plus Conversion Name, Conversion Time,
    Conversion Value, Conversion Currency; optional Order ID dedup key, and
    optional `Ad User Data` / `Ad Personalization` consent columns).

    PII is normalized and SHA-256-hashed AT PREVIEW TIME — only the hashes are
    stored in the plan. Raw email/phone/name never land in the plan or the
    audit log. A cell that already is a SHA-256 hex digest (a CRM export that
    hashes before writing) is used as it is. The target conversion action must
    be UPLOAD_CLICKS-type.

    An Order ID column makes re-uploads dedup instead of double-counting.

    Rows that repeat inside one file are named in `dedup_warnings`. Rows
    sharing an Order ID count once at Google; two rows with different Order
    IDs are two real orders and are not reported.

    The CSV comes from csv_path (a file on the machine running AdLoop) or
    from upload_id (a file uploaded with upload_conversion_csv, the only way
    on AdLoop Cloud). An uploaded file is deleted once the draft has read it.

    Returns a preview with a plan_id, the row counts, the consent the rows
    actually carry (`consent_summary`) and the skipped rows; nothing is
    uploaded until that preview is confirmed.

    Args:
        csv_path: Path of the CSV file holding the upload rows, read on the
            machine that runs AdLoop. Refused on the hosted server; use
            upload_id there.
        upload_id: Id of a CSV uploaded with upload_conversion_csv (up_...),
            instead of csv_path.
        default_region: ISO 3166-1 alpha-2 country assumed for phone numbers
            that carry no country code, e.g. "DE" for "0151 12345678". Empty
            leaves such numbers unusable; the row still uploads when its email
            or its complete address identifies the lead.
        consent: Consent signals for GDPR/EEA, as an object with "ad_user_data"
            and/or "ad_personalization", each "GRANTED", "DENIED" or
            "UNSPECIFIED". None sends UNSPECIFIED. A row whose own "Ad User
            Data" / "Ad Personalization" columns are filled in overrides this
            for that row; empty cells fall back to it.
        customer_id: Google Ads customer ID (digits, e.g. "1234567890"). Empty
            uses the configured default account.
validate_tracking tool
Compare tracking events found in the codebase against actual GA4 data.

    Takes the event names found in the codebase's gtag('event', ...) or
    dataLayer.push calls and checks which ones actually fire in GA4.

    Returns matched events with their GA4 counts, events missing from GA4,
    unexpected GA4 events, auto-collected events (page_view, session_start,
    etc.), insights on likely causes, and the date range.

    Args:
        expected_events: Event names found in the codebase, e.g. ["sign_up",
            "purchase"].
        property_id: GA4 property as "properties/123456789" (see
            get_account_summaries). If empty, uses the default from config.
        date_range_start: Start date: "today", "yesterday", "NdaysAgo" (e.g.
            "28daysAgo"), or "YYYY-MM-DD".
        date_range_end: End date, same formats as date_range_start.
generate_tracking_code tool
Generate a GA4 event tracking JavaScript snippet.

    Produces ready-to-paste gtag code for the specified event. Includes
    recommended parameters for well-known GA4 events (sign_up, purchase, etc.).
    Optionally checks GA4 to warn if the event already fires. Returns the
    javascript snippet, already_exists / existing_count from GA4, and notes
    (duplicates, marking it as a key event, GDPR consent).

    Args:
        event_name: GA4 event name for the snippet, e.g. "sign_up" or
            "generate_lead".
        event_params: Event parameters as a name-to-value object, e.g.
            {"method": "email"}. Missing recommended parameters for well-known
            events are added as typed placeholders.
        trigger: "form_submit", "button_click", or "page_load" — wraps the gtag
            call in an appropriate event listener (with a YOUR_SELECTOR
            placeholder for forms and buttons). Empty = bare gtag call.
        property_id: GA4 property as "properties/123456789" used for the
            existing-event check. If empty, uses the default from config.
        check_existing: When true (default), looks up the last 28 days of GA4
            events to report whether this event already fires.
estimate_budget tool
Forecast clicks, cost, and conversions for a set of keywords.

    Uses Google Ads Keyword Planner to estimate campaign performance without
    creating anything. Essential for budget planning before launching campaigns.
    Per-keyword max_cpc values are collapsed to a campaign-level manual CPC
    cap (the highest one) — the Ads API forecast takes no per-keyword bids.
    Returns estimated clicks, cost, avg CPC, conversions and avg CPA for the
    forecast period, daily estimates, and insights.

    Args:
        keywords: List of {"text": "keyword", "match_type": "EXACT|PHRASE|BROAD",
            "max_cpc": 1.50}. match_type defaults to BROAD; max_cpc is optional
            (defaults to 1.00 in account currency, not micros). At least one
            keyword is required.
        daily_budget: Daily budget in account currency. If provided, insights
            will show what % of traffic the budget captures. 0 = no budget
            comparison.
        geo_target_id: Geo target constant ID (2276=Germany, 2840=USA, 2826=UK,
            2250=France). Defaults to 2276.
        language_id: Language constant ID (1000=English, 1001=German,
            1002=French, 1003=Spanish). Defaults to 1000.
        forecast_days: Forecast horizon in days, starting tomorrow (default 30).
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
discover_keywords tool
Discover new keyword ideas using Google Ads Keyword Planner.

    Mirrors the "Discover new keywords" UI in Keyword Planner: start with
    keywords (seed_keywords), start with a website (url), or both together
    for more targeted ideas. At least one of seed_keywords or url is required.

    Returns keyword ideas sorted by avg monthly search volume, with
    competition level (LOW/MEDIUM/HIGH) and top-of-page bid range, plus the
    seeds used and insights.

    Args:
        seed_keywords: Seed terms, e.g. ["running shoes", "trail running"].
        url: A landing page or site URL to extract ideas from, e.g.
            "https://example.com/products".
        geo_target_id: Geo target constant ID (2276=Germany, 2840=USA, 2826=UK).
            Defaults to 2276.
        language_id: Language constant ID (1000=English, 1001=German,
            1002=French). Defaults to 1000.
        page_size: Max keyword ideas to return (default 50, clamped to 1-1000).
        customer_id: Google Ads customer ID (digits, dashes allowed). Defaults
            to the configured account.
        include_monthly_volumes: true adds per-month search history (last 24
            months, top-20 ideas) plus a seasonality insight — relevant to
            questions about demand trends, seasonality, or "when should I ramp
            budget".
suggest_brands tool
Resolve a brand name to the brands Google recognizes for it.

    Mirrors the brand picker in the Google Ads UI
    (BrandSuggestionService.SuggestBrands): takes a free-text name such as
    "EscapeGame München" or "NoWayOut" and returns the matching brands with
    their ID, display name, state, and associated URLs.

    The returned brand ID is the Commercial Knowledge Graph ID. Brand
    criteria — brand lists, brand exclusions — target that ID, not a display
    name, so a name is resolved here before it can go into a brand list.

    Args:
        brand_prefix: The brand name to look up, free text (e.g. "NoWayOut").
        selected_brand_ids: Commercial Knowledge Graph MIDs already picked,
            handed back so Google keeps them in the suggestion set while the
            prefix narrows. Optional.
        customer_id: Ads account ID. Defaults to the configured account.
check_brand_names tool
Check a list of brand names against Google's brand knowledge graph.

    One SuggestBrands call per name, for the case where a shortlist has to be
    triaged instead of a single name resolved: which of these brands does
    Google know at all, and what is the ID of each?

    Returns checked / matched / no_match counts and one result per name with
    status "matched" (with a best-match brand plus all candidates) or
    "no_match" (empty candidate list — a normal answer, not an error).
    exact_match marks a candidate whose name matches the query apart from case
    and punctuation; anything else is a Google suggestion, not a guarantee.

    Args:
        brand_names: The names to triage, at most 25 per call — the API
            resolves one prefix per request, so longer lists take several calls.
        customer_id: Ads account ID. Defaults to the configured account.
get_brand_lists tool
List all brand lists (SharedSets of type BRANDS) in the account.

    Returns each list's ID, name, status, and member count, plus the total —
    the basis for reusing an existing list with add_to_brand_list instead of
    duplicating it with propose_brand_list.

    Args:
        customer_id: Ads account ID. Defaults to the configured account.
get_brand_list_brands tool
List the brands inside a brand list.

    Returns the brands and their total. Each entry carries brand.entity_id
    (the Commercial KG MID that suggest_brands returns as id), the display
    name, primary URL, status and a criterion_id — the latter is what
    remove_from_brand_list needs.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists (shared_set.id).
        customer_id: Ads account ID. Defaults to the configured account.
get_brand_list_campaigns tool
List which campaigns a brand list is attached to.

    Brand lists attach as CampaignCriterion rows of type BRAND_LIST (not as
    CampaignSharedSet like negative keyword lists). Returns each attachment's
    campaign ID, name and status, the criterion, and `role`: "excluded" when
    the criterion is negative, "targeted" when it restricts targeting to the
    list.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists. When omitted,
            all brand-list attachments in the account are returned.
        customer_id: Ads account ID. Defaults to the configured account.
propose_brand_list tool
Draft a brand list and optionally attach it to campaigns — returns a PREVIEW.

    Creates a SharedSet of type BRANDS, fills it with brands, and — when
    campaign_ids is given — attaches it to those campaigns.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        list_name: Name for the new list, as it should appear in Google Ads.
        brand_ids: Commercial Knowledge Graph MIDs — the `id` field from
            suggest_brands / check_brand_names, which resolve names; a
            display name alone cannot be written. Duplicates are dropped.
        campaign_ids: Optional numeric campaign IDs. When omitted, the list is
            created without being used yet; attach_brand_list_to_campaigns
            attaches it later.
        negative: True (default) excludes the brands from those campaigns;
            False restricts targeting to them instead.
        customer_id: Ads account ID. Defaults to the configured account.
add_to_brand_list tool
Append brands to an EXISTING brand list — returns a PREVIEW.

    For a list that already exists and only needs more brands
    (propose_brand_list creates a new list instead). The shared_set_id comes
    from get_brand_lists; get_brand_list_brands shows the brands already in
    the list, which makes a brand that would be added twice visible.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        brand_ids: Commercial Knowledge Graph MIDs from suggest_brands.
        customer_id: Ads account ID. Defaults to the configured account.
remove_from_brand_list tool
Remove brands from a brand list — returns a PREVIEW.

    SharedCriteria have no status field, so removal is the only way to take a
    brand out of a list — there is nothing to pause. Removing a brand does not
    detach the list from any campaign.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        criterion_ids: Numeric criterion_id values from get_brand_list_brands.
            This is irreversible — the brand leaves the list immediately.
        customer_id: Ads account ID. Defaults to the configured account.
attach_brand_list_to_campaigns tool
Attach an existing brand list to one or more campaigns — returns a PREVIEW.

    Creates a CampaignCriterion.brand_list per campaign. This is NOT the
    CampaignSharedSet linkage used for negative keyword lists — brand lists are
    criteria, and `negative` decides the role. The shared_set_id comes from
    get_brand_lists; get_brand_list_campaigns lists existing attachments.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        campaign_ids: Numeric campaign IDs to attach the list to.
        negative: True (default) excludes the brands from those campaigns;
            False restricts targeting to them instead.
        customer_id: Ads account ID. Defaults to the configured account.
detach_brand_list_from_campaigns tool
Detach a brand list from one or more campaigns — returns a PREVIEW.

    Removes the CampaignCriterion rows linking the list to those campaigns; the
    list itself and its brands are unchanged. get_brand_list_campaigns lists
    the existing attachments.

    Returns a preview with a plan_id; nothing changes until the returned
    plan_id is applied with confirm_and_apply.

    Args:
        shared_set_id: Numeric list ID from get_brand_lists.
        campaign_ids: Numeric campaign IDs to detach the list from. Campaigns
            that do not carry the list are reported as `not_attached` in the
            apply result instead of failing the batch.
        customer_id: Ads account ID. Defaults to the configured account.
approval_card resource
Renders a change preview with Test run and Apply buttons.
upload_card resource
A drop zone that uploads images to AdLoop for use as ad assets.
adloop_view resource
Draws a read result as a dashboard (charts and tables).

What we checked

The same checks run on every server. Each line below has one of these marks:

FoundA published issue such as a risky tool or a CVE
PassedWe ran the check on this server and found nothing
After reviewChecked; we publish it once a person verifies it
Partly tracedRan, but the scanner could not follow every path to its end
FactWhat the code does, not a judgement either way
Not checkedThe scanner had nothing to read for it, or it needs the live server
Code Safetypartly traced
  • 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injection
    Checked on every scan. Results in this category are published only after a person has verified them.
Capability Exposure6.1
  • Runs programs the caller chooses
    No tool runs a command or program the caller supplies — 207 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Executes caller-supplied code
    No tool evaluates code the caller supplies — 207 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Reads or writes any file path
    No tool works on a file path the caller supplies without a root check — 207 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Requests any address
    No tool sends a request to an address the caller supplies — 207 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Runs caller-supplied SQL
    No tool executes a query the caller supplies — 207 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Tools that start processes
    Not seen in the traced code of 208 capabilities; 207 more call code the scanner could not follow, where it may happen
  • Tools that touch files
    205 of 208 capabilities touch files; 2 more call code the scanner could not follow, where it may happen
  • Tools that call the network
    Not seen in the traced code of 208 capabilities; 207 more call code the scanner could not follow, where it may happen
Where the code is: 208 handlers in 1 file at commit 816935c11cec
Prompt Integrity10.0
  • 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrity
    Checked on every scan. Results in this category are published only after a person has verified them.
Supply Chainnot checked
  • Dependency manifests
    1 manifest: pyproject.toml
  • Lockfiles checked against OSV
    Nothing could be resolved to exact versions; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
  • MCP SDK version
    fastmcp >=4.0
Secrets & Credentials10.0
  • 3 checks: credential harvesting, undeclared credential access, credentials sent over the network
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tools that read credentials
    200 of 208 capabilities read credentials; 7 more call code the scanner could not follow, where it may happen
  • Environment variables
    200 capabilities read environment variables (often API keys)
  • Authentication declared
    Not checked: needs the live server's tools/list (a remote server declares how clients authenticate)
Behavior Transparency10.0
  • 3 checks: undeclared network access, undeclared file access, undeclared process execution
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tool descriptions present
    Every tool has a description the model and the user can read
  • Statically known names
    Every tool's name could be read from the code
  • Input schemas
    Not checked: needs the live server's tools/list (every tool declares an input schema)
  • Destructive tools annotated
    Not checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)

Dependencies with known vulnerabilities (0 in production)

Dependency ranges were not resolved against a lockfile, so the score is capped at 7.

No known vulnerabilities in the production dependencies that could be checked.

Past security advisories

Vulnerabilities published for this server itself, from the GitHub Advisory Database.

No security advisories have been published for this server in the GitHub Advisory Database.

How it runs

Where it runsOn your machine, started by your MCP client from this repository or its package. A hosted version is also offered: https://mcp.getadloop.com/mcp not assessed a code scan covers the repository, not what runs on the vendor's servers
Transportnot stated in the code the scanner read; most local servers talk over stdio
Sign-innot checked needs the live server
MCP SDKfastmcp >=4.0
Servers in the code1 (AdLoop)

The project's own security

Security policynone no SECURITY.md in the repository: report issues privately through GitHub if it is enabled
Past advisoriesnone in the GitHub Advisory Database
Last push2026-11-12
Signed releasesnot checked yet

Where it is published

MCP Registrycom.getadloop/adloop
Hosted endpointhttps://mcp.getadloop.com/mcp
Listed in4 catalogs (github_search, glama, mcp_registry, mcp_toplist)
LicenseMIT
Created2026-03-06
Topicsai chatgpt claude cursor ga4 google-ads google-ads-api google-ads-mcp google-analytics google-tag-manager

Attack map

How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.

Request a scan or an audit

Tell us about your server. We reply within 5 working days.

What do you need? *

We use these details only to answer you.