Download media
download_mediaDownload an image, video, audio, document, or sticker attached to a WhatsApp message and return its local path using the message ID and chat JID from list_messages.
Instructions
Download the media (image, video, audio, document, sticker) attached to a message and return its local path. Use the id and chat_jid of a list_messages result whose media_type is set.
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": {
"message_id": "<message_id>",
"chat_jid": "<chat_jid>"
},
"name": "download_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_jid | Yes | chat_jid of that message | |
| message_id | Yes | id of the media message (from list_messages) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | absolute path of the downloaded file | |
| size | Yes | ||
| cached | Yes | true when the file had already been downloaded | |
| filename | Yes | ||
| media_type | Yes |