download_media
Decrypts and saves media (image, video, audio, document) from a WhatsApp message to a local file. Returns the absolute path of the saved file.
Instructions
Fetch the encrypted media payload (image, video, audio, document) for a previously-cached message, decrypt it, and write it to a local file under the store directory; returns the absolute path. Optionally also writes the decrypted file to output_path, which must live under the configured media root (WHATSAPP_MCP_MEDIA_ROOT, default <store>/uploads/). No notification is sent to the sender or chat. Idempotent — repeated calls for the same message return the cached file path. Prerequisite: the message must contain media; use list_messages to find media message IDs. Returns a JSON object {Success, Message, MediaType, Filename, Path}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_jid | Yes | WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us` | |
| message_id | Yes | WhatsApp message ID of a media message (use `message_id` from list_messages) | |
| output_path | No | optional absolute path under the configured media root (`WHATSAPP_MCP_MEDIA_ROOT`, default `<store>/uploads/`); parent directory must exist; calls are skipped if the file already exists; omit to write only to the daemon cache |