Skip to main content
Glama
bcharleson

Instantly MCP Server

manage_account_state

Control email account operations: pause sending, resume activity, manage warmup processes, or test connection vitals to diagnose issues.

Instructions

Manage account state: pause, resume, enable/disable warmup, or test vitals.

Actions:

  • pause: Stop all sending from this account

  • resume: Re-enable sending

  • enable_warmup: Start warmup process

  • disable_warmup: Stop warmup process

  • test_vitals: Test IMAP/SMTP connectivity

Use test_vitals to diagnose connection issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The core handler function implementing the manage_account_state tool. It handles different actions (pause, resume, enable/disable warmup, test vitals) by making appropriate API calls to the Instantly.ai V2 API.
    async def manage_account_state(params: ManageAccountStateInput) -> str:
        """
        Manage account state: pause, resume, enable/disable warmup, or test vitals.
        
        Actions:
        - pause: Stop all sending from this account
        - resume: Re-enable sending
        - enable_warmup: Start warmup process
        - disable_warmup: Stop warmup process
        - test_vitals: Test IMAP/SMTP connectivity
        
        Use test_vitals to diagnose connection issues.
        """
        client = get_client()
        email_encoded = quote(params.email, safe="")
        
        action_endpoints = {
            "pause": f"/accounts/{email_encoded}/pause",
            "resume": f"/accounts/{email_encoded}/resume",
            "enable_warmup": "/accounts/warmup/enable",
            "disable_warmup": "/accounts/warmup/disable",
            "test_vitals": "/accounts/test/vitals",
        }
        
        endpoint = action_endpoints[params.action]
        
        # Different actions have different body requirements
        if params.action in ["pause", "resume"]:
            result = await client.post(endpoint)
        elif params.action in ["enable_warmup", "disable_warmup"]:
            # V2 API expects an array of emails for warmup enable/disable
            result = await client.post(endpoint, json={"emails": [params.email]})
        else:  # test_vitals
            # V2 API expects an array of emails for test vitals
            result = await client.post(endpoint, json={"emails": [params.email]})
        
        return json.dumps(result, indent=2)
  • Pydantic BaseModel defining the input schema for the manage_account_state tool, including required 'email' and 'action' fields.
    class ManageAccountStateInput(BaseModel):
        """Input for managing account state (pause, resume, warmup control, vitals test)."""
        
        model_config = ConfigDict(str_strip_whitespace=True, extra="ignore")
        
        email: str = Field(..., description="Account email")
        action: Literal["pause", "resume", "enable_warmup", "disable_warmup", "test_vitals"] = Field(
            ..., description="Action to perform"
        )
  • MCP tool annotation in the TOOL_ANNOTATIONS dictionary specifying that manage_account_state is non-destructive, used during dynamic registration of all tools.
    "manage_account_state": {"destructiveHint": False},
  • The ACCOUNT_TOOLS list exports the manage_account_state function for inclusion in get_all_tools(), enabling its registration in the MCP server.
    ACCOUNT_TOOLS = [
        list_accounts,
        get_account,
        create_account,
        update_account,
        manage_account_state,
        delete_account,
    ]

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