Skip to main content
Glama
johnoconnor0

Google Ads MCP Server

by johnoconnor0

google_ads_create_app_campaign

Create a Universal App Campaign to promote mobile app installs and engagement. Automatically optimizes ad creative and placement across Google Search, Display, YouTube, and Google Play.

Instructions

Create a Universal App Campaign (UAC) to promote mobile app installs and engagement.

App campaigns automatically optimize ad creative and placement across Google Search, Display Network, YouTube, and Google Play to drive app installs and in-app actions.

Args: customer_id: Google Ads customer ID (10 digits, no hyphens) campaign_name: Name for the app campaign app_id: App store identifier (bundle ID for iOS, package name for Android) app_store: "APPLE_APP_STORE" or "GOOGLE_APP_STORE" budget_amount: Daily budget in account currency bidding_strategy_goal_type: Bidding goal - one of: - OPTIMIZE_INSTALLS_TARGET_INSTALL_COST (target CPA for installs) - OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST (target CPA for installs + conversions) - OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST (target CPA for conversions) - OPTIMIZE_RETURN_ON_ADVERTISING_SPEND (target ROAS) - OPTIMIZE_PRE_REGISTRATION_CONVERSION_VOLUME (pre-registration campaigns) target_cpa: Optional target cost per action (for CPA-based strategies)

Returns: Dictionary with campaign creation results including: - campaign_id: Created campaign ID - campaign_name: Campaign name - resource_name: Full resource name - app_id: App store identifier - app_store: App store type - budget: Daily budget amount - bidding_goal: Selected bidding strategy goal

Example: Create an iOS app campaign optimizing for installs: google_ads_create_app_campaign( customer_id="1234567890", campaign_name="iOS App Install Campaign", app_id="com.example.myapp", app_store="APPLE_APP_STORE", budget_amount=100.0, bidding_strategy_goal_type="OPTIMIZE_INSTALLS_TARGET_INSTALL_COST", target_cpa=5.0 )

Notes: - Campaigns start in PAUSED status - Requires app store listing to be live - Automatic ad creation from app store assets - Can add text, image, video, and HTML5 assets for better performance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idYes
campaign_nameYes
app_idYes
app_storeYes
budget_amountYes
bidding_strategy_goal_typeYes
target_cpaNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main MCP tool handler function that creates an app campaign. Validates inputs (customer_id, budget, app_store, bidding_strategy, target_cpa), constructs an AppCampaignConfig, calls LocalAppManager.create_app_campaign(), logs the audit trail, and returns a formatted response.
        async def google_ads_create_app_campaign(
            customer_id: str,
            campaign_name: str,
            app_id: str,
            app_store: str,
            budget_amount: float,
            bidding_strategy_goal_type: str,
            target_cpa: Optional[float] = None
        ) -> Dict[str, Any]:
            """Create a Universal App Campaign (UAC) to promote mobile app installs and engagement.
    
            App campaigns automatically optimize ad creative and placement across Google Search,
            Display Network, YouTube, and Google Play to drive app installs and in-app actions.
    
            Args:
                customer_id: Google Ads customer ID (10 digits, no hyphens)
                campaign_name: Name for the app campaign
                app_id: App store identifier (bundle ID for iOS, package name for Android)
                app_store: "APPLE_APP_STORE" or "GOOGLE_APP_STORE"
                budget_amount: Daily budget in account currency
                bidding_strategy_goal_type: Bidding goal - one of:
                    - OPTIMIZE_INSTALLS_TARGET_INSTALL_COST (target CPA for installs)
                    - OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST (target CPA for installs + conversions)
                    - OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST (target CPA for conversions)
                    - OPTIMIZE_RETURN_ON_ADVERTISING_SPEND (target ROAS)
                    - OPTIMIZE_PRE_REGISTRATION_CONVERSION_VOLUME (pre-registration campaigns)
                target_cpa: Optional target cost per action (for CPA-based strategies)
    
            Returns:
                Dictionary with campaign creation results including:
                - campaign_id: Created campaign ID
                - campaign_name: Campaign name
                - resource_name: Full resource name
                - app_id: App store identifier
                - app_store: App store type
                - budget: Daily budget amount
                - bidding_goal: Selected bidding strategy goal
    
            Example:
                Create an iOS app campaign optimizing for installs:
                ```
                google_ads_create_app_campaign(
                    customer_id="1234567890",
                    campaign_name="iOS App Install Campaign",
                    app_id="com.example.myapp",
                    app_store="APPLE_APP_STORE",
                    budget_amount=100.0,
                    bidding_strategy_goal_type="OPTIMIZE_INSTALLS_TARGET_INSTALL_COST",
                    target_cpa=5.0
                )
                ```
    
            Notes:
                - Campaigns start in PAUSED status
                - Requires app store listing to be live
                - Automatic ad creation from app store assets
                - Can add text, image, video, and HTML5 assets for better performance
            """
            try:
                with performance_logger.track_operation("create_app_campaign"):
                    # Get client and initialize manager
                    client = get_auth_manager().get_client()
                    local_app_manager = LocalAppManager(client)
    
                    # Validate customer ID
                    customer_id = customer_id.replace('-', '')
                    if not customer_id.isdigit() or len(customer_id) != 10:
                        raise ValueError("Customer ID must be 10 digits")
    
                    # Validate budget
                    if budget_amount <= 0:
                        raise ValueError("Budget amount must be positive")
    
                    # Validate app store
                    try:
                        app_store_enum = AppCampaignAppStore(app_store)
                    except ValueError:
                        raise ValueError(f"Invalid app store. Must be: APPLE_APP_STORE or GOOGLE_APP_STORE")
    
                    # Validate bidding strategy
                    try:
                        bidding_goal_enum = AppCampaignBiddingStrategyGoalType(bidding_strategy_goal_type)
                    except ValueError:
                        valid_goals = [goal.value for goal in AppCampaignBiddingStrategyGoalType]
                        raise ValueError(f"Invalid bidding goal. Must be one of: {', '.join(valid_goals)}")
    
                    # Validate target CPA if provided
                    if target_cpa is not None and target_cpa <= 0:
                        raise ValueError("Target CPA must be positive")
    
                    # Create configuration
                    config = AppCampaignConfig(
                        name=campaign_name,
                        app_id=app_id,
                        app_store=app_store_enum,
                        budget_amount=budget_amount,
                        bidding_strategy_goal_type=bidding_goal_enum,
                        target_cpa=target_cpa
                    )
    
                    # Create campaign
                    result = local_app_manager.create_app_campaign(
                        customer_id=customer_id,
                        config=config
                    )
    
                    # Log audit trail
                    audit_logger.log_api_call(
                        operation="create_app_campaign",
                        customer_id=customer_id,
                        details={
                            'campaign_name': campaign_name,
                            'app_id': app_id,
                            'app_store': app_store,
                            'budget': budget_amount,
                            'bidding_goal': bidding_strategy_goal_type,
                            'target_cpa': target_cpa
                        },
                        response=result
                    )
    
                    # Format response
                    response = f"""
    ## App Campaign Created Successfully
    
    **Campaign Details:**
    - Campaign ID: `{result['campaign_id']}`
    - Campaign Name: {result['campaign_name']}
    - Resource Name: `{result['resource_name']}`
    
    **App Configuration:**
    - App ID: {result['app_id']}
    - App Store: {result['app_store']}
    
    **Budget & Bidding:**
    - Daily Budget: ${result['budget']:.2f}
    - Bidding Goal: {result['bidding_goal']}
    {f"- Target CPA: ${target_cpa:.2f}" if target_cpa else "- Bidding: Maximize Conversions (no target)"}
    
    **Status:** Campaign created in PAUSED status
    
    **Next Steps:**
    1. Add text assets (up to 5 headlines, 5 descriptions)
    2. Add image assets (recommended: 1200x628, 1200x1200, 320x50)
    3. Add video assets (YouTube videos)
    4. Add HTML5 assets if available
    5. Enable the campaign when ready to start
    
    **Optimization:**
    App campaigns automatically optimize ad placement across:
    - Google Search
    - Google Display Network
    - YouTube
    - Google Play
    - Google Discover
    
    The campaign will use machine learning to find the best audiences and creatives
    for your app promotion goals.
    """
    
                    return {
                        "content": [{"type": "text", "text": response.strip()}],
                        "metadata": result
                    }
    
            except Exception as e:
                error_msg = ErrorHandler.handle_error(e, {
                    'operation': 'create_app_campaign',
                    'customer_id': customer_id,
                    'campaign_name': campaign_name
                })
                return {"content": [{"type": "text", "text": error_msg}], "isError": True}
  • Dataclass defining the AppCampaignConfig schema used for app campaign creation, including name, app_id, app_store, budget_amount, bidding_strategy_goal_type, and optional target_cpa.
    @dataclass
    class AppCampaignConfig:
        """Configuration for app campaign creation."""
        name: str
        app_id: str  # App store ID
        app_store: AppCampaignAppStore
        budget_amount: float
        bidding_strategy_goal_type: AppCampaignBiddingStrategyGoalType
        target_cpa: Optional[float] = None
  • Enum schema for AppCampaignAppStore values (APPLE_APP_STORE, GOOGLE_APP_STORE).
    class AppCampaignAppStore(str, Enum):
        """App store types."""
        APPLE_APP_STORE = "APPLE_APP_STORE"
        GOOGLE_APP_STORE = "GOOGLE_APP_STORE"
  • Enum schema for AppCampaignBiddingStrategyGoalType values defining the available bidding goals.
    class AppCampaignBiddingStrategyGoalType(str, Enum):
        """App campaign bidding goals."""
        OPTIMIZE_INSTALLS_TARGET_INSTALL_COST = "OPTIMIZE_INSTALLS_TARGET_INSTALL_COST"
        OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST = "OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST"
        OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST = "OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST"
        OPTIMIZE_RETURN_ON_ADVERTISING_SPEND = "OPTIMIZE_RETURN_ON_ADVERTISING_SPEND"
        OPTIMIZE_PRE_REGISTRATION_CONVERSION_VOLUME = "OPTIMIZE_PRE_REGISTRATION_CONVERSION_VOLUME"
  • The LocalAppManager.create_app_campaign() method that constructs and executes the Google Ads API calls to create the campaign budget and campaign with app campaign settings.
    def create_app_campaign(
        self,
        customer_id: str,
        config: AppCampaignConfig
    ) -> Dict[str, Any]:
        """Create an App campaign (Universal App Campaign).
    
        Args:
            customer_id: Customer ID (without hyphens)
            config: App campaign configuration
    
        Returns:
            Created campaign details
        """
        campaign_service = self.client.get_service("CampaignService")
        campaign_budget_service = self.client.get_service("CampaignBudgetService")
    
        # Create campaign budget
        budget_operation = self.client.get_type("CampaignBudgetOperation")
        budget = budget_operation.create
        budget.name = f"{config.name} Budget"
        budget.amount_micros = int(config.budget_amount * 1_000_000)
        budget.delivery_method = self.client.enums.BudgetDeliveryMethodEnum.STANDARD
    
        budget_response = campaign_budget_service.mutate_campaign_budgets(
            customer_id=customer_id,
            operations=[budget_operation]
        )
        budget_resource_name = budget_response.results[0].resource_name
    
        # Create app campaign
        campaign_operation = self.client.get_type("CampaignOperation")
        campaign = campaign_operation.create
    
        campaign.name = config.name
        campaign.advertising_channel_type = self.client.enums.AdvertisingChannelTypeEnum.MULTI_CHANNEL
        campaign.advertising_channel_sub_type = self.client.enums.AdvertisingChannelSubTypeEnum.APP_CAMPAIGN
        campaign.status = self.client.enums.CampaignStatusEnum.PAUSED
        campaign.campaign_budget = budget_resource_name
    
        # App campaign settings
        campaign.app_campaign_setting.app_id = config.app_id
        campaign.app_campaign_setting.app_store = self.client.enums.AppCampaignAppStoreEnum[
            config.app_store.value
        ]
        campaign.app_campaign_setting.bidding_strategy_goal_type = (
            self.client.enums.AppCampaignBiddingStrategyGoalTypeEnum[
                config.bidding_strategy_goal_type.value
            ]
        )
    
        # Set bidding strategy based on goal type
        if config.bidding_strategy_goal_type.value.startswith("OPTIMIZE_INSTALLS"):
            if config.target_cpa:
                campaign.target_cpa.target_cpa_micros = int(config.target_cpa * 1_000_000)
            else:
                campaign.maximize_conversions.CopyFrom(self.client.get_type("MaximizeConversions"))
        elif "TARGET_CONVERSION_COST" in config.bidding_strategy_goal_type.value:
            if config.target_cpa:
                campaign.target_cpa.target_cpa_micros = int(config.target_cpa * 1_000_000)
            else:
                campaign.maximize_conversions.CopyFrom(self.client.get_type("MaximizeConversions"))
        elif config.bidding_strategy_goal_type.value == "OPTIMIZE_RETURN_ON_ADVERTISING_SPEND":
            campaign.maximize_conversion_value.CopyFrom(self.client.get_type("MaximizeConversionValue"))
        else:
            campaign.maximize_conversions.CopyFrom(self.client.get_type("MaximizeConversions"))
    
        # Create campaign
        response = campaign_service.mutate_campaigns(
            customer_id=customer_id,
            operations=[campaign_operation]
        )
    
        campaign_id = response.results[0].resource_name.split('/')[-1]
    
        return {
            'campaign_id': campaign_id,
            'campaign_name': config.name,
            'resource_name': response.results[0].resource_name,
            'app_id': config.app_id,
            'app_store': config.app_store.value,
            'budget': config.budget_amount,
            'bidding_goal': config.bidding_strategy_goal_type.value
        }
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: campaigns start in PAUSED status, require a live app store listing, automatically create ads from app store assets, and allow additional asset uploads. It also describes the return dictionary. However, it does not mention rate limits, authentication requirements, or error scenarios.

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?

The description is well-structured with sections: overview, Args, Returns, Example, and Notes. It is front-loaded with the core purpose. While it is somewhat lengthy, every sentence adds value given the tool's complexity. There is minimal redundancy.

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

Completeness4/5

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

The tool has 7 parameters (6 required) and an output schema. The description covers all required parameters, explains the output structure via the Returns section, and includes practical notes about paused status, app store requirements, and asset options. Minor gaps include lack of error handling details or validation rules, but overall it is complete enough for effective use.

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

Parameters5/5

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

The input schema has 0% description coverage, meaning the schema alone provides no parameter meanings. The description fully compensates by detailing each parameter: customer_id format, campaign_name, app_id explanation, app_store allowed values, budget_amount as daily budget, bidding_strategy_goal_type with all five options and explanations, and target_cpa as optional. This adds significant value beyond the bare schema.

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

Purpose5/5

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

The description clearly defines the tool's purpose: create a Universal App Campaign (UAC) to promote mobile app installs and engagement. It specifies the resource (UAC) and the action (create), distinguishing it from sibling tools like google_ads_create_campaign or google_ads_create_performance_max_campaign by focusing specifically on app promotion.

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

Usage Guidelines3/5

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

The description explains what the tool does and includes notes about campaigns starting paused and requiring a live app store listing, but it does not explicitly state when to use this tool versus alternatives like google_ads_create_campaign or google_ads_create_performance_max_campaign. The usage context is implied rather than explicitly guided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/johnoconnor0/google-ads-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server