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
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ID of campaign to clone | |
| new_name | No | Name for the cloned campaign |
Implementation Reference
- src/propellerads_mcp/client.py:136-146 (handler)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 - src/propellerads_mcp/server.py:195-210 (registration)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", }, - src/propellerads_mcp/server.py:541-545 (handler)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```"