Skip to main content
Glama
whatsapp-mcp

whatsapp-mcp

by OmarYousef95

Send WhatsApp message

send_message

Send WhatsApp messages from your personal account to a contact, phone number, or yourself. Supports plain text, local files, or files with captions, with recipient validation.

Instructions

Send a WhatsApp message from the user's personal account: plain text, a local file (image, video, or document), or a file with a caption. recipient accepts: a contact name (must match EXACTLY one saved contact, case-insensitive — if zero or several match, the call fails and lists the candidates so you can ask the user which one they meant), a phone number in international format (e.g. +962791234567), or 'me' to message the user's own self-chat. A phone number that isn't a saved contact is refused on the first call — the error asks you to confirm with the user, then call again with confirmed: true; this exists because a saved contact's name can collide with an unrelated WhatsApp account (e.g. someone's self-set display name), so a bare number deserves the same caution. Provide message, file_path, or both — when both are given, message becomes the file's caption. Media type is auto-detected from the file's extension; unrecognized extensions are sent as a generic document. The result confirms exactly who/what was sent. Never retry a failed send blindly — read the error, it tells you what to fix. Sending is a real-world side effect: unless the user explicitly dictated both the recipient and the exact message/file, confirm with them before calling this.

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": {
      "recipient": "<recipient>"
    },
    "name": "send_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
messageNoThe text message to send. Required unless file_path is given; when both are given, this becomes the file's caption.
confirmedNoRequired (set to true) to send to a phone number that is not a saved contact. Omit on the first attempt; only set this after the user has explicitly confirmed that number is correct.
file_pathNoAbsolute local path to an image, video, or other file to send. Media type is auto-detected from the extension; unrecognized extensions are sent as a generic document.
recipientYesContact name (exact match), international phone number, or 'me'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the real-world side effect, the exact-match contact resolution rule and its failure behavior (error lists candidates), the first-call refusal for non-saved numbers plus the confirmed:true remedy, and that the result reports exactly who/what was sent. It even explains the rationale for the phone-number caution.

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 core action, then layered recipient rules, then the safety caveat. Dense and largely waste-free, though the long nested parenthetical about display-name collisions and the mid-sentence confirmed:true recipe make it slightly sprawling for a single tool description.

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?

For a 4-parameter side-effecting tool with no annotations and no output schema, everything an agent needs is present: payload rules, recipient resolution, the confirmation gate, error-recovery guidance, and a statement of what the result confirms. No significant gap remains.

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 baseline is 3, but the description adds genuine meaning: recipient's three accepted forms with exact-match and case-insensitivity rules, the 'me' self-chat option, the message-becomes-caption interaction when both are supplied, and the omit-then-set sequence for confirmed. It mostly mirrors schema text but the candidate-listing and sequencing behavior is extra.

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?

Opening clause names the specific verb (send), the resource (WhatsApp message), the account context (user's personal account), and the three supported payload shapes (text, file, file+caption). It is clearly distinct from siblings like read_messages and search_contacts, which are read/lookup operations.

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 states the confirmation prerequisite before calling ('unless the user explicitly dictated both the recipient and the exact message/file, confirm with them'), the two-step flow for unconfirmed phone numbers, and the anti-pattern 'never retry a failed send blindly'. It also directs the agent to ask the user when a contact name is ambiguous.

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