Skip to main content
Glama
EvandroSchechtel

WhatsApp Business MCP Server

list_templates

Retrieve message templates from a WhatsApp Business Account to manage customer communication. Filter by approval status to organize templates for sending messages or reviewing submissions.

Instructions

List all message templates in the WhatsApp Business Account, optionally filtered by status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter templates by approval status
limitNoMax templates to return

Implementation Reference

  • The implementation of listTemplates which makes the API request to fetch WhatsApp templates.
    async listTemplates(params?: { status?: string; limit?: number }) {
      const qs = new URLSearchParams();
      if (params?.status) qs.set("status", params.status);
      if (params?.limit) qs.set("limit", params.limit.toString());
      const query = qs.toString() ? `?${qs.toString()}` : "";
      return this.request(
        `/${this.config.businessAccountId}/message_templates${query}`
      );
    }
  • src/index.ts:284-298 (registration)
    The MCP tool registration for 'list_templates', which calls the whatsapp-client handler.
    server.tool(
      "list_templates",
      "List all message templates in the WhatsApp Business Account, optionally filtered by status.",
      {
        status: z
          .enum(["APPROVED", "PENDING", "REJECTED"])
          .optional()
          .describe("Filter templates by approval status"),
        limit: z.number().optional().default(20).describe("Max templates to return"),
      },
      async ({ status, limit }) =>
        executeWithHooks("list_templates", { status, limit }, config, () =>
          wa.listTemplates({ status, limit })
        )
    );

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/EvandroSchechtel/mcp-whatsapp'

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