Skip to main content
Glama
EvandroSchechtel

WhatsApp Business MCP Server

create_template

Create message templates for WhatsApp Business to send outbound messages beyond the 24-hour window, requiring Meta approval for marketing, utility, or authentication purposes.

Instructions

Create a new message template for approval by Meta. Templates are required for outbound messages outside the 24-hour window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTemplate name (lowercase, underscores only)
languageNoTemplate language codept_BR
categoryYesTemplate category — affects pricing and approval rules
componentsYesTemplate components: HEADER, BODY, FOOTER, BUTTONS

Implementation Reference

  • src/index.ts:300-317 (registration)
    Tool registration for "create_template" which takes input parameters and calls the wa client.
    server.tool(
      "create_template",
      "Create a new message template for approval by Meta. Templates are required for outbound messages outside the 24-hour window.",
      {
        name: z.string().describe("Template name (lowercase, underscores only)"),
        language: z.string().default("pt_BR").describe("Template language code"),
        category: z
          .enum(["MARKETING", "UTILITY", "AUTHENTICATION"])
          .describe("Template category — affects pricing and approval rules"),
        components: z
          .array(z.record(z.string(), z.unknown()))
          .describe("Template components: HEADER, BODY, FOOTER, BUTTONS"),
      },
      async ({ name, language, category, components }) =>
        executeWithHooks("create_template", { name, language, category }, config, () =>
          wa.createTemplate({ name, language, category, components })
        )
    );
  • Implementation of createTemplate in the WhatsAppClient class, which makes the API call.
    async createTemplate(template: {
      name: string;
      language: string;
      category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
      components: unknown[];
    }) {
      return this.request(
        `/${this.config.businessAccountId}/message_templates`,
        "POST",
        template
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It mentions the approval requirement but doesn't disclose other behavioral traits like whether this is a write operation (implied by 'create'), what permissions are needed, rate limits, whether the template is immediately usable, or what happens on failure. For a creation tool with zero annotation coverage, this is insufficient.

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?

Two concise sentences with zero waste. The first sentence states the core purpose, the second provides crucial context about when templates are required. Every word earns its place and the information is front-loaded effectively.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no annotations and no output schema, the description provides basic purpose and context but lacks important details about behavioral characteristics, error conditions, or what the tool returns. The 100% schema coverage helps, but more behavioral transparency would be needed for full completeness.

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 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting, though the description could have explained parameter relationships or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'create' and resource 'message template', specifies it's 'for approval by Meta', and distinguishes it from siblings by explaining templates are required for outbound messages outside the 24-hour window. This differentiates it from other messaging tools like send_text_message.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use this tool ('for outbound messages outside the 24-hour window'), but doesn't explicitly state when NOT to use it or mention specific alternatives like send_template_message. It implies usage for template creation but lacks explicit exclusions.

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

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