Skip to main content
Glama
seandkendall

productivity-mcp

by seandkendall

forward_email

Forward an email to new recipients, optionally prepending a note. Specify the message ID and recipient list.

Instructions

Forward an email to new recipients, optionally prepending a note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes
toYes
bodyNo
accountNo
folderNoINBOX
htmlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `forward_email` MCP tool handler. It is decorated with @mcp.tool() and @_logged, accepts a message_id, recipients (to), optional body, account, folder, and html flag, then delegates to the email provider's forward_message method.
    @mcp.tool()
    @_logged
    def forward_email(
        message_id: str,
        to: list[str],
        body: str = "",
        account: str | None = None,
        folder: str = "INBOX",
        html: bool = False,
    ) -> dict[str, str]:
        """Forward an email to new recipients, optionally prepending a note."""
        mid = _email(account).forward_message(message_id, to, body=body, folder=folder, html=html)
        return {"message_id": mid}
  • Abstract interface for forward_message in the EmailProvider base class, defining the contract: message_id, to list, optional body/folder/html, returning the new message ID string.
    @abstractmethod
    def forward_message(
        self,
        message_id: str,
        to: list[str],
        body: str = "",
        folder: str = "INBOX",
        html: bool = False,
    ) -> str: ...
  • Gmail implementation of forward_message. Retrieves the original message, prepends 'Fwd:' to the subject if not already present, builds a combined body with the original message quoted under a 'Forwarded message' header, and sends via the Gmail API's send_message.
    def forward_message(
        self,
        message_id: str,
        to: list[str],
        body: str = "",
        folder: str = "INBOX",
        html: bool = False,
    ) -> str:
        original = self.get_message(message_id, folder=folder)
        subject = original.subject if original.subject.lower().startswith("fwd:") else f"Fwd: {original.subject}"
        combined = (
            f"{body}\n\n---------- Forwarded message ----------\n"
            f"From: {original.sender}\n"
            f"Date: {original.date}\n"
            f"Subject: {original.subject}\n"
            f"To: {', '.join(original.recipients)}\n\n"
            f"{original.body or ''}"
        )
        return self.send_message(to=to, subject=subject, body=combined, html=html)
  • IMAP implementation of forward_message. Same logic as Gmail variant: fetches original, prepends 'Fwd:' to subject if needed, quotes original message in body, and sends via the IMAP provider's send_message.
    def forward_message(
        self,
        message_id: str,
        to: list[str],
        body: str = "",
        folder: str = "INBOX",
        html: bool = False,
    ) -> str:
        original = self.get_message(message_id, folder=folder)
        subject = original.subject if original.subject.lower().startswith("fwd:") else f"Fwd: {original.subject}"
        combined = (
            f"{body}\n\n---------- Forwarded message ----------\n"
            f"From: {original.sender}\n"
            f"Date: {original.date}\n"
            f"Subject: {original.subject}\n"
            f"To: {', '.join(original.recipients)}\n\n"
            f"{original.body or ''}"
        )
        return self.send_message(to=to, subject=subject, body=combined, html=html)
  • Rate limit registration for forward_email: 20 calls per 60-second window, enforced by the @_logged decorator via the RateLimiter.
    _DEFAULT_LIMITS: dict[str, tuple[int, float]] = {
        # tool_name: (max_calls, window_seconds)
        "send_email": (20, 60.0),
        "send_draft": (20, 60.0),
        "reply_email": (20, 60.0),
        "forward_email": (20, 60.0),
        "delete_email": (50, 60.0),
        "delete_event": (20, 60.0),
        "bulk_set_read": (10, 60.0),
        "bulk_delete_emails": (10, 60.0),
        "bulk_move_emails": (10, 60.0),
        "create_event": (30, 60.0),
        "update_event": (30, 60.0),
    }
Behavior2/5

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

With no annotations, the description should disclose key behaviors like whether the original email content is included, attachment handling, or response expectations. It only mentions forwarding and an optional note, leaving much unspecified.

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

Conciseness3/5

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

The description is concise and front-loaded, but its brevity sacrifices necessary detail. It is appropriately short for a simple tool but incomplete for practical use.

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

Completeness2/5

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

Given the 6 parameters and lack of annotations, the description is too sparse. It does not explain the return value (output schema exists) or how the forward operation handles attachments, threading, or original content.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It only partially explains the 'body' parameter as an optional note, but ignores other parameters like account, folder, html. Insufficient guidance.

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 action (forward an email), the target (new recipients), and an optional feature (prepending a note). It distinguishes from other email tools like reply_email or send_email.

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

Usage Guidelines2/5

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

No guidance is provided on when to use forward_email versus siblings like reply_email or send_email. The description lacks any contextual cues or alternatives.

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/seandkendall/productivity-mcp'

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