Skip to main content
Glama
getplatform

GetMailer MCP Server

by getplatform

create_batch

Create batch email jobs to send personalized messages to multiple recipients using templates and variables.

Instructions

Create a batch email job to send to multiple recipients

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesBatch job name
fromYesSender email address
subjectNoEmail subject (can include {{variables}})
htmlNoHTML content (can include {{variables}})
textNoPlain text content (optional)
templateIdNoTemplate ID to use instead of html/text (optional)
recipientsYesArray of recipients with optional per-recipient variables
replyToNoReply-to address (optional)

Implementation Reference

  • The handler for the 'create_batch' tool. It sends a POST request to the GetMailer API endpoint '/api/batch' with the tool input arguments and returns the JSON response as text content.
    case 'create_batch': {
      const result = await apiRequest('/api/batch', {
        method: 'POST',
        body: JSON.stringify(args),
      });
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema definition for the 'create_batch' tool, specifying the structure and requirements for batch email creation parameters.
    inputSchema: {
      type: 'object' as const,
      properties: {
        name: {
          type: 'string',
          description: 'Batch job name',
        },
        from: {
          type: 'string',
          description: 'Sender email address',
        },
        subject: {
          type: 'string',
          description: 'Email subject (can include {{variables}})',
        },
        html: {
          type: 'string',
          description: 'HTML content (can include {{variables}})',
        },
        text: {
          type: 'string',
          description: 'Plain text content (optional)',
        },
        templateId: {
          type: 'string',
          description: 'Template ID to use instead of html/text (optional)',
        },
        recipients: {
          type: 'array',
          items: {
            type: 'object',
            properties: {
              to: { type: 'string' },
              variables: { type: 'object' },
            },
            required: ['to'],
          },
          description: 'Array of recipients with optional per-recipient variables',
        },
        replyTo: {
          type: 'string',
          description: 'Reply-to address (optional)',
        },
      },
      required: ['name', 'from', 'recipients'],
    },
  • src/index.ts:271-320 (registration)
    Registration of the 'create_batch' tool in the MCP server's ListTools response, including name, description, and input schema.
    {
      name: 'create_batch',
      description: 'Create a batch email job to send to multiple recipients',
      inputSchema: {
        type: 'object' as const,
        properties: {
          name: {
            type: 'string',
            description: 'Batch job name',
          },
          from: {
            type: 'string',
            description: 'Sender email address',
          },
          subject: {
            type: 'string',
            description: 'Email subject (can include {{variables}})',
          },
          html: {
            type: 'string',
            description: 'HTML content (can include {{variables}})',
          },
          text: {
            type: 'string',
            description: 'Plain text content (optional)',
          },
          templateId: {
            type: 'string',
            description: 'Template ID to use instead of html/text (optional)',
          },
          recipients: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                to: { type: 'string' },
                variables: { type: 'object' },
              },
              required: ['to'],
            },
            description: 'Array of recipients with optional per-recipient variables',
          },
          replyTo: {
            type: 'string',
            description: 'Reply-to address (optional)',
          },
        },
        required: ['name', 'from', 'recipients'],
      },
    },
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 'create' implies a write operation, the description doesn't address critical behavioral aspects: whether this is an asynchronous job, what permissions are required, if there are rate limits, what happens on failure, or what the expected output looks like. It mentions the action but lacks operational context needed for safe invocation.

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 - a single sentence that communicates the core purpose without any wasted words. It's front-loaded with the essential information and earns its place efficiently. No structural issues or unnecessary elaboration are present.

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 complex mutation tool with 8 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address the asynchronous nature implied by 'batch job', doesn't explain what happens after creation, doesn't mention error handling, and provides no context about how this integrates with sibling tools. The agent lacks critical operational understanding.

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 8 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters (e.g., 'html' vs 'templateId'), provide examples, or clarify edge cases. The baseline score of 3 reflects adequate but minimal value addition.

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 tool's purpose: 'Create a batch email job to send to multiple recipients'. It specifies the verb ('create'), resource ('batch email job'), and scope ('to multiple recipients'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'send_email' or 'create_template', which would be needed for 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 provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose 'create_batch' over 'send_email' (for single emails) or 'create_template' (for reusable templates), nor any context about prerequisites, timing considerations, or exclusions. The agent must infer usage from the name and parameters 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/getplatform/getmailer-mcp'

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