Skip to main content
Glama
getplatform

GetMailer MCP Server

by getplatform

add_to_suppression

Add email addresses to a suppression list to prevent sending emails to bounced, complained, or manually excluded recipients.

Instructions

Add email addresses to the suppression list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailsYesEmail addresses to suppress
reasonNoReason for suppression (default: MANUAL)

Implementation Reference

  • Handler function for 'add_to_suppression' tool. It makes a POST request to '/api/suppression' endpoint with the emails and reason (default 'MANUAL'), and returns the API response as text.
    case 'add_to_suppression': { const result = await apiRequest('/api/suppression', { method: 'POST', body: JSON.stringify({ emails: args?.emails, reason: args?.reason || 'MANUAL', }), }); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; }
  • Tool schema definition including name, description, and inputSchema with required 'emails' array and optional 'reason' enum.
    name: 'add_to_suppression', description: 'Add email addresses to the suppression list', inputSchema: { type: 'object' as const, properties: { emails: { type: 'array', items: { type: 'string' }, description: 'Email addresses to suppress', }, reason: { type: 'string', enum: ['MANUAL', 'BOUNCE', 'COMPLAINT'], description: 'Reason for suppression (default: MANUAL)', }, }, required: ['emails'], }, },
  • src/index.ts:64-344 (registration)
    Registration of all tools including 'add_to_suppression' via the ListToolsRequestSchema handler, which lists available tools with their schemas.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { 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'], }, }, { name: 'list_emails', description: 'List sent emails with status information', inputSchema: { type: 'object' as const, properties: { limit: { type: 'number', description: 'Number of emails to return (default: 20)', }, cursor: { type: 'string', description: 'Pagination cursor for next page', }, }, }, }, { name: 'get_email', description: 'Get details of a specific email including delivery events', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'Email ID', }, }, required: ['id'], }, }, { name: 'list_templates', description: 'List available email templates', inputSchema: { type: 'object' as const, properties: {}, }, }, { name: 'create_template', description: 'Create a new email template', inputSchema: { type: 'object' as const, properties: { name: { type: 'string', description: 'Template name', }, 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)', }, }, required: ['name', 'subject', 'html'], }, }, { name: 'list_domains', description: 'List verified sending domains', inputSchema: { type: 'object' as const, properties: {}, }, }, { name: 'add_domain', description: 'Add a new sending domain (returns DNS records to configure)', inputSchema: { type: 'object' as const, properties: { domain: { type: 'string', description: 'Domain name to add (e.g., example.com)', }, }, required: ['domain'], }, }, { name: 'verify_domain', description: 'Check if a domain has been verified', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'Domain ID', }, }, required: ['id'], }, }, { name: 'get_analytics', description: 'Get email analytics and statistics', inputSchema: { type: 'object' as const, properties: { type: { type: 'string', enum: ['summary', 'daily'], description: 'Type of analytics (summary or daily)', }, days: { type: 'number', description: 'Number of days for daily stats (default: 30)', }, }, }, }, { name: 'list_suppression', description: 'List suppressed email addresses (bounced, complained, or manually added)', inputSchema: { type: 'object' as const, properties: { limit: { type: 'number', description: 'Number of entries to return (default: 50)', }, }, }, }, { name: 'add_to_suppression', description: 'Add email addresses to the suppression list', inputSchema: { type: 'object' as const, properties: { emails: { type: 'array', items: { type: 'string' }, description: 'Email addresses to suppress', }, reason: { type: 'string', enum: ['MANUAL', 'BOUNCE', 'COMPLAINT'], description: 'Reason for suppression (default: MANUAL)', }, }, required: ['emails'], }, }, { 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'], }, }, { name: 'list_batches', description: 'List batch email jobs', inputSchema: { type: 'object' as const, properties: {}, }, }, { name: 'get_batch', description: 'Get batch job status and progress', inputSchema: { type: 'object' as const, properties: { id: { type: 'string', description: 'Batch ID', }, }, required: ['id'], }, }, ], }));

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