Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

clone_campaign

Create a copy of an existing advertising campaign to replicate successful setups or test variations while maintaining original configurations.

Instructions

Create a copy of an existing campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesID of campaign to clone
new_nameNoName for the cloned campaign

Implementation Reference

  • Implementation of the clone_campaign tool method in the client class.
    def clone_campaign(
        self, campaign_id: int, new_name: str | None = None
    ) -> dict[str, Any]:
        """Clone an existing campaign."""
        data = {}
        if new_name:
            data["name"] = new_name
        result = self._request(
            "POST", f"/adv/campaigns/{campaign_id}/clone", json_data=data or None
        )
        return result.get("data", result) if isinstance(result, dict) else result
  • Registration of the clone_campaign tool in the MCP server.
    Tool(
        name="clone_campaign",
        description="Create a copy of an existing campaign.",
        inputSchema={
            "type": "object",
            "properties": {
                "campaign_id": {
                    "type": "integer",
                    "description": "ID of campaign to clone",
                },
                "new_name": {
                    "type": "string",
                    "description": "Name for the cloned campaign",
                },
            },
            "required": ["campaign_id"],
  • Input schema definition for the clone_campaign tool.
    inputSchema={
        "type": "object",
        "properties": {
            "campaign_id": {
                "type": "integer",
                "description": "ID of campaign to clone",
            },
            "new_name": {
                "type": "string",
                "description": "Name for the cloned campaign",
            },
  • Tool handler logic in server.py calling the client method.
    elif name == "clone_campaign":
        result = client.clone_campaign(
            args["campaign_id"], args.get("new_name")
        )
        return f"Campaign cloned successfully!\n\n```json\n{json.dumps(result, indent=2)}\n```"

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