Skip to main content
Glama

Create a WhatsApp template

flow_create_whatsapp_template

Saves a new MARKETING or UTILITY WhatsApp template as a draft on one of the brand's WhatsApp senders (ids from flow_list_senders): an optional text header, the body, an optional footer and buttons. Name, language and category cannot change later. An image header, an offer, a carousel or an authentication template is built in the portal. Variables are written {{name}} in lowercase letters and underscores. {{first_name}} (fallback up to 20 characters), {{city}} (30) and {{phone_number}} come from the contact; every variable but {{phone_number}} needs a fallback, sent when there is no value. For a name of your own, and a link's trailing variable, the fallback is what a campaign sends and the example Meta's reviewer reads; an API send can give its own value. Meta's rules apply: no variable at the start or end of the text or next to another, a text header with at most one variable, a footer without one, at most 10 buttons (2 URL, 1 PHONE_NUMBER, 1 COPY_CODE, which is MARKETING only) with quick replies together. Saved as a draft: Meta sees it only once it is submitted in the portal. The answer gives its link and preview: the message as a recipient sees it, each variable filled with its fallback.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "senderId": "<senderId>",
      "name": "<name>",
      "language": "<language>",
      "category": "<category>",
      "body": "<body>"
    },
    "name": "flow_create_whatsapp_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes
nameYesLowercase letters, digits and underscores
footerNo
headerNo
brandIdNoThe id of the brand this change is for: the active brand (flow_whoami). Required when the connection covers several brands; the change is refused when another brand is active.
buttonsNo
categoryYes
languageYesMeta's language code, e.g. en, en_US, hr, de
senderIdYes
fallbacksNoVariable name → its fallback; every variable but {{phone_number}} needs one

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that the result is a draft not yet visible to Meta, that name/language/category are immutable after creation, that variables need fallbacks sent when no value exists, and that the response returns a link plus a rendered preview. The Meta review and API-send distinction for fallbacks is behavior an agent could not infer from readOnlyHint/destructiveHint alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and essentially every clause carries operative rules, but the single dense paragraph packs immutability, variable grammar, Meta constraints, draft state, and return shape into long run-on sentences. Slight structural cost for readability, not wasted content.

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

Completeness5/5

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

For a 10-parameter nested-schema creation tool with no output schema, the description covers input grammar, business constraints, draft lifecycle, and even the shape of the returned link and preview. An agent has enough to call it correctly and to know what to do next.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 40% schema description coverage, the description compensates heavily: it defines variable syntax ({{name}} lowercase with underscores), per-variable fallback length limits and semantics, header/footer variable restrictions, and button-kind quotas (2 URL, 1 PHONE_NUMBER, 1 COPY_CODE MARKETING-only) that are absent from the schema. Only brandId and urlSuffixToken details are left mostly to the schema.

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?

States a specific verb and resource ("Saves a new MARKETING or UTILITY WhatsApp template as a draft") plus the target (one of the brand's senders). It also enumerates the composable parts (text header, body, footer, buttons) and explicitly excludes variants built in the portal, so an agent can separate it from update/submit siblings.

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?

Gives concrete when-to-use context (sender ids come from flow_list_senders) and clear when-not guidance by naming the template shapes that must be built in the portal instead (image header, offer, carousel, authentication). It does not explicitly route to flow_update_whatsapp_template or flow_submit_template by name, leaving the follow-up path implied by "Meta sees it only once it is submitted in the portal."

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources