Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

auto_blacklist_zones

Automatically identify and block underperforming ad zones in a campaign to optimize advertising spend and improve campaign performance.

Instructions

Automatically find and blacklist underperforming zones for a campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesCampaign ID
min_spendNoMinimum spend to consider (default: $10)
max_conversionsNoMaximum conversions (default: 0)
date_fromNoStart date
date_toNoEnd date
dry_runNoIf true, show zones but don't blacklist (default: true)

Implementation Reference

  • The implementation of the 'auto_blacklist_zones' tool handler, which identifies underperforming zones and optionally blacklists them.
    elif name == "auto_blacklist_zones":
        zones = client.get_zone_statistics(
            campaign_id=args["campaign_id"],
            date_from=args.get("date_from"),
            date_to=args.get("date_to"),
        )
    
        min_spend = args.get("min_spend", 10)
        max_conv = args.get("max_conversions", 0)
        dry_run = args.get("dry_run", True)
    
        underperforming = []
        for z in zones:
            spend = z.get("spend", z.get("cost", 0)) or 0
            conv = z.get("conversions", 0) or 0
            if spend >= min_spend and conv <= max_conv:
                underperforming.append(z)
    
        if not underperforming:
            return "No underperforming zones found."
    
        zone_ids = [z.get("zone_id") for z in underperforming if z.get("zone_id")]
        total_spend = sum(z.get("spend", z.get("cost", 0)) or 0 for z in underperforming)
    
        if dry_run:
            return (
                f"# Dry Run - Zones to Blacklist\n\n"
                f"Found {len(zone_ids)} underperforming zones.\n"
                f"Total wasted spend: {format_currency(total_spend)}\n\n"
                f"Zone IDs: `{zone_ids}`\n\n"
                f"Run with `dry_run: false` to actually blacklist these zones."
            )
        else:
            result = client.add_zones_to_blacklist(args["campaign_id"], zone_ids)
  • The schema definition for the 'auto_blacklist_zones' tool, including input arguments like campaign_id, min_spend, and max_conversions.
    Tool(
        name="auto_blacklist_zones",
        description="Automatically find and blacklist underperforming zones for a campaign.",
        inputSchema={
            "type": "object",
            "properties": {
                "campaign_id": {"type": "integer", "description": "Campaign ID"},
                "min_spend": {
                    "type": "number",
                    "description": "Minimum spend to consider (default: $10)",
                },
                "max_conversions": {
                    "type": "integer",
                    "description": "Maximum conversions (default: 0)",
                },
                "date_from": {"type": "string", "description": "Start date"},
                "date_to": {"type": "string", "description": "End date"},
                "dry_run": {
                    "type": "boolean",
                    "description": "If true, show zones but don't blacklist (default: true)",
                },
            },
            "required": ["campaign_id"],
        },
    ),

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/JanNafta/propellerads-mcp'

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