Skip to main content
Glama
bcharleson

Instantly MCP Server

create_account

Create email accounts with IMAP/SMTP credentials for Google Workspace, Microsoft 365, AWS SES, or generic IMAP providers to enable email sending functionality.

Instructions

Create email account with IMAP/SMTP credentials.

Provider codes:

  • 1: IMAP (generic)

  • 2: Google Workspace

  • 3: Microsoft 365

  • 4: AWS SES

Requires valid IMAP and SMTP credentials for email sending.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The main handler function for the create_account tool. It constructs the request body from input parameters and sends a POST request to the /accounts endpoint using the API client.
    async def create_account(params: CreateAccountInput) -> str:
        """
        Create email account with IMAP/SMTP credentials.
        
        Provider codes:
        - 1: IMAP (generic)
        - 2: Google Workspace
        - 3: Microsoft 365
        - 4: AWS SES
        
        Requires valid IMAP and SMTP credentials for email sending.
        """
        client = get_client()
        
        body = {
            "email": params.email,
            "first_name": params.first_name,
            "last_name": params.last_name,
            "provider_code": params.provider_code,
            "imap_username": params.imap_username,
            "imap_password": params.imap_password,
            "imap_host": params.imap_host,
            "imap_port": params.imap_port,
            "smtp_username": params.smtp_username,
            "smtp_password": params.smtp_password,
            "smtp_host": params.smtp_host,
            "smtp_port": params.smtp_port,
        }
        
        result = await client.post("/accounts", json=body)
        return json.dumps(result, indent=2)
  • Pydantic model defining the input schema for the create_account tool, including all required fields like email, names, provider_code, IMAP/SMTP credentials.
    class CreateAccountInput(BaseModel):
        """Input for creating an email account with IMAP/SMTP credentials."""
        
        model_config = ConfigDict(str_strip_whitespace=True, extra="ignore")
        
        email: str = Field(..., description="Email address")
        first_name: str = Field(..., description="First name")
        last_name: str = Field(..., description="Last name")
        provider_code: Literal[1, 2, 3, 4] = Field(
            ..., description="1=IMAP, 2=Google, 3=Microsoft, 4=AWS"
        )
        imap_username: str = Field(..., description="IMAP username")
        imap_password: str = Field(..., description="IMAP password")
        imap_host: str = Field(..., description="IMAP host (e.g., imap.gmail.com)")
        imap_port: int = Field(..., description="IMAP port (e.g., 993)")
        smtp_username: str = Field(..., description="SMTP username")
        smtp_password: str = Field(..., description="SMTP password")
        smtp_host: str = Field(..., description="SMTP host (e.g., smtp.gmail.com)")
        smtp_port: int = Field(..., description="SMTP port (e.g., 587)")
  • The create_account function is included in the ACCOUNT_TOOLS list, which collects account tools for registration with the MCP server.
    ACCOUNT_TOOLS = [
        list_accounts,
        get_account,
        create_account,
        update_account,
        manage_account_state,
        delete_account,
    ]
  • TOOL_ANNOTATIONS entry for create_account specifying destructiveHint: False, applied during tool registration in register_tools() function.
    # Account tools
    "list_accounts": {"readOnlyHint": True},
    "get_account": {"readOnlyHint": True},
    "create_account": {"destructiveHint": False},
    "update_account": {"destructiveHint": False},
    "manage_account_state": {"destructiveHint": False},
    "delete_account": {"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