Skip to main content
Glama
johnoconnor0

Google Ads MCP Server

by johnoconnor0

google_ads_update_conversion_action

Update default conversion value and status for a conversion action in Google Ads to improve tracking accuracy.

Instructions

Update conversion action settings.

Args: customer_id: Customer ID (without hyphens) conversion_action_id: Conversion action ID to update conversion_value: New default value status: New status (ENABLED, PAUSED, REMOVED)

Returns: Success message

Example: google_ads_update_conversion_action( customer_id="1234567890", conversion_action_id="12345", conversion_value=75.00, status="ENABLED" )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idYes
conversion_action_idYes
conversion_valueNo
statusNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool decorator registration of google_ads_update_conversion_action, which is registered as an @mcp.tool() inside the register_conversion_tools function.
    @mcp.tool()
    def google_ads_update_conversion_action(
        customer_id: str,
        conversion_action_id: str,
        conversion_value: Optional[float] = None,
        status: Optional[str] = None
    ) -> str:
        """
        Update conversion action settings.
    
        Args:
            customer_id: Customer ID (without hyphens)
            conversion_action_id: Conversion action ID to update
            conversion_value: New default value
            status: New status (ENABLED, PAUSED, REMOVED)
    
        Returns:
            Success message
    
        Example:
            google_ads_update_conversion_action(
                customer_id="1234567890",
                conversion_action_id="12345",
                conversion_value=75.00,
                status="ENABLED"
            )
        """
        with performance_logger.track_operation('update_conversion_action', customer_id=customer_id):
            try:
                client = get_auth_manager().get_client()
                conversion_action_service = client.get_service("ConversionActionService")
                conversion_action_operation = client.get_type("ConversionActionOperation")
    
                conversion_action = conversion_action_operation.update
                conversion_action.resource_name = conversion_action_service.conversion_action_path(
                    customer_id, conversion_action_id
                )
    
                field_paths = []
    
                if conversion_value is not None:
                    conversion_action.value_settings.default_value = conversion_value
                    field_paths.append("value_settings.default_value")
    
                if status:
                    conversion_action.status = client.enums.ConversionActionStatusEnum[status.upper()]
                    field_paths.append("status")
    
                if not field_paths:
                    return "❌ No updates specified. Provide conversion_value or status."
    
                client.copy_from(
                    conversion_action_operation.update_mask,
                    field_mask_pb2.FieldMask(paths=field_paths)
                )
    
                conversion_action_service.mutate_conversion_actions(
                    customer_id=customer_id,
                    operations=[conversion_action_operation]
                )
    
                # Audit log
                audit_logger.log_api_call(
                    customer_id=customer_id,
                    operation="update_conversion_action",
                    resource_type="conversion_action",
                    resource_id=conversion_action_id,
                    action="update",
                    result="success",
                    details={'fields': field_paths}
                )
    
                return f"✅ Conversion action updated successfully!\n\nUpdated fields: {', '.join(field_paths)}"
    
            except Exception as e:
                error_msg = ErrorHandler.handle_error(e, context="update_conversion_action")
                return f"❌ Failed to update conversion action: {error_msg}"
  • The handler function that executes the update conversion action logic. It uses the Google Ads API (ConversionActionService) to update a conversion action's default value and/or status via a field mask-based mutation.
    def google_ads_update_conversion_action(
        customer_id: str,
        conversion_action_id: str,
        conversion_value: Optional[float] = None,
        status: Optional[str] = None
    ) -> str:
        """
        Update conversion action settings.
    
        Args:
            customer_id: Customer ID (without hyphens)
            conversion_action_id: Conversion action ID to update
            conversion_value: New default value
            status: New status (ENABLED, PAUSED, REMOVED)
    
        Returns:
            Success message
    
        Example:
            google_ads_update_conversion_action(
                customer_id="1234567890",
                conversion_action_id="12345",
                conversion_value=75.00,
                status="ENABLED"
            )
        """
        with performance_logger.track_operation('update_conversion_action', customer_id=customer_id):
            try:
                client = get_auth_manager().get_client()
                conversion_action_service = client.get_service("ConversionActionService")
                conversion_action_operation = client.get_type("ConversionActionOperation")
    
                conversion_action = conversion_action_operation.update
                conversion_action.resource_name = conversion_action_service.conversion_action_path(
                    customer_id, conversion_action_id
                )
    
                field_paths = []
    
                if conversion_value is not None:
                    conversion_action.value_settings.default_value = conversion_value
                    field_paths.append("value_settings.default_value")
    
                if status:
                    conversion_action.status = client.enums.ConversionActionStatusEnum[status.upper()]
                    field_paths.append("status")
    
                if not field_paths:
                    return "❌ No updates specified. Provide conversion_value or status."
    
                client.copy_from(
                    conversion_action_operation.update_mask,
                    field_mask_pb2.FieldMask(paths=field_paths)
                )
    
                conversion_action_service.mutate_conversion_actions(
                    customer_id=customer_id,
                    operations=[conversion_action_operation]
                )
    
                # Audit log
                audit_logger.log_api_call(
                    customer_id=customer_id,
                    operation="update_conversion_action",
                    resource_type="conversion_action",
                    resource_id=conversion_action_id,
                    action="update",
                    result="success",
                    details={'fields': field_paths}
                )
    
                return f"✅ Conversion action updated successfully!\n\nUpdated fields: {', '.join(field_paths)}"
    
            except Exception as e:
                error_msg = ErrorHandler.handle_error(e, context="update_conversion_action")
                return f"❌ Failed to update conversion action: {error_msg}"
  • The input schema/type signature for the tool: customer_id (str), conversion_action_id (str), optional conversion_value (float), optional status (str - ENABLED/PAUSED/REMOVED).
    def google_ads_update_conversion_action(
        customer_id: str,
        conversion_action_id: str,
        conversion_value: Optional[float] = None,
        status: Optional[str] = None
    ) -> str:
  • The main MCP server registration - register_conversion_tools is called during modular tool registration, which in turn registers google_ads_update_conversion_action via the @mcp.tool() decorator.
    _TOOL_MODULES = [
        ("campaigns",     "tools.campaigns.mcp_tools_campaigns",         "register_campaign_tools"),
        ("ad_groups",     "tools.ad_groups.mcp_tools_ad_groups",         "register_ad_group_tools"),
        ("keywords",      "tools.keywords.mcp_tools_keywords",           "register_keyword_tools"),
        ("ads",           "tools.ads.mcp_tools_ads",                     "register_ad_tools"),
        ("bidding",       "tools.bidding.mcp_tools_bidding",             "register_bidding_tools"),
        ("automation",    "tools.automation.mcp_tools_automation",       "register_automation_tools"),
        ("audiences",     "tools.audiences.mcp_tools_audiences",         "register_audience_tools"),
        ("conversions",   "tools.conversions.mcp_tools_conversions",     "register_conversion_tools"),
        ("reporting",     "tools.reporting.mcp_tools_reporting",         "register_reporting_tools"),
        ("insights",      "tools.insights.mcp_tools_insights",           "register_insights_tools"),
        ("batch",         "tools.batch.mcp_tools_batch",                 "register_batch_tools"),
        ("shopping_pmax", "tools.shopping_pmax.mcp_tools_shopping_pmax", "register_shopping_pmax_tools"),
        ("extensions",    "tools.extensions.mcp_tools_extensions",       "register_extension_tools"),
        ("local_app",     "tools.local_app.mcp_tools_local_app",         "register_local_app_tools"),
    ]
    
    
    def _register_all_modular_tools():
        """Import and register every modular tool module."""
        import importlib
    
        registered = 0
        for label, module_path, func_name in _TOOL_MODULES:
            try:
                mod = importlib.import_module(module_path)
                register_fn = getattr(mod, func_name)
                register_fn(mcp)
                logger.info(f"  ✓ {label}")
                registered += 1
            except Exception as exc:
                logger.error(f"  ✗ {label}: {exc}")
    
        logger.info(f"Registered {registered}/{len(_TOOL_MODULES)} modular tool modules")
Behavior2/5

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

No annotations were provided, so the description bears full responsibility for behavioral disclosure. It only states 'Update conversion action settings' without describing side effects, idempotency, permission requirements, or consequences of optional parameters like null values.

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 highly concise: a single-purpose sentence, clearly separated args with brief explanations, a returns note, and an example. No unnecessary words or redundancy.

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

Completeness3/5

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

Given the simplicity of the tool (4 params, simple mutation) and presence of an output schema, the description covers the basics but omits potential pitfalls (e.g., required permissions, effect of setting conversion_value to null). It is adequate but not comprehensive.

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?

With 0% schema description coverage, the description compensates by providing additional context for customer_id (no hyphens) and status enum values. However, it does not explain the semantics of conversion_value ('New default value' is vague) or behavior when set to null. Partial but not exhaustive.

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

Purpose4/5

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

The description clearly states 'Update conversion action settings', directly identifying the verb and resource. While it doesn't explicitly differentiate from sibling tools (e.g., google_ads_create_conversion_action), the name and description make the specific use unambiguous.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like create or other update tools. There is no context about prerequisites, when to avoid, or how it fits into a workflow.

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