Skip to main content
Glama

Edit a WhatsApp template

update_whatsapp_template
Destructive

Edit a WhatsApp template

Replaces the template's content, as Meta's edit does: send all of it, as for createWhatsAppTemplate, with the same rules. The name and language never change. Leave category out to keep it; Meta lets only a rejected or paused template change category. A media header sent without media_url keeps its current sample; one whose format changes needs media_url (422 template_rejected without it). A change Meta wouldn't take, such as an approved template's category or a switch between numbered and named variables, is 422 template_rejected before it reaches Meta. Only an approved, rejected or paused template can be edited (409 template_status_not_allowed), and Meta allows an approved one an edit a day and ten a month (409 template_edit_limit_reached). Content that equals what Meta holds isn't sent and spends no edit, except that an authentication template, message_send_ttl_seconds or a new media_url always counts as a change, since Meta's list doesn't show them to compare. Meta reviews every change: follow it with getWhatsAppTemplate. A template a broadcast is sending right now is 409 template_in_use_by_broadcast. It finds templates among the first 100 the list reads.

Input Schema

NameRequiredDescriptionDefault
otpNoAn authentication template's code button. A send passes the code as `otp_code` (and as the body's `{{1}}`).
bodyNo
footerNo
headerNo
buttonsNo
agent_idYesThe agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`.
categoryNoLeave it out to keep the template's category. Meta changes it only on a rejected or paused template.
template_idYesA template's `id` from `listWhatsAppTemplates`: one language version. One that isn't among the number's templates is `404 not_found`.
body_examplesNo
connection_idYesA connection of the agent. Another agent's connection is `404 not_found`.
message_send_ttl_secondsNoLeft out, the template keeps its own.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / header / properties / media_url / description
      Previous value: -"An image, video or document header's sample: an https link to a JPEG or PNG, MP4 or PDF file of up to 16 MB that answers `200` itself (no redirects), with the file's type as its `Content-Type`, from a public address. Required to create; on an edit, leave it out to keep the current sample."New value: +"An image, video or document header's sample: an https link to a JPEG or PNG, MP4 or PDF file of up to 16 MB that answers `200` itself (no redirects), with the file's type as its `Content-Type`, from a public address, or the `url` of a Mojeeb upload of this agent (`createUpload`). Required to create; on an edit, leave it out to keep the current sample."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Far beyond the annotations, it discloses immutable name/language, category-change constraints, media sample retention rules, no-op detection exceptions, per-day/per-month edit limits, review behavior, and exact error codes such as 422 template_rejected and 409 template_edit_limit_reached. The destructiveHint annotation is consistent and the description adds substantive operational context.

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 opening is front-loaded with the core replacement semantics, and most sentences carry operational rules that an agent needs. It is dense and reads as one long block, but for a destructive mutation with multiple Meta-specific constraints the length is largely justified.

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?

Given 11 parameters, nested objects, destructive behavior, no output schema, and Meta-specific constraints, the description covers eligibility, error cases, edit limits, no-op behavior, and follow-up via getWhatsAppTemplate. An agent has enough context to invoke it correctly and interpret common failure modes.

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 55%, so the description must compensate. It adds real meaning for key fields: category omission keeps the current category, media header changes may require media_url, and message_send_ttl_seconds or a new media_url always counts as a change. It leaves many nested OTP/button/body details to the schema, which are well described there.

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 opening states a specific verb and resource ('Edit a WhatsApp template') and immediately clarifies replacement semantics: 'Replaces the template's content... send all of it'. This distinguishes it clearly from create, delete, and list 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?

It gives strong eligibility and when-not guidance: only approved/rejected/paused templates can be edited, category changes are restricted, and broadcast-in-use edits are rejected. It references createWhatsAppTemplate and getWhatsAppTemplate, but does not explicitly route the agent to create_whatsapp_template or delete_whatsapp_template as alternatives.

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