Skip to main content
Glama

create_whatsapp_template

Create a WhatsApp message template and submit it to WhatsApp for review (WhatsApp Business API numbers only). It works in steps. Call it with whatever the user has given so far: if anything is missing or breaks a WhatsApp rule, it returns needsInput with the exact questions to ask, and nothing is created. When everything is valid it returns a preview and a confirmToken, still without creating anything. Show the preview; only after the user approves, call it again with the same fields plus the confirmToken. Supports text, image, video, document and location headers, body variables ({{1}} or {{first_name}}) with sample values, a footer, quick reply, URL, phone number and copy code buttons, and authentication (one-time code) templates.

Input Schema

NameRequiredDescriptionDefault
bodyNoMessage body, up to 1024 characters. Mark per-message values with {{1}}, {{2}} or named variables like {{first_name}}; never at the very start or end, and never next to each other. Not used for AUTHENTICATION templates.
nameNoTemplate name: lowercase letters, numbers and underscores, e.g. order_ready
deviceNoWhatsApp Business API device ID (24 hex characters) that will own the template. Use get_whatsapp_devices to find it.
footerNoOptional footer, up to 60 characters, without variables
headerNoOptional header shown above the body
buttonsNoOptional buttons: up to 10 in total, at most 2 URL, 1 PHONE_NUMBER and 1 COPY_CODE, with quick replies grouped together
categoryNoMARKETING (promotions and offers), UTILITY (order, account or appointment updates) or AUTHENTICATION (one-time codes)
languageNoWhatsApp language code of the template text, e.g. en_US, es, pt_BR
bodyExamplesNoOne realistic sample value per body variable, keyed by the variable: {"1": "Maria"} or {"first_name": "Maria"}. Ask the user for them; never invent them.
confirmTokenNoToken returned with the preview. Pass it only after the user approved that exact preview.
authenticationNoOptions for AUTHENTICATION templates only

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent, open-world tool; the description adds the crucial behavioral detail that no side effect occurs until the confirm-token call, and that submission goes to WhatsApp review. It does not cover failure-after-approval or duplicate-name behavior, keeping it short of a 5.

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?

Front-loaded with purpose in the first clause, then the multi-step protocol, then a capability list. Despite its length, every sentence carries operational information; nothing is redundant filler.

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?

With 11 parameters, nested objects and no output schema, the description compensates by describing both return states (needsInput with questions, preview with confirmToken) and the full set of supported template features. An agent can drive the interaction without seeing a response schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter flow semantics the schema cannot: confirmToken is valid only for the exact previewed payload, and bodyExamples must be asked of the user rather than invented. Variable syntax and template-type capability are also surfaced.

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 ('Create a WhatsApp message template') plus the scope constraint ('submit it to WhatsApp for review, WhatsApp Business API numbers only'). This clearly distinguishes it from list_whatsapp_templates and delete_whatsapp_template.

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

Usage Guidelines5/5

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

Gives an explicit staged procedure: call with whatever the user has provided, expect needsInput when incomplete, show the preview, then re-call with the confirmToken only after user approval. It also names the when-not condition ('nothing is created') at each stage.

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