Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

create-draft

Generate and save an email draft by specifying the recipient, subject, and body content. Ideal for preparing structured communications within the Meme MCP Server environment.

Instructions

Create an email draft

Input Schema

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

Implementation Reference

  • The handler function that implements the create-draft tool logic by executing the GMAIL_DRAFT_EMAIL action using the VercelAIToolSet (Composio).
    }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_DRAFT_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `📝 Draft created successfully!\n\nDraft ID: ${(result.data?.response_data as any)?.id}\nTo: ${args.to}\nSubject: ${args.subject}` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to create draft: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error creating draft:', error); return { content: [{ type: "text", text: `Error creating draft: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • Input schema for the create-draft tool using Zod validation for to, subject, and body parameters.
    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:283-321 (registration)
    Registration of the create-draft tool via server.tool, including schema and inline handler.
    server.tool("create-draft", "Create an email draft", { 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_DRAFT_EMAIL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `📝 Draft created successfully!\n\nDraft ID: ${(result.data?.response_data as any)?.id}\nTo: ${args.to}\nSubject: ${args.subject}` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to create draft: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error creating draft:', error); return { content: [{ type: "text", text: `Error creating 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