Upload WhatsApp media
upload_mediaUploads a local or public HTTPS media file to WhatsApp and returns a media_id for reuse when sending media messages.
Instructions
Upload a media file to WhatsApp and get back a media_id you can reuse in send_media_message. Provide exactly one of file_path (a local file) or url (a remote file to fetch). file_path only works when the server is configured with WHATSAPP_UPLOAD_DIR and the file lives inside it; url must be a public https:// URL. The MIME type is inferred from the file extension when not given. Max 100MB.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public https:// URL to fetch and upload | |
| file_path | No | Path to a local file inside WHATSAPP_UPLOAD_DIR to upload (disabled if that env is unset) | |
| mime_type | No | MIME type, e.g. image/jpeg (inferred if omitted) |