delete_campaign
Permanently remove an email outreach campaign and all associated data from Instantly.ai. Requires user confirmation as this action cannot be undone.
Instructions
🚨 PERMANENTLY delete a campaign. CANNOT UNDO!
⚠️ REQUIRES USER CONFIRMATION before executing!
This action:
Permanently removes the campaign
Deletes all campaign data, sequences, and settings
Removes leads from this campaign (leads themselves are NOT deleted)
Cannot be reversed
Before calling this tool, you MUST:
Confirm with the user that they want to delete this campaign
Verify the campaign_id is correct
Warn them this action cannot be undone
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- The async handler function that executes the delete_campaign tool by calling the API DELETE /campaigns/{campaign_id} and returns a formatted success JSON.async def delete_campaign(params: DeleteCampaignInput) -> str: """ 🚨 PERMANENTLY delete a campaign. CANNOT UNDO! ⚠️ REQUIRES USER CONFIRMATION before executing! This action: - Permanently removes the campaign - Deletes all campaign data, sequences, and settings - Removes leads from this campaign (leads themselves are NOT deleted) - Cannot be reversed Before calling this tool, you MUST: 1. Confirm with the user that they want to delete this campaign 2. Verify the campaign_id is correct 3. Warn them this action cannot be undone """ client = get_client() result = await client.delete(f"/campaigns/{params.campaign_id}") return json.dumps({ "success": True, "deleted_campaign_id": params.campaign_id, "message": "Campaign permanently deleted", **result }, indent=2)
- Pydantic input schema model for the delete_campaign tool, defining the required campaign_id field.class DeleteCampaignInput(BaseModel): """ Input for deleting a campaign. ⚠️ PERMANENT - CANNOT UNDO! Requires user confirmation before executing. """ model_config = ConfigDict(str_strip_whitespace=True, extra="ignore") campaign_id: str = Field(..., description="Campaign UUID to DELETE PERMANENTLY")
- src/instantly_mcp/tools/campaigns.py:517-526 (registration)The CAMPAIGN_TOOLS list exports the delete_campaign function for registration in the MCP server.CAMPAIGN_TOOLS = [ create_campaign, list_campaigns, get_campaign, update_campaign, activate_campaign, pause_campaign, delete_campaign, search_campaigns_by_contact, ]
- src/instantly_mcp/server.py:83-83 (registration)MCP tool annotations in TOOL_ANNOTATIONS dict marking delete_campaign as destructive and requiring confirmation."delete_campaign": {"destructiveHint": True, "confirmationRequiredHint": True},