Skip to main content
Glama

whmcs_get_email_templates

Retrieve email templates from WHMCS by type and language to manage automated communications.

Instructions

Get list of email templates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoTemplate type
languageNoTemplate language

Implementation Reference

  • The core handler function `getEmailTemplates` in WhmcsApiClient that executes the WHMCS API call to 'GetEmailTemplates' action, retrieving the list of email templates.
    async getEmailTemplates(params: { type?: 'general' | 'product' | 'domain' | 'invoice' | 'support' | 'affiliate'; language?: string; } = {}) { return this.call<WhmcsApiResponse & { totalresults: number; emailtemplates: { emailtemplate: Array<{ id: number; name: string; subject: string; custom: boolean; }> }; }>('GetEmailTemplates', params); }
  • src/index.ts:1085-1100 (registration)
    Registers the MCP tool 'whmcs_get_email_templates' with input schema validation using Zod and a thin wrapper handler that delegates to WhmcsApiClient.getEmailTemplates.
    'whmcs_get_email_templates', { title: 'Get Email Templates', description: 'Get list of email templates', inputSchema: { type: z.enum(['general', 'product', 'domain', 'invoice', 'support', 'affiliate']).optional().describe('Template type'), language: z.string().optional().describe('Template language'), }, }, async (params) => { const result = await whmcsClient.getEmailTemplates(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
  • Defines the input schema for the tool using Zod, specifying optional 'type' (enum of template categories) and 'language' parameters.
    inputSchema: { type: z.enum(['general', 'product', 'domain', 'invoice', 'support', 'affiliate']).optional().describe('Template type'), language: z.string().optional().describe('Template language'), },

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/scarecr0w12/whmcs-mcp-server'

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