Skip to main content
Glama
getplatform

GetMailer MCP Server

by getplatform

send_email

Send transactional emails through GetMailer MCP Server. Deliver automated messages to recipients with HTML or text content, CC/BCC options, and template support.

Instructions

Send a transactional email via GetMailer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesSender email address (must be from a verified domain)
toYesRecipient email address(es)
subjectYesEmail subject line
htmlNoHTML content of the email
textNoPlain text content of the email
ccNoCC recipients (optional)
bccNoBCC recipients (optional)
replyToNoReply-to address (optional)
templateIdNoTemplate ID to use instead of html/text (optional)
variablesNoTemplate variables as key-value pairs (optional)

Implementation Reference

  • Handler for the 'send_email' tool: Posts the input arguments to the GetMailer API /api/emails endpoint using the apiRequest helper and returns the JSON result as text content.
    case 'send_email': {
      const result = await apiRequest<{ email: unknown; suppressed?: string[] }>(
        '/api/emails',
        {
          method: 'POST',
          body: JSON.stringify(args),
        }
      );
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • src/index.ts:66-118 (registration)
    Registration of the 'send_email' tool in the ListToolsRequestHandler, including name, description, and detailed input schema.
    {
      name: 'send_email',
      description: 'Send a transactional email via GetMailer',
      inputSchema: {
        type: 'object' as const,
        properties: {
          from: {
            type: 'string',
            description: 'Sender email address (must be from a verified domain)',
          },
          to: {
            type: 'array',
            items: { type: 'string' },
            description: 'Recipient email address(es)',
          },
          subject: {
            type: 'string',
            description: 'Email subject line',
          },
          html: {
            type: 'string',
            description: 'HTML content of the email',
          },
          text: {
            type: 'string',
            description: 'Plain text content of the email',
          },
          cc: {
            type: 'array',
            items: { type: 'string' },
            description: 'CC recipients (optional)',
          },
          bcc: {
            type: 'array',
            items: { type: 'string' },
            description: 'BCC recipients (optional)',
          },
          replyTo: {
            type: 'string',
            description: 'Reply-to address (optional)',
          },
          templateId: {
            type: 'string',
            description: 'Template ID to use instead of html/text (optional)',
          },
          variables: {
            type: 'object',
            description: 'Template variables as key-value pairs (optional)',
          },
        },
        required: ['from', 'to', 'subject'],
      },
    },
  • Shared helper function apiRequest used by the send_email handler (and others) to make authenticated HTTP requests to the GetMailer API.
    async function apiRequest<T>(
      endpoint: string,
      options: RequestInit = {}
    ): Promise<T> {
      const url = `${API_URL}${endpoint}`;
    
      const response = await fetch(url, {
        ...options,
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Bearer ${API_KEY}`,
          ...options.headers,
        },
      });
    
      if (!response.ok) {
        let errorMessage = response.statusText;
        try {
          const errorData = await response.json();
          errorMessage = errorData.error || errorData.message || errorMessage;
        } catch {
          // Ignore
        }
        throw new Error(`API Error: ${errorMessage}`);
      }
    
      return response.json();
    }
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. While 'Send' implies a write operation, the description doesn't mention authentication requirements, rate limits, delivery guarantees, error handling, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps that could affect agent decision-making.

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 that gets straight to the point with zero wasted words. It's appropriately sized for the tool's complexity and immediately communicates the core function without unnecessary elaboration.

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?

For a 10-parameter mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address critical context like authentication requirements, rate limits, error conditions, or what constitutes a successful operation. The agent would need to guess about behavioral aspects that should be documented for a tool that sends emails.

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?

Schema description coverage is 100%, so the schema already documents all 10 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description, which applies here.

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') and resource ('transactional email via GetMailer'), making the purpose immediately understandable. However, it doesn't differentiate this from potential sibling tools like 'create_batch' or other email-related operations, which would require more specific context about what makes this 'transactional' versus other email types.

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 like 'create_batch' or template-based operations. It mentions 'transactional email' but doesn't explain what that means in practice or when other tools might be more appropriate. There are no usage prerequisites, exclusions, or comparisons to sibling tools.

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/getplatform/getmailer-mcp'

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