Skip to main content
Glama

Create whatsapp template

create_whatsapp_template

📱 TEMPLATES WABA — Cria um novo template de mensagem WhatsApp Business e submete pra aprovação da Meta (leva de minutos a ~1 dia). Suporta cabeçalho de TEXTO, IMAGEM (ex: banner de promoção) ou VÍDEO (ex: vídeo institucional curto), e botões de resposta rápida (QUICK_REPLY, ex: "Sim"/"Não" — até 3). Não existe cabeçalho de ÁUDIO nos templates da Meta — pra mandar áudio, use o agente em conversa ativa, não cadência. Depois de aprovado, o nome do template pode ser usado em create_sequence (campo waTemplateName do step send_whatsapp) pra 1º toque frio, ou em automações (send_whatsapp tipo template).

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": {
      "name": "<name>",
      "category": "<category>",
      "body": "<body>"
    },
    "name": "create_whatsapp_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesCorpo da mensagem. Use {{1}}, {{2}}... para variáveis (nunca no início nem no fim do texto — a Meta rejeita). Ex: "Oi {{1}}! A promoção do mês está no ar: 20% off em todo o catálogo."
nameYesNome único do template (minúsculas/números/underscore, ex: "promo_agosto_v1"). É normalizado automaticamente se vier com espaços/maiúsculas.
footerNoRodapé (opcional), ex: "Responda PARAR para cancelar".
numeroNoEtapa 1b — WhatsApp da conta (telefone, ex.: "5548992172321", ou o id em list_agent_profiles → numeros). Os modelos são da conta da Meta de cada número. Vazio = o número principal.
buttonsNoBotões de resposta rápida, separados por vírgula, até 3, cada um com no máximo 25 caracteres. Ex: "Sim,Não". Cada tap do lead nesses botões chega como uma mensagem de texto normal com o texto do botão.
categoryYesCategoria Meta.
languageNoIdioma (padrão "pt_BR").
header_textNoCabeçalho de TEXTO (opcional). Não usar junto com header_image_url/header_image_base64/header_video_url/header_video_base64 — se algum deles vier, imagem tem prioridade sobre vídeo, que tem prioridade sobre texto.
target_user_idNoID da conta-alvo (opcional; APENAS o admin da plataforma pode usar). Padrão: a conta autenticada.
header_image_urlNoURL pública de uma imagem (JPEG/PNG, até 5MB) pra usar como cabeçalho do template (ex: banner da promoção do mês). O servidor baixa a imagem e faz o upload pra Meta automaticamente. Tem prioridade sobre header_video_url/header_video_base64 se ambos vierem.
header_video_urlNoURL pública de um vídeo (MP4, até 16MB) pra usar como cabeçalho do template (ex: vídeo institucional curto). O servidor baixa o vídeo e faz o upload pra Meta automaticamente. Ignorado se algum header de imagem vier junto.
header_image_base64NoAlternativa a header_image_url quando a imagem NÃO está hospedada em nenhuma URL pública (ex: arquivo local) — data URL base64 completa (formato "data:image/png;base64,....."). Usada com prioridade sobre header_image_url se ambos vierem.
header_video_base64NoAlternativa a header_video_url quando o vídeo NÃO está hospedado em nenhuma URL pública — data URL base64 completa (formato "data:video/mp4;base64,....."). Usada com prioridade sobre header_video_url se ambos vierem.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / numero
      Added value: +{
      +  "description": "Etapa 1b — WhatsApp da conta (telefone, ex.: \"5548992172321\", ou o id em list_agent_profiles → numeros). Os modelos são da conta da Meta de cada número. Vazio = o número principal.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.5/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 write confined to the account, and the description adds real behavioral detail beyond them: submission to Meta takes minutes to ~1 day, and the server downloads/uploads media automatically. It stops short of saying what happens on rejection or whether the template is usable pre-approval, so not 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.

Conciseness4/5

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

Front-loaded with the action and approval latency, then header support, then downstream use. Dense and mostly waste-free, though the emoji header and the header-precedence restatement overlap with what the schema already says.

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

Completeness4/5

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

For a 13-parameter creation tool with full schema coverage and no output schema, it covers purpose, latency, media constraints, and downstream naming. What's missing is post-call behavior on Meta rejection and which identifier/status comes back, which matters for an async approval tool.

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 text adds useful semantics: no audio header exists, and the precedence order among image/video/text headers (image > video > text, base64 > URL). Those priority rules are partly duplicated in the schema descriptions, capping it at 4.

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?

Names a specific verb (creates) and resource (WhatsApp Business message template via WABA), plus the key outcome that it is submitted to Meta for approval. It is clearly distinguishable from send_whatsapp_template (sending) and list/delete_whatsapp_template siblings.

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 explicit when-to-use context (first cold touch via create_sequence waTemplateName, or automations with send_whatsapp type template) and an explicit when-not/alternative case: audio headers are unsupported by Meta, so use the agent in an active conversation instead of cadence. That is exactly the routing guidance an agent needs.

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