Skip to main content
Glama
Upload-Post

Upload-Post

Official

Manage WhatsApp message templates

manage_whatsapp_templates
Destructive

Create, list, and delete WhatsApp Business message templates required to message customers after the 24-hour window.

Instructions

Message templates of the profile's WhatsApp Business account. A template approved by Meta is the ONLY way to write to someone more than 24 h after their last message: send it with send_dm (platform 'whatsapp', template { name, language, components }). list (optional status APPROVED|PENDING|REJECTED|PAUSED|DISABLED, name, limit 1-200): each with id, name, status, category, language, components, quality_score, rejected_reason. create (name: lowercase letters, numbers and underscores; category UTILITY (default) | MARKETING | AUTHENTICATION; language, default 'en_US'; and either Meta's components list or the shorthand body text with {{1}}, {{2}}… variables plus examples (sample values Meta requires for them), header (text), footer and buttons [{ text, url? | phone_number? }], a button with neither is a quick reply): Meta reviews it, status PENDING until it is APPROVED or REJECTED (minutes to a day); MARKETING templates are billed higher by Meta, to the customer's own WhatsApp Business account. delete (name; every language of that template goes, cannot be undone). WhatsApp is available to every account: the profile needs its WhatsApp Business number connected (get_connect_link with platforms ['whatsapp']), otherwise the API answers 400 with how to connect it; 401 whatsapp_reauth_required means reconnect it. Needs the user's approval: call it first without confirmed to get a preview (nothing is sent), show the user exactly what will go out, and repeat the call with confirmed: true only after they approve.

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": {
      "action": "<action>",
      "user": "<user>"
    },
    "name": "manage_whatsapp_templates"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNocreate shorthand: the body text, with {{1}}, {{2}}… for variables.
nameNoTemplate name. Required for create and delete; a filter for list.
userYesUpload-Post profile name with WhatsApp connected.
limitNolist: templates per call (default 100).
actionYes
footerNocreate shorthand: footer (max 60 characters).
headerNocreate shorthand: text header (max 60 characters).
paramsNoOther API fields for this action, with the REST API's own names (snake_case) and shapes. Any other field of /api/uploadposts/dms/templates. Leave out what you do not want to change.
statusNolist: only templates in this status (APPROVED, PENDING, REJECTED, PAUSED, DISABLED).
buttonsNocreate shorthand: up to 10 buttons { text (max 25), url? | phone_number? }; with neither it is a quick-reply button.
categoryNocreate: default UTILITY.
examplesNocreate shorthand: one sample value per body variable, in order (Meta rejects variables without samples).
languageNocreate: template language code, e.g. 'en_US', 'es_ES' (default en_US).
confirmedNoSet to true only after the user has seen the preview this tool returns without it and approved it. Without it nothing is sent.
componentsNocreate: Meta's components list (HEADER, BODY, FOOTER, BUTTONS) instead of the shorthand.

Output Schema

NameRequiredDescriptionDefault
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.27.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint and openWorldHint; the description goes further by stating that delete removes every language and cannot be undone, that Meta review leaves templates PENDING for minutes to a day, that MARKETING is billed higher, and that 400/401 map to connection/reauth problems. The only omission is what a successful delete/create returns, which the output schema likely covers.

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?

Front-loaded with the resource and the critical routing fact (send via send_dm), then action-by-action detail. It is dense and delivered as one long block rather than segmented per action, but nearly every clause carries operational information an agent needs.

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?

Covers a 15-parameter, three-action tool with nested objects: prerequisites, error paths, per-action parameter guidance, listing fields, and the confirmation protocol. With an output schema present, return-value detail is correctly left to structured data.

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 already 93%, yet the description still adds real meaning: template-name character rules, default language 'en_US', default category UTILITY, how `examples` map one-to-one to body variables in order (a Meta requirement), and that a button with neither url nor phone_number becomes a quick reply. It reinforces rather than merely restates 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 (manage/list/create/delete) and resource (WhatsApp message templates), and explicitly distinguishes the sibling actions: sending goes through send_dm with the `template` payload, connecting goes through get_connect_link. An agent can tell exactly which capability belongs here.

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?

Explicitly says templates are the ONLY way to write to someone beyond 24h and routes that case to send_dm, names the prerequisite connection path (get_connect_link with platforms ['whatsapp']), and prescribes the two-step approval ritual: call without `confirmed` for a preview, then repeat with `confirmed: true` after the user approves.

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

Deploy Server

Other Tools