add_domain
Add a new sending domain to GetMailer's MCP server for transactional emails. The tool provides DNS records to configure domain verification.
Instructions
Add a new sending domain (returns DNS records to configure)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to add (e.g., example.com) |
Implementation Reference
- src/index.ts:411-419 (handler)Handler for the 'add_domain' tool that sends a POST request to the GetMailer API's /api/domains endpoint with the provided domain.case 'add_domain': { const result = await apiRequest('/api/domains', { method: 'POST', body: JSON.stringify({ domain: args?.domain }), }); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; }
- src/index.ts:192-205 (registration)Registration of the 'add_domain' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema requiring a 'domain' string.{ 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'], }, },