forward-email
Send an email to specified recipients by forwarding it with an optional additional message. Use this tool to share emails efficiently within the Meme MCP Server environment.
Instructions
Forward an email to other recipients
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | The ID of the email to forward | |
| message | No | Additional message to include with the forward | |
| to | Yes | The email address to forward to |
Implementation Reference
- src/tools.ts:246-280 (handler)The handler function executes the forward-email tool by calling the Composio toolset's GMAIL_FORWARD_EMAIL action with the provided arguments.}, 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)}` }], }; } });
- src/tools.ts:243-245 (schema)Zod input schema defining parameters: emailId (required string), to (required string), message (optional string).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)The server.tool call that registers the 'forward-email' tool, including its description, input schema, and inline handler function.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)}` }], }; } });