Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

send-draft

Send a draft email by specifying its ID to deliver prepared messages from the Meme MCP Server's email functionality.

Instructions

Send a draft email

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftIdYesThe ID of the draft to send

Implementation Reference

  • The handler function for the 'send-draft' tool. It uses the Composio toolset to execute the 'GMAIL_SEND_DRAFT' action with the provided draftId, handles success/error responses, and returns formatted text content.
    }, 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)}` }], }; }
  • Zod input schema for the 'send-draft' tool, requiring a 'draftId' string parameter.
    draftId: z.string().describe("The ID of the draft to send"),
  • src/tools.ts:323-359 (registration)
    Registration of the 'send-draft' MCP tool on the server, including description, schema, and inline handler implementation.
    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)}` }], }; } });

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