Skip to main content
Glama
johnoconnor0

Google Ads MCP Server

by johnoconnor0

google_ads_add_callout_extension

Add callout extensions to Google Ads campaigns to highlight key benefits like free shipping or 24/7 support, improving ad visibility and customer attraction.

Instructions

Add callout extensions to a campaign.

Callouts are short, descriptive snippets that highlight key benefits, features, or offerings. They appear below your ad text.

Args: customer_id: Google Ads customer ID (10 digits, no hyphens) campaign_id: Campaign ID to add callouts callouts_json: JSON array of callout texts

Callout Configuration Schema:

[
  {"callout_text": "Free Shipping"},
  {"callout_text": "24/7 Support"},
  {"callout_text": "Price Match Guarantee"}
]

Requirements:

  • Callout text: 1-25 characters

  • Minimum 2 callouts recommended

  • Maximum 10 callouts per campaign

Returns: Callout extension creation result

Example: google_ads_add_callout_extension( customer_id="1234567890", campaign_id="12345678", callouts_json='[{"callout_text": "Free Shipping"}, {"callout_text": "24/7 Support"}]' )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idYes
campaign_idYes
callouts_jsonYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler function 'google_ads_add_callout_extension' that accepts customer_id, campaign_id, and callouts_json, validates input, creates CalloutConfig objects, and delegates to ExtensionsManager.add_callout_extension.
    @mcp.tool()
    def google_ads_add_callout_extension(
        customer_id: str,
        campaign_id: str,
        callouts_json: str
    ) -> str:
        """Add callout extensions to a campaign.
    
        Callouts are short, descriptive snippets that highlight key benefits,
        features, or offerings. They appear below your ad text.
    
        Args:
            customer_id: Google Ads customer ID (10 digits, no hyphens)
            campaign_id: Campaign ID to add callouts
            callouts_json: JSON array of callout texts
    
        Callout Configuration Schema:
        ```json
        [
          {"callout_text": "Free Shipping"},
          {"callout_text": "24/7 Support"},
          {"callout_text": "Price Match Guarantee"}
        ]
        ```
    
        Requirements:
        - Callout text: 1-25 characters
        - Minimum 2 callouts recommended
        - Maximum 10 callouts per campaign
    
        Returns:
            Callout extension creation result
    
        Example:
            google_ads_add_callout_extension(
                customer_id="1234567890",
                campaign_id="12345678",
                callouts_json='[{"callout_text": "Free Shipping"}, {"callout_text": "24/7 Support"}]'
            )
        """
        with performance_logger.track_operation('add_callout_extension', customer_id=customer_id):
            try:
                client = get_auth_manager().get_client()
                extensions_manager = ExtensionsManager(client)
    
                # Parse callouts JSON
                try:
                    callouts_data = json.loads(callouts_json)
                except json.JSONDecodeError as e:
                    return f"❌ Invalid JSON format: {str(e)}"
    
                if not isinstance(callouts_data, list):
                    return "❌ callouts_json must be a JSON array"
    
                # Validate and create callout configs
                callouts = []
                for i, co in enumerate(callouts_data):
                    if 'callout_text' not in co:
                        return f"❌ Callout {i+1} missing callout_text field"
    
                    if len(co['callout_text']) > 25:
                        return f"❌ Callout {i+1} exceeds 25 characters: '{co['callout_text']}'"
    
                    callouts.append(CalloutConfig(callout_text=co['callout_text']))
    
                if len(callouts) > 10:
                    return "❌ Maximum 10 callouts per campaign"
    
                result = extensions_manager.add_callout_extension(
                    customer_id=customer_id,
                    campaign_id=campaign_id,
                    callouts=callouts
                )
    
                audit_logger.log_api_call(
                    customer_id=customer_id,
                    operation='add_callout_extension',
                    campaign_id=campaign_id,
                    status='success'
                )
    
                output = f"# 💬 Callout Extensions Added\n\n"
                output += f"**Campaign ID**: {result['campaign_id']}\n"
                output += f"**Callouts Added**: {result['callouts_added']}\n\n"
    
                output += "## Callouts\n\n"
                for co in result['callouts']:
                    output += f"- {co['callout_text']}\n"
    
                output += "\n## Why Use Callouts?\n\n"
                output += "✅ **Highlight Benefits** - Showcase what makes you unique\n"
                output += "✅ **Build Trust** - Display guarantees and certifications\n"
                output += "✅ **Save Space** - Concise messaging in 25 characters\n"
                output += "✅ **Increase Relevance** - Match user search intent\n\n"
    
                output += "💡 **Best Practices**:\n"
                output += "- Use action-oriented language\n"
                output += "- Focus on unique value propositions\n"
                output += "- Avoid redundancy with ad copy\n"
                output += "- Test different callout combinations\n"
    
                return output
    
            except Exception as e:
                error_msg = ErrorHandler.handle_error(e, context="add_callout_extension")
                return f"❌ Failed to add callout extensions: {error_msg}"
  • The CalloutConfig dataclass defining the schema for a callout extension with a required callout_text field.
    @dataclass
    class CalloutConfig:
        """Configuration for callout extension."""
        callout_text: str
  • The ExtensionsManager.add_callout_extension helper method that creates callout assets via the Google Ads API (AssetService) and links them to campaigns (CampaignAssetService).
    def add_callout_extension(
        self,
        customer_id: str,
        campaign_id: str,
        callouts: List[CalloutConfig]
    ) -> Dict[str, Any]:
        """Add callout extensions to a campaign.
    
        Args:
            customer_id: Customer ID (without hyphens)
            campaign_id: Campaign ID
            callouts: List of callout configurations
    
        Returns:
            Created callout extension details
        """
        asset_service = self.client.get_service("AssetService")
        campaign_asset_service = self.client.get_service("CampaignAssetService")
    
        created_callouts = []
    
        for callout in callouts:
            # Create callout asset
            asset_operation = self.client.get_type("AssetOperation")
            asset = asset_operation.create
    
            asset.type_ = self.client.enums.AssetTypeEnum.CALLOUT
            asset.callout_asset.callout_text = callout.callout_text
    
            # Create asset
            asset_response = asset_service.mutate_assets(
                customer_id=customer_id,
                operations=[asset_operation]
            )
            asset_resource_name = asset_response.results[0].resource_name
    
            # Link asset to campaign
            campaign_asset_operation = self.client.get_type("CampaignAssetOperation")
            campaign_asset = campaign_asset_operation.create
    
            campaign_asset.asset = asset_resource_name
            campaign_asset.campaign = self.client.get_service("CampaignService").campaign_path(
                customer_id, campaign_id
            )
            campaign_asset.field_type = self.client.enums.AssetFieldTypeEnum.CALLOUT
    
            campaign_asset_service.mutate_campaign_assets(
                customer_id=customer_id,
                operations=[campaign_asset_operation]
            )
    
            created_callouts.append({
                'callout_text': callout.callout_text,
                'asset_resource_name': asset_resource_name
            })
    
        return {
            'campaign_id': campaign_id,
            'callouts_added': len(created_callouts),
            'callouts': created_callouts
        }
  • The register_extension_tools function that uses the @mcp.tool() decorator to register google_ads_add_callout_extension as an MCP tool.
    def register_extension_tools(mcp):
        """Register all ad extension MCP tools."""
Behavior3/5

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

No annotations are provided, so the description carries the burden. It states the tool adds callouts (a mutation) and mentions requirements, but does not disclose error handling, side effects, or prerequisites like permissions. This is adequate but not comprehensive.

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

Conciseness5/5

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

The description is well-structured with clear sections, front-loaded purpose, and an example. Every sentence adds value, and there is no redundancy. It is concise yet informative.

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

Completeness4/5

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

For a simple mutation tool with 3 parameters and an output schema (present but not shown), the description covers input requirements adequately. It does not detail the output structure, but the existence of an output schema mitigates this. Slightly more detail on return format could raise to 5.

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?

Schema coverage is 0%, but the description adds significant value: specifies format for customer_id (10 digits, no hyphens), provides an example JSON array for callouts_json, and gives a full schema. This fully compensates for the lack of schema descriptions.

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 states 'Add callout extensions to a campaign' and explains what callouts are. This distinguishes it from sibling tools like add_sitelink_extension or add_call_extension by specifying the type of extension.

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

Usage Guidelines4/5

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

The description provides requirements (character limit, min/max callouts) and an example, helping the agent understand proper usage. However, it does not explicitly contrast with alternatives or mention when not to use (e.g., when campaign already has max callouts).

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