Skip to main content
Glama
Sealjay

mcp-whatsapp

by Sealjay

download_media

Idempotent

Download and decrypt media from a WhatsApp message. Saves the file locally and returns the path. For images and audio under 5 MiB, also returns the content inline for viewing or playback.

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. For image and audio downloads at most 5 MiB, the decrypted bytes are ALSO embedded in the tool result as an ImageContent or AudioContent block so remote MCP clients can view or hear the payload without accessing the daemon's filesystem. Videos and documents are not embedded (too large or not renderable inline). 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} as the first content block, followed by an optional ImageContent/AudioContent block for renderable media.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_jidYesWhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`
message_idYesWhatsApp message ID of a media message (use `message_id` from list_messages)
output_pathNooptional 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
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses key behaviors beyond annotations: idempotency, no notification, embedding for small image/audio, file writing to cache or output_path. No contradiction with annotations; adds value by explaining side effects and return format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is well-structured, starting with main action, then details. At ~200 words, it is comprehensive without being excessively verbose. Each sentence adds value for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given complexity and no output schema, description sufficiently covers prerequisites, behavioral nuances, return format (JSON + optional content block), and side effects. Minor gap: could explicitly state that media must be previously cached, but overall complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% but description adds meaning: specifies JID formats for chat_jid, links message_id to list_messages, and clarifies output_path constraints (under media root, parent dir must exist, idempotent on file existence). Enhances understanding beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action: fetching encrypted media payload, decrypting, writing to a local file, and returning absolute path. It distinguishes from siblings by focusing on downloading media from cached messages, unlike sending or managing tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context: prerequisite that message must contain media, recommends using list_messages to get media message IDs. Notes that videos/documents are not embedded, guiding users to alternative access. Lacks explicit alternatives but sufficiently contextualizes when to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sealjay/mcp-whatsapp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server