Skip to main content
Glama
bcharleson

Instantly MCP Server

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:

  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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

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")
  • 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,
    ]
  • MCP tool annotations in TOOL_ANNOTATIONS dict marking delete_campaign as destructive and requiring confirmation.
    "delete_campaign": {"destructiveHint": True, "confirmationRequiredHint": True},

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/bcharleson/instantly-mcp-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server