Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

send-email

Send emails directly from the Meme MCP Server to recipients with specified subjects and body content.

Instructions

Send an email

Input Schema

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

Implementation Reference

  • src/tools.ts:79-117 (registration)
    Registers the 'send-email' tool on the MCP server, including schema and inline 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)}` }], }; } });
  • Zod schema defining the input parameters: to, subject, body for the send-email tool.
    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"),
  • The handler function that sends the email using the Composio toolset by executing the GMAIL_SEND_EMAIL action and 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)}` }], }; } });

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