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

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the action 'send an email'. It doesn't disclose critical traits like whether this requires authentication, if it's a mutation (likely yes), rate limits, error conditions, or what happens after sending (e.g., confirmation). The description is minimal and fails to compensate for the lack of annotations.

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 extremely concise with just three words, 'Send an email', which is front-loaded and wastes no space. While it may be under-specified, it earns a high score for brevity and lack of redundancy.

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 the complexity of an email-sending tool with no annotations and no output schema, the description is incomplete. It doesn't address authentication needs, success/failure responses, or how it differs from sibling tools. For a mutation tool with potential side effects, more context is needed to guide the agent effectively.

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%, with clear descriptions for 'to', 'subject', and 'body' parameters. The description adds no additional meaning beyond what the schema provides, but since the schema is well-documented, the baseline score of 3 is appropriate. No parameter details are mentioned in the description itself.

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

Purpose2/5

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

The description 'Send an email' is a tautology that restates the tool name without adding specificity. It doesn't distinguish this tool from sibling tools like 'send-draft' or 'reply-to-email', nor does it clarify what type of email is being sent (e.g., new email vs. forwarding). The verb 'send' is clear but lacks context about the resource scope.

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

Usage Guidelines1/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. It doesn't mention when to choose 'send-email' over 'send-draft', 'reply-to-email', or 'forward-email', nor does it specify prerequisites like authentication or context requirements. This leaves the agent with no usage context.

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