Skip to main content
Glama
ai-zerolab

MCP Email Server

by ai-zerolab

send_email

Send emails from specified accounts with support for attachments, CC/BCC, and threaded replies to maintain conversation context in email clients.

Instructions

Send an email using the specified account. Supports replying to emails with proper threading when in_reply_to is provided.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_nameYesThe name of the email account to send from.
recipientsYesA list of recipient email addresses.
subjectYesThe subject of the email.
bodyYesThe body of the email.
ccNoA list of CC email addresses.
bccNoA list of BCC email addresses.
htmlNoWhether to send the email as HTML (True) or plain text (False).
attachmentsNoA list of absolute file paths to attach to the email. Supports common file types (documents, images, archives, etc.).
in_reply_toNoMessage-ID of the email being replied to. Enables proper threading in email clients.
referencesNoSpace-separated Message-IDs for the thread chain. Usually includes in_reply_to plus ancestors.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool definition for 'send_email', including registration via @mcp.tool decorator, input schema via Pydantic Field annotations, and handler logic that dispatches to provider-specific email handler.
    @mcp.tool(
        description="Send an email using the specified account. Supports replying to emails with proper threading when in_reply_to is provided.",
    )
    async def send_email(
        account_name: Annotated[str, Field(description="The name of the email account to send from.")],
        recipients: Annotated[list[str], Field(description="A list of recipient email addresses.")],
        subject: Annotated[str, Field(description="The subject of the email.")],
        body: Annotated[str, Field(description="The body of the email.")],
        cc: Annotated[
            list[str] | None,
            Field(default=None, description="A list of CC email addresses."),
        ] = None,
        bcc: Annotated[
            list[str] | None,
            Field(default=None, description="A list of BCC email addresses."),
        ] = None,
        html: Annotated[
            bool,
            Field(default=False, description="Whether to send the email as HTML (True) or plain text (False)."),
        ] = False,
        attachments: Annotated[
            list[str] | None,
            Field(
                default=None,
                description="A list of absolute file paths to attach to the email. Supports common file types (documents, images, archives, etc.).",
            ),
        ] = None,
        in_reply_to: Annotated[
            str | None,
            Field(
                default=None,
                description="Message-ID of the email being replied to. Enables proper threading in email clients.",
            ),
        ] = None,
        references: Annotated[
            str | None,
            Field(
                default=None,
                description="Space-separated Message-IDs for the thread chain. Usually includes in_reply_to plus ancestors.",
            ),
        ] = None,
    ) -> str:
        handler = dispatch_handler(account_name)
        await handler.send_email(
            recipients,
            subject,
            body,
            cc,
            bcc,
            html,
            attachments,
            in_reply_to,
            references,
        )
        recipient_str = ", ".join(recipients)
        attachment_info = f" with {len(attachments)} attachment(s)" if attachments else ""
        return f"Email sent successfully to {recipient_str}{attachment_info}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions threading support for replies, which adds some context beyond basic sending. However, it fails to disclose critical behavioral traits: it doesn't mention whether this is a destructive/mutative operation (implied by 'send' but not explicit), authentication needs (though hinted by 'account_name'), rate limits, error handling, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences. The first sentence states the core purpose, and the second adds useful context about threading. There's no wasted text, and it's front-loaded with the main function. However, it could be slightly more structured (e.g., bullet points for key features) but remains efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (10 parameters, mutation operation) and no annotations, the description is incomplete. It covers basic purpose and threading, but lacks details on behavioral aspects like permissions, side effects, or error cases. The output schema exists (not provided in context but indicated), so return values needn't be explained, but other contextual gaps remain. It's minimally adequate but with clear omissions for a tool of this nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 10 parameters thoroughly. The description adds minimal value beyond the schema: it mentions threading support for 'in_reply_to', which provides some context, but doesn't explain parameter interactions or usage semantics beyond what's in the schema descriptions. Baseline is 3 when schema does the heavy lifting, and the description doesn't significantly compensate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Send an email using the specified account.' It specifies the verb ('send') and resource ('email'), and distinguishes it from siblings like 'add_email_account' or 'delete_emails'. However, it doesn't explicitly differentiate from all siblings (e.g., 'get_emails_content' is clearly different, but the distinction could be more explicit for a comprehensive set).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidance: it mentions 'Supports replying to emails with proper threading when in_reply_to is provided,' which suggests when to use the 'in_reply_to' parameter. However, it lacks explicit guidance on when to use this tool versus alternatives (e.g., no mention of when to use 'send_email' over other email-related tools or general context for email sending). No exclusions or clear alternatives are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ai-zerolab/mcp-email-server'

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