Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

create_campaign

Create advertising campaigns on PropellerAds by specifying ad format, target countries, budget, bid model, and landing page URL.

Instructions

Create a new advertising campaign with specified settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCampaign name
ad_formatYesAd format: push, onclick, interstitial, in-page-push
countriesYesTarget country codes (e.g., ['US', 'GB', 'DE'])
daily_budgetYesDaily budget in USD
total_budgetNoTotal campaign budget in USD
bidYesBid amount (CPC/CPM)
bid_modelNoBid model: cpc, cpm, smart_cpc, smart_cpm
target_urlYesLanding page URL

Implementation Reference

  • The actual API client method that makes the POST request to create a campaign.
    def create_campaign(self, campaign_data: dict[str, Any]) -> dict[str, Any]:
        """Create a new campaign."""
        result = self._request("POST", "/adv/campaigns", json_data=campaign_data)
        return result.get("data", result) if isinstance(result, dict) else result
  • The tool handler function that parses arguments and calls the PropellerAdsClient to create a campaign.
    elif name == "create_campaign":
        campaign_data = {
            "name": args["name"],
            "ad_format": args["ad_format"],
            "countries": args["countries"],
            "daily_budget": args["daily_budget"],
            "bid": args["bid"],
            "target_url": args["target_url"],
        }
        if args.get("total_budget"):
            campaign_data["total_budget"] = args["total_budget"]
        if args.get("bid_model"):
            campaign_data["bid_model"] = args["bid_model"]
    
        result = client.create_campaign(campaign_data)
        return f"Campaign created successfully!\n\n```json\n{json.dumps(result, indent=2)}\n```"
  • The tool definition and schema registration for create_campaign.
    Tool(
        name="create_campaign",
        description="Create a new advertising campaign with specified settings.",
        inputSchema={
            "type": "object",
            "properties": {
                "name": {"type": "string", "description": "Campaign name"},
                "ad_format": {
                    "type": "string",
                    "description": "Ad format: push, onclick, interstitial, in-page-push",
                },
                "countries": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "Target country codes (e.g., ['US', 'GB', 'DE'])",
                },
                "daily_budget": {
                    "type": "number",
                    "description": "Daily budget in USD",
                },
                "total_budget": {
                    "type": "number",
                    "description": "Total campaign budget in USD",
                },
                "bid": {"type": "number", "description": "Bid amount (CPC/CPM)"},
                "bid_model": {
                    "type": "string",
                    "description": "Bid model: cpc, cpm, smart_cpc, smart_cpm",
                },
                "target_url": {"type": "string", "description": "Landing page URL"},
            },
            "required": ["name", "ad_format", "countries", "daily_budget", "bid", "target_url"],
        },
    ),

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