send_message
Sends WhatsApp text or media messages to a phone number or JID, with optional quoted replies for context.
Instructions
Send a WhatsApp text or media message (image/video/audio/document). Optionally quote a message with reply_to. Returns {ok,data,error}. If not paired: run node dist/cli.js pair.
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
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient: phone number like +911234567890, or a JID (…@s.whatsapp.net, …@g.us). | |
| text | No | Message text. Required unless media_path is given; used as caption if no caption. | |
| caption | No | Caption for image/video/document (audio sends it as a follow-up text). | |
| reply_to | No | Message id to quote as a reply (must be in the recent-message cache). | |
| media_path | No | Absolute path to a local image/video/audio/document to send. |