reply-to-email
Respond to an existing email by specifying the email ID and providing the reply content using this tool on the Meme MCP Server.
Instructions
Reply to an existing email
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | The ID of the email to reply to | |
| message | Yes | The reply message content |
Implementation Reference
- src/tools.ts:206-240 (handler)Handler function that implements the logic for replying to an email by executing 'GMAIL_REPLY_TO_EMAIL' action via the VercelAIToolSet.}, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_REPLY_TO_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Reply sent successfully!\n\nYour reply has been sent to the original email thread.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to send reply: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error sending reply:', error); return { content: [{ type: "text", text: `Error sending reply: ${error instanceof Error ? error.message : String(error)}` }], }; } });
- src/tools.ts:204-205 (schema)Zod schema defining input parameters for the 'reply-to-email' tool: emailId and message.emailId: z.string().describe("The ID of the email to reply to"), message: z.string().describe("The reply message content"),
- src/tools.ts:203-240 (registration)Registration of the 'reply-to-email' tool on the McpServer, specifying name, description, input schema, and handler.server.tool("reply-to-email", "Reply to an existing email", { emailId: z.string().describe("The ID of the email to reply to"), message: z.string().describe("The reply message content"), }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_REPLY_TO_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Reply sent successfully!\n\nYour reply has been sent to the original email thread.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to send reply: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error sending reply:', error); return { content: [{ type: "text", text: `Error sending reply: ${error instanceof Error ? error.message : String(error)}` }], }; } });