Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

add_to_whitelist

Add specific zones to a campaign's whitelist to control where ads appear. This tool enables precise targeting by allowing only approved zones to display campaign advertisements.

Instructions

Add zones to campaign whitelist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesCampaign ID
zone_idsYesZone IDs to whitelist

Implementation Reference

  • The implementation of adding zones to a campaign whitelist by calling the API endpoint.
    def add_zones_to_whitelist(
        self, campaign_id: int, zone_ids: list[int]
    ) -> dict[str, Any]:
        """Add zones to campaign whitelist."""
        return self._request(
            "POST",
            f"/adv/campaigns/{campaign_id}/targeting/zones/whitelist",
            json_data={"zone_ids": zone_ids},
        )
  • The server-side handler logic that calls client.add_zones_to_whitelist.
    elif name == "add_to_whitelist":
        result = client.add_zones_to_whitelist(args["campaign_id"], args["zone_ids"])
        return f"Added {len(args['zone_ids'])} zones to whitelist for campaign {args['campaign_id']}.\n\n{json.dumps(result, indent=2)}"
  • Tool registration schema definition for add_to_whitelist.
    Tool(
        name="add_to_whitelist",
        description="Add zones to campaign whitelist.",
        inputSchema={
            "type": "object",
            "properties": {
                "campaign_id": {"type": "integer", "description": "Campaign ID"},
                "zone_ids": {
                    "type": "array",
                    "items": {"type": "integer"},
                    "description": "Zone IDs to whitelist",
                },
            },
            "required": ["campaign_id", "zone_ids"],
        },
    ),

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