Skip to main content
Glama
Automata MCP

Automata MCP

Download WhatsApp media

download-whatsapp-media
Read-onlyIdempotent

Downloads photos, videos, voice notes, audio, documents, or stickers from a WhatsApp message by chat ID and message ID, returning small files inline or a temporary URL.

Instructions

[WhatsApp] Download the file a WhatsApp message carries — a photo, video, voice note, audio file, document or sticker. Pass the chat jid and the message id, exactly as read-messages returned them; read-messages marks such messages with hasMedia, mediaType, mimetype and, when known, fileName and fileSize. Images come back as images and other files as embedded files, when small enough; a larger file comes back as a url that works for ten minutes when fetched with this connection's Authorization header, and only for this token (a client that puts the token in the URL path cannot follow it: use inline). delivery chooses: auto (default) inlines small files, url always returns a link (the file is fetched when the link is followed), inline never does. View-once media is not downloadable. Old media may have expired on WhatsApp's servers; it can then be fetched only while the phone is online. Fetch only what the task needs: each download — inline, or a link followed — fetches the file again.

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": {
      "jid": "<jid>",
      "messageId": "<messageId>"
    },
    "name": "download-whatsapp-media"
  }
}

Input Schema

NameRequiredDescriptionDefault
jidYesChat identifier from list-chats or read-messages, exactly as returned
reasonNoOne sentence: why you are calling this tool, i.e. what the user asked for. Do not include names, contact details, message text or other personal data.
deliveryNoauto: inline when small, else a signed URL. inline: never a URL. url: always a URL.auto
messageIdYesThe message `id` from read-messages

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses return shapes (images back as images, small files embedded, large files as a URL valid ten minutes and bound to this token/Authorization header), the token-in-URL limitation, the view-once exclusion, the expired-media-requires-phone-online caveat, and that each fetch re-downloads. This is unusually rich behavioral context for a readOnly tool.

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?

The purpose is front-loaded and every clause carries information, but the single dense paragraph packs return-format, auth, expiry and cost caveats into long run-on sentences that would read better split into short blocks. Nothing is redundant, just tightly compressed.

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

Completeness5/5

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

With no output schema, the description fully compensates by describing return values, URL TTL and auth requirements. For a four-parameter read that depends on read-messages output, the agent has everything needed to call it correctly and interpret the result.

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%, so the baseline is 3, but the description adds real meaning: it explains what jid/messageId must be (values returned by read-messages) and elaborates the delivery semantics, including that a followed URL re-fetches and that clients unable to send the auth header should choose inline.

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?

Opens with a specific verb and resource ('Download the file a WhatsApp message carries') and enumerates the media kinds it covers (photo, video, voice note, audio, document, sticker). It also anchors the inputs to read-messages, making it clearly distinguishable from the read-messages and send-* siblings.

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?

Tells the agent to pass jid and messageId exactly as read-messages returned them, explains when to pick each delivery mode, and explicitly excludes view-once media. It also warns to fetch only what the task needs because every download re-fetches. It does not explicitly route to an alternative tool when media is undownloadable, but the exclusions are clear.

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