Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

stop_campaigns

Pause or stop advertising campaigns on PropellerAds by specifying campaign IDs to halt spending and optimize budget allocation.

Instructions

Pause/stop one or more campaigns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idsYesList of campaign IDs to stop

Implementation Reference

  • The method `stop_campaigns` in the `PropellerAdsClient` class sends a POST request to the `/adv/campaigns/stop` endpoint to pause campaigns.
    def stop_campaigns(self, campaign_ids: list[int]) -> dict[str, Any]:
        """Stop (pause) campaigns."""
        result = self._request(
            "POST", "/adv/campaigns/stop", json_data={"ids": campaign_ids}
        )
        return result
  • The tool `stop_campaigns` is registered in the MCP server with an input schema requiring a list of campaign IDs.
        name="stop_campaigns",
        description="Pause/stop one or more campaigns.",
        inputSchema={
            "type": "object",
            "properties": {
                "campaign_ids": {
                    "type": "array",
                    "items": {"type": "integer"},
                    "description": "List of campaign IDs to stop",
                },
            },
            "required": ["campaign_ids"],
        },
    ),
  • The `handle_tool` function in `server.py` routes the `stop_campaigns` tool call to the client's `stop_campaigns` method.
    elif name == "stop_campaigns":
        result = client.stop_campaigns(args["campaign_ids"])
        return f"Stopped campaigns: {args['campaign_ids']}\n\n{json.dumps(result, indent=2)}"

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