send_file
Upload and send a media file (image, video, document, or raw audio) to a WhatsApp recipient. Returns the message ID on success.
Instructions
Upload and send a picture, video, document, or raw audio attachment via WhatsApp; the recipient sees a media message and the outgoing row is persisted to the local cache. Reversible via delete_message (revoke). For voice notes use send_audio_message (which transcodes to ogg/opus); for plain text use send_message. Returns a JSON object {Success, Message, ID} where ID is the WhatsApp message ID on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caption | No | optional caption for image/video/document submessages; ignored for raw audio | |
| mark_chat_read | No | if true, also ack recent incoming messages in the chat to clear the unread badge (defaults to false) | |
| media_path | Yes | absolute path to the media file; must sit under the configured media root (`WHATSAPP_MCP_MEDIA_ROOT`, default `<store>/uploads/`) | |
| recipient | Yes | Send target: digits only (E.164 without `+`, no spaces or punctuation); or `<digits>@s.whatsapp.net`; or group `<digits>-<timestamp>@g.us` | |
| view_once | No | if true, mark image/video/audio submessages as view-once; silently ignored for documents (defaults to false) |