Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

send-email

Send customizable emails by specifying recipient, subject, and body directly through the MCP server for efficient communication within meme generation workflows.

Instructions

Send an email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesThe body of the email
subjectYesThe subject of the email
toYesThe email address of the recipient

Implementation Reference

  • The async handler function for the 'send-email' tool. It uses VercelAIToolSet's executeAction to send an email via Gmail by calling the 'GMAIL_SEND_EMAIL' action with the provided arguments (to, subject, body). Returns success or error messages.
    }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_SEND_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Email sent successfully!\n\nTo: ${args.to}\nSubject: ${args.subject}\n\nYour email has been sent and is now in your Gmail sent folder.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to send email: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error sending email:', error); return { content: [{ type: "text", text: `Error sending email: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • Zod schema defining the input parameters for the 'send-email' tool: 'to' (recipient email), 'subject', and 'body'.
    to: z.string().describe("The email address of the recipient"), subject: z.string().describe("The subject of the email"), body: z.string().describe("The body of the email"),
  • src/tools.ts:79-117 (registration)
    Registration of the 'send-email' tool using McpServer.tool(), including name, description, input schema, and handler function.
    server.tool("send-email", "Send an email", { to: z.string().describe("The email address of the recipient"), subject: z.string().describe("The subject of the email"), body: z.string().describe("The body of the email"), }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_SEND_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Email sent successfully!\n\nTo: ${args.to}\nSubject: ${args.subject}\n\nYour email has been sent and is now in your Gmail sent folder.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to send email: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error sending email:', error); return { content: [{ type: "text", text: `Error sending email: ${error instanceof Error ? error.message : String(error)}` }], }; } });

Other Tools

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

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