Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

forward-email

Forward emails to other recipients by specifying the email ID and destination address, with optional additional messages included.

Instructions

Forward an email to other recipients

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailIdYesThe ID of the email to forward
toYesThe email address to forward to
messageNoAdditional message to include with the forward

Implementation Reference

  • The main handler function that implements the forward-email tool logic by executing the GMAIL_FORWARD_EMAIL action via the Composio toolset and handling the response.
    }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_FORWARD_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Email forwarded successfully!\n\nForwarded to: ${args.to}` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to forward email: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error forwarding email:', error); return { content: [{ type: "text", text: `Error forwarding email: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • Zod schema defining the input parameters for the forward-email tool: emailId (required), to (required), message (optional).
    emailId: z.string().describe("The ID of the email to forward"), to: z.string().describe("The email address to forward to"), message: z.string().optional().describe("Additional message to include with the forward"),
  • src/tools.ts:242-280 (registration)
    Full registration of the forward-email tool using server.tool, including name, description, schema, and inline handler.
    server.tool("forward-email", "Forward an email to other recipients", { emailId: z.string().describe("The ID of the email to forward"), to: z.string().describe("The email address to forward to"), message: z.string().optional().describe("Additional message to include with the forward"), }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_FORWARD_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Email forwarded successfully!\n\nForwarded to: ${args.to}` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to forward email: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error forwarding email:', error); return { content: [{ type: "text", text: `Error forwarding email: ${error instanceof Error ? error.message : String(error)}` }], }; } });

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/0x8687/mcp-gmail-v1'

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