Skip to main content
Glama
@omnidim-ai/mcp-server

@omnidim-ai/mcp-server

by Omnidim

sendWhatsappMessage

Destructive

Sends text, template, image, or document WhatsApp messages from a phone number, including template messages outside the 24-hour window; set take_over to stop the agent and reply yourself.

Instructions

Send a text, template, image or document message to a customer.

It goes out from phone_number_id. Set type and the field that matches it.

Outside the 24-hour window, only a template goes through. Text, image and document sends are refused with 409 window_closed. A template send works any time and can start a new conversation.

A send does not take the conversation over, so the agent keeps answering. Set take_over: true to stop the agent and answer yourself.

Idempotency-Key is required. The same key with the same body replays the first answer instead of sending again.

(Tags: WhatsApp)

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": {
      "Idempotency-Key": "<Idempotency-Key>",
      "phone_number_id": "<phone_number_id>",
      "to": "<to>",
      "type": "<type>"
    },
    "name": "sendWhatsappMessage"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesThe customer's number in international format, such as `+15551234567`.
textNoRequired when `type` is `text`.
typeYes
mediaNoRequired when `type` is `image` or `document`.
reply_toNoA message id in the same conversation to quote. Not allowed with a template.
templateNoRequired when `type` is `template`.
take_overNoStop the agent answering this conversation and let a person run it.
Idempotency-KeyYesA unique string you choose, up to 255 characters. Required on this route. The same key with the same body replays the first answer for 24 hours instead of acting twice. A different body with the same key answers `409`.
phone_number_idYesThe number to send from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.22.0
    • addedInput schema / properties / media
      Added value: +{
      +  "description": "Required when `type` is `image` or `document`.",
      +  "properties": {
      +    "caption": {
      +      "maxLength": 1024,
      +      "type": "string"
      +    },
      +    "media_id": {
      +      "description": "The `media_id` from `uploadWhatsappMedia`, uploaded within the last 24 hours.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "media_id"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / phone_number_id
      Added value: +{
      +  "description": "The number to send from.",
      +  "type": "number"
      +}
    • addedInput schema / properties / reply_to
      Added value: +{
      +  "description": "A message id in the same conversation to quote. Not allowed with a template.",
      +  "type": "number"
      +}
    • removedInput schema / properties / requestBody
      Removed value: -{
      -  "description": "The JSON request body.",
      -  "properties": {
      -    "media": {
      -      "description": "Required when `type` is `image` or `document`.",
      -      "properties": {
      -        "caption": {
      -          "maxLength": 1024,
      -          "type": "string"
      -        },
      -        "media_id": {
      -          "description": "The `media_id` from `uploadWhatsappMedia`, uploaded within the last 24 hours.",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "media_id"
      -      ],
      -      "type": "object"
      -    },
      -    "phone_number_id": {
      -      "description": "The number to send from.",
      -      "type": "number"
      -    },
      -    "reply_to": {
      -      "description": "A message id in the same conversation to quote. Not allowed with a template.",
      -      "type": "number"
      -    },
      -    "take_over": {
      -      "default": false,
      -      "description": "Stop the agent answering this conversation and let a person run it.",
      -      "type": "boolean"
      -    },
      -    "template": {
      -      "description": "Required when `type` is `template`.",
      -      "properties": {
      -        "id": {
      -          "description": "An approved template on this number, from `listWhatsappTemplates`.",
      -          "type": "number"
      -        },
      -        "params": {
      -          "additionalProperties": true,
      -          "description": "One value per field in the template's `fields`. Keys are\nthose field keys. String, number or null values.\n",
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "id"
      -      ],
      -      "type": "object"
      -    },
      -    "text": {
      -      "description": "Required when `type` is `text`.",
      -      "maxLength": 4096,
      -      "type": "string"
      -    },
      -    "to": {
      -      "description": "The customer's number in international format, such as `+15551234567`.",
      -      "type": "string"
      -    },
      -    "type": {
      -      "enum": [
      -        "text",
      -        "template",
      -        "image",
      -        "document"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "phone_number_id",
      -    "to",
      -    "type"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / take_over
      Added value: +{
      +  "default": false,
      +  "description": "Stop the agent answering this conversation and let a person run it.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / template
      Added value: +{
      +  "description": "Required when `type` is `template`.",
      +  "properties": {
      +    "id": {
      +      "description": "An approved template on this number, from `listWhatsappTemplates`.",
      +      "type": "number"
      +    },
      +    "params": {
      +      "additionalProperties": true,
      +      "description": "One value per field in the template's `fields`. Keys are\nthose field keys. String, number or null values.\n",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "id"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Required when `type` is `text`.",
      +  "maxLength": 4096,
      +  "type": "string"
      +}
    • addedInput schema / properties / to
      Added value: +{
      +  "description": "The customer's number in international format, such as `+15551234567`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / type
      Added value: +{
      +  "enum": [
      +    "text",
      +    "template",
      +    "image",
      +    "document"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "Idempotency-Key",
      -  "requestBody"
      -]New value: +[
      +  "Idempotency-Key",
      +  "phone_number_id",
      +  "to",
      +  "type"
      +]
  2. Addedv0.19.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare the destructive write and open-world profile; the description adds genuinely new behavior beyond that: the 24-hour messaging window, the exact refusal code, template sends starting new conversations, the fact that a send does not take over the conversation, and idempotency replay semantics. This is the kind of context annotations cannot express.

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?

Four short paragraphs, each front-loaded with its most important clause: what it sends, the window constraint, the take-over behavior, and the idempotency requirement. The trailing tag is the only filler and costs almost nothing.

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 destructive, 9-parameter, nested-object send with no output schema, the description covers the rules an agent could get wrong (window, idempotency, take_over) but says nothing about what a successful send returns, such as a message id for later `reply_to` use. That is the one gap keeping it from complete.

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 89%, so baseline is 3, but the description adds the cross-field rule 'Set `type` and the field that matches it' and explains the idempotency contract (same key plus same body replays; different body returns 409) in behavioral terms. It doesn't elaborate on `reply_to`'s template incompatibility or `media` reuse window, which remain schema-only.

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?

Opens with a specific verb and resource plus the four supported message types, which immediately separates it from read-side siblings like listWhatsappMessages or getWhatsappMessage. An agent knows exactly what this tool does before reading the schema.

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 clear usage conditions: template-only outside the 24-hour window, text/image/document refused with `409 window_closed`, and `take_over: true` when a human should run the conversation. It does not name sibling endpoints (e.g. takeOverWhatsappConversation) as alternatives, so it stops short of full when-to-use routing.

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