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)}` 
                }],
            };
        }
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Send a draft email' implies a write/mutation operation that will transmit an email, but it doesn't disclose whether this is irreversible, what permissions are required, what happens to the draft after sending, or any rate limits. For a mutation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise at three words. It's front-loaded with the essential action and resource, with zero wasted words. Every element earns its place in this minimal description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after sending (success/failure indicators, what the draft becomes), doesn't mention error conditions, and provides minimal behavioral context. The agent would need to guess about important operational aspects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100% (the single parameter 'draftId' is fully documented in the schema), so the baseline score is 3. The description adds no additional parameter information beyond what's already in the schema, which is acceptable given the comprehensive schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Send a draft email' clearly states the verb ('send') and resource ('draft email'), making the tool's purpose immediately understandable. However, it doesn't distinguish this tool from the sibling 'send-email' tool, which appears to be a different sending mechanism. A perfect score would require explicit differentiation from that alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (like needing a draft created first), when to use 'send-draft' versus 'send-email', or any contextual constraints. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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