Skip to main content
Glama
r3-yamauchi

blastengine-mailer

by r3-yamauchi

send_email

Send emails via the Blastengine API by specifying recipient, sender, subject, and body. Simplify email communication directly from your application or workflow.

Instructions

Send an email using Blastengine API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesSender email address
subjectYesEmail subject
textYesEmail body
toYesRecipient email address

Implementation Reference

  • server.js:56-96 (handler)
    The handler function for the 'send_email' tool, which uses BlastEngine to send emails based on input parameters.
    case "send_email": {
        const to = String(request.params.arguments?.to);
        const from = String(request.params.arguments?.from);
        const subject = String(request.params.arguments?.subject);
        const text = String(request.params.arguments?.text);
    
        if (!to || !from || !subject || !text) {
            throw new Error("宛先、送信元、件名、本文は必須です。");
        }
    
        try {
            // BlastEngineクライアントの初期化
            const client = new BlastEngine(process.env.BLASTENGINE_USER_ID, process.env.BLASTENGINE_API_KEY);
    
            // メールの送信
            const transaction = new Transaction;
    
            transaction
                .setFrom(from)
                .setSubject(subject)
                .setTo(to)
                .setText(text);
    
            const res = await transaction.send();
    
            return {
                content: [{ type: "text", text: `${to} にメールを送信しました。 delivery_id: ${res.delivery_id}` }],
            };
        } catch (error) {
            console.error("メール送信エラー:", error);
            return {
                content: [
                    {
                        type: "text",
                        text: `${to} へのメール送信に失敗しました: ${error.message}`,
                    },
                ],
                isError: true,
            };
        }
    }
  • Input schema defining the parameters for the 'send_email' tool.
    inputSchema: {
        type: "object",
        properties: {
            to: {
                type: "string",
                description: "Recipient email address"
            },
            from: {
                type: "string",
                description: "Sender email address"
            },
            subject: {
                type: "string",
                description: "Email subject"
            },
            text: {
                type: "string",
                description: "Email body"
            }
        },
        required: ["to", "from", "subject", "text"]
    }
  • server.js:24-50 (registration)
    Registration of the 'send_email' tool in the ListToolsRequestSchema response.
        {
            name: "send_email",
            description: "Send an email using Blastengine API",
            inputSchema: {
                type: "object",
                properties: {
                    to: {
                        type: "string",
                        description: "Recipient email address"
                    },
                    from: {
                        type: "string",
                        description: "Sender email address"
                    },
                    subject: {
                        type: "string",
                        description: "Email subject"
                    },
                    text: {
                        type: "string",
                        description: "Email body"
                    }
                },
                required: ["to", "from", "subject", "text"]
            }
        }
    ]
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. It mentions the API but fails to describe critical traits like rate limits, authentication requirements, error responses, or whether the email is sent immediately or queued. This leaves significant gaps for an agent to understand operational behavior.

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 a single, efficient sentence with zero wasted words, front-loading the core purpose. It is appropriately sized for a straightforward tool, making it easy to parse quickly.

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 inadequate. It lacks details on behavioral traits, error handling, and response format, leaving the agent with incomplete context for reliable invocation.

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 documentation for all four parameters (from, to, subject, text). The description adds no additional meaning beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high coverage without extra value.

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 clearly states the action ('Send an email') and the resource ('using Blastengine API'), providing a specific verb+resource combination. However, with no sibling tools mentioned, there's no opportunity to distinguish from alternatives, which prevents a perfect score.

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 offers no guidance on when to use this tool, such as for transactional vs. marketing emails, prerequisites like API setup, or error handling scenarios. It simply states what the tool does without context for application.

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

Related 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/r3-yamauchi/mcp-server-blastengine-mailer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server