Skip to main content
Glama

Generate a full campaign draft (keywords + ad groups + ad copy)

generate_campaign_draft
Destructive

Run the end-to-end Upfixe campaign generator: keyword research from the landing page and user-provided seeds, budget/CPA filter (drops keywords whose top-of-page CPC > targetCpa × 0.5), automatic ad-group splitting by theme/volume/ROI, and AI-generated ad copy (up to 15 headlines + 4 descriptions per ad group). Persists the result as a row in campaign_drafts and returns the draftId. NOTHING is pushed to Google Ads — that's a separate, explicit step (publish_campaign_to_google_ads).

INTENDED SEQUENCE:

  1. User provides campaign brief (landing page, country, language, budget, target CPA, any positive/negative seed keywords).

  2. Call propose_campaign_goal — show the proposed goal, get user approval.

  3. Call generate_campaign_draft (this tool) with the approved goal as campaignGoal.

  4. Show the returned draft to the user — keywords per ad group, sample headlines, total campaign size — and ask if they want changes.

  5. If they're happy and EXPLICITLY say they want to publish, call publish_campaign_to_google_ads({ draftId, confirm: true }).

Takes 1-2 minutes typically — keyword research and ad copy both involve external API calls. If it fails, the error message will say why (most often: Google Ads OAuth expired, landing page unreachable, or the targetCpa is so low that all keywords get filtered out).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCampaign name as it should appear in Google Ads. Keep under 80 chars.
isColdNotrue = cold audience (brand name added to negatives so we don't bid on people already searching for the brand). false / omitted = branded campaign that may bid on the brand name.
brandIdYesThe brand the campaign is for. Must have a value-prop doc.
countryYesTarget geography — ANY granularity Google Ads accepts. The field name is 'country' for legacy reasons but you can pass a city, state, region, country, or postal code, and Google's geoTargetConstants:suggest API resolves it. Always disambiguate non-unique city names with the country: 'London, United Kingdom' not just 'London' (London, Ontario exists); 'Paris, France' not 'Paris' (Paris, Texas exists); 'Florida, USA' not just 'Florida'. For LOCAL-SERVICE brands (plumbers, dentists, restaurants, trades) ALWAYS push the user for city-level — running a London-only company at country-wide UK targeting wastes 95%+ of impressions on people who can't buy.
languageYesISO-639-1 language code, e.g. 'en', 'es', 'fr'.
targetCpaYesTarget cost-per-acquisition in the account's billing currency. The keyword filter drops keywords whose top-of-page CPC exceeds targetCpa × 0.5, so set this honestly — too low and all keywords get filtered out, too high and the campaign overspends per conversion.
dailyBudgetYesDaily budget in the account's billing currency.
campaignGoalNoFree-text goal summary the user approved (from propose_campaign_goal, possibly with their edits). If omitted, the generator builds one from the landing page automatically. If you've already called propose_campaign_goal and the user said yes, ALWAYS pass that goal here so the user's approval flows through.
landingPageUrlYesThe specific page ads will drive traffic to.
negativeKeywordsNoNegative keywords — terms that should NOT trigger the ad.
positiveKeywordsNo3-5 specific seed keywords the user explicitly wants targeted (max 5). NEVER pass broad or generic terms (e.g. 'small business', 'make a business') or a raw dump from Keyword Planner. The generator expands from these 3-5 seeds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, idempotentHint=false, and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful context beyond that: 1-2 minute runtime, persistence as a campaign_drafts row, the returned draftId, and common failure modes (expired OAuth, unreachable landing page, over-aggressive CPA filter). It doesn't say whether re-running overwrites prior drafts. Good added value, but not rich enough to warrant a 5 given the annotations already carry the mutation profile.

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

Conciseness4/5

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

Front-loaded with the verb and scope, then the sequence, then runtime/failure notes — a sensible ordering. It is somewhat long, and the INTENDED SEQUENCE partially duplicates information already in the sibling tools' domains, but each sentence contributes actionable guidance rather than filler.

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

Completeness5/5

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

For a multi-step, long-running generative tool with no output schema, the description covers what it produces (draftId), where it persists, expected latency, failure modes, and the approval workflow that must precede it. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including the subtle ones (country granularity, positiveKeywords seeds, campaignGoal flow) is already documented in the schema. The description adds the CPC > targetCpa × 0.5 filter rule, but this same rule is also present in the targetCpa schema description. Baseline 3 is correct when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('generate ... campaign draft') and enumerates the pipeline steps (keyword research, budget/CPA filter, ad-group splitting, AI ad copy). It explicitly distinguishes itself from the sibling publish_campaign_to_google_ads by noting nothing is pushed to Google Ads. An agent can tell exactly what this does and where it stops.

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

Usage Guidelines5/5

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

The INTENDED SEQUENCE gives explicit step-by-step when-to-use: call propose_campaign_goal first, get approval, then call this, then only publish on explicit confirmation. It names the alternative publish tool and the condition (explicit user consent) required to move to it. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources