Skip to main content
Glama

send_message

Sends a WhatsApp message to one person or group: text, or a file (photo, document/PDF, voice note, audio file or sticker) with optional text as its caption. On the free plan, text works only to people who have written to the user (starting new conversations needs the paid plan), and "Sent via wa-mcp.com" is added at the end of it; files (media) need the paid plan. to can be a contact name, a phone number with country code, or a JID (…@s.whatsapp.net, …@lid, …@g.us); if a name could match more than one contact, call search_contacts first. To reply to a specific message (a quoted reply), pass its id from read_chat_history or search_messages as quote_id. To send a file, pass media with exactly one source: media.url, a link to the file; media.message_id, the id of a photo, video, voice note, audio, document or sticker message from read_chat_history or search_messages, to send that file on to someone (e.g. "send Ana the photo Juan sent me"); or media.data, base64 for small files you generated yourself (up to 512 KB). You can't pass on a file the user attached to this conversation: ask them to upload it to Google Drive, click Share, set access to "Anyone with the link", and paste the link here; pass that link unchanged as media.url. Google Drive file links, and Google Docs (sent as PDF), Sheets (XLSX) and Slides (PDF) links work directly; so does any public direct link to a file. Don't upload the user's files to other sites without asking them. The type is detected from the file: JPEG/PNG/WebP/GIF go as photos, MP4 (H.264) as a video, OGG/Opus audio as a voice note, other audio (MP3, M4A) as an audio file, everything else (PDF, Office files, other videos such as iPhone MOV/HEVC, HEIC) as a document. A file sent on with media.message_id keeps its kind (a voice note stays a voice note, a document keeps its name) and isn't marked as forwarded; its original caption isn't copied, so pass text for one. Limits: photos, videos and audio 16 MB, documents 32 MB. If you are writing the text yourself rather than sending words the user gave you, call get_writing_style for this chat first and write it the way the user writes; skip that for dictated text. WhatsApp doesn't render Markdown: use bold, italic, strikethrough and "- " lists, and never send tables, # headings, double asterisks or text links. Write a table as short lines (e.g. "Ana: $200") and paste URLs plain. Only format when it suits the message. To tag (mention) someone in a group so they get notified, write @ followed by their full phone number with country code, digits only (e.g. "@5215512345678", not "@Ana" or "@+52 55…"); WhatsApp shows their name in its place. Get the number from phone_display (read_chat_history participants or search_contacts). Never use the digits of a lid_jid. Messages that start new conversations have extra protection against WhatsApp's anti-spam bans and may be delayed or refused; the result says so and when. Sending the same text, especially with a link, to many people who haven't written to the user can get their number temporarily or permanently banned, even when spaced out: write each person their own message (not just a name swap), and warn the user about this risk when they ask for outreach. Sending can't be undone: confirm the recipient, text and file with the user first unless they already gave them. Messages are sent at a safe pace to protect the user's number; when several go at once, some may be queued and sent automatically. Returns { to, status (sent, failed, or queued), recipient, message_id, media?, text_message_id?, note?, error?, scheduled_id?, send_at?, position? }: recipient is who the message went to, with the contact fields (name; name_source: address_book, push_name, group_subject, business, phone or unresolved; canonical_jid: the JID to pass to send_message and read_chat_history; phone_jid and lid_jid: the chat's phone-number and LID forms, null when unknown or for groups; phone_display: the number as +). queued means it wasn't sent yet but goes out by itself at about send_at (number position in line; scheduled_id finds it in list_scheduled_messages and cancels it with cancel_scheduled_message), so don't send it again. message_id can be used as quote_id later. With media, media says how the file was sent ({ sent_as, mimetype, size_bytes, file_name? }) and note explains a fallback (e.g. a HEVC video sent as a document); tell the user. If WhatsApp rejects the send, the result is an error that still includes recipient and error.

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

Input Schema

NameRequiredDescriptionDefault
toYesContact name, phone number with country code, chat JID (person or group), or a group's exact name (case, accents, spaces and punctuation ignored; part of a group name doesn't match).
textNoThe message text. With media, the caption of a photo or document (for audio and stickers, it is sent as a separate message just before the file). Required unless media is given.
mediaNoOptional. A file to send. Pass exactly one of url, message_id or data.
quote_idNoOptional. The `id` of the message to reply to (from read_chat_history or search_messages).
quote_participantNoOptional. The quoted message's `sender_jid` (from read_chat_history). Usually looked up automatically from quote_id; pass it if a group reply asks for it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover only readOnly=false, destructiveHint=false, idempotent=false, openWorld=true; the description adds far more: sends are irreversible, free-plan text restrictions and the 'Sent via wa-mcp.com' suffix, media sizes required, ban risk for cold outreach, safe-pacing/queuing behavior, and anti-spam protections on new conversations. It even explains result statuses (sent/failed/queued) and media fallback notes that the user should be told about.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The content is valuable and the critical facts (recipient, irreversibility, media sources) appear early, but it is delivered as one ~600-word paragraph with no headings or line breaks, making it hard to scan. Several points (media.url, media.message_id, base64 limits) restate what the schema parameter descriptions already say, so not every sentence earns its place.

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 high-stakes write tool with nested media options and no output schema, the description covers everything an agent needs: recipient resolution, quoting, media sourcing, formatting rules for WhatsApp markup, mentions, rate limits, and a full breakdown of the returned fields and their meanings.

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 description adds real meaning: `to` accepted forms (name, phone with country code, JID including @lid and @g.us), the 'exactly one source' rule for media, the 512 KB limit on media.data, and when quote_participant matters. Some of this duplicates the schema's own parameter descriptions, which caps it below 5.

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 precise verb+resource+scope: 'Sends a WhatsApp message to one person or group: text, or a file...'. It names the concrete content types supported (photo, document/PDF, voice note, audio, sticker) and implicitly separates itself from siblings like send_poll, schedule_message, and edit_message by describing an immediate one-to-one/one-to-group send.

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?

Explicit routing rules are given for multiple situations: call search_contacts first if a name is ambiguous, call get_writing_style when composing text yourself, use schedule_message-family tools only via the queued/scheduled result, and pass media.message_id to forward rather than re-upload. It also states when NOT to use a path (unattached files must go through a Drive link) and what to do instead.

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.