Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

send-draft

Send a draft email from the Meme MCP Server by providing the draft ID. Simplify the process of dispatching pre-composed emails directly through the server.

Instructions

Send a draft email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftIdYesThe ID of the draft to send

Implementation Reference

  • src/tools.ts:323-359 (registration)
    Registration of the 'send-draft' tool using server.tool(), including inline schema and handler function.
    server.tool("send-draft", "Send a draft email", { draftId: z.string().describe("The ID of the draft to send"), }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_SEND_DRAFT", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Draft sent successfully!\n\nYour draft has been sent and is now in your Gmail sent folder.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to send draft: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error sending draft:', error); return { content: [{ type: "text", text: `Error sending draft: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • Input schema for the 'send-draft' tool: requires draftId as string.
    draftId: z.string().describe("The ID of the draft to send"), }, async (args, extra) => {
  • Handler function executes GMAIL_SEND_DRAFT action via toolset, handles success/error responses with formatted text output.
    }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_SEND_DRAFT", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Draft sent successfully!\n\nYour draft has been sent and is now in your Gmail sent folder.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to send draft: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error sending draft:', error); return { content: [{ type: "text", text: `Error sending draft: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • src/index.ts:11-12 (registration)
    Invocation of registerTools(server) which registers all tools including 'send-draft'.
    registerTools(server);

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