Skip to main content
Glama

whatsapp_get_media

Read-onlyIdempotent

Get a short-lived (15 min) HTTPS link to the media of one message (photo, voice note, audio, video, document) from LOCAL history. Requires message_id and chat (the chat JID, from whatsapp_messages). Returns { url, mime, size, name, expires_at }. The file is copied as-is to private storage for 7 days; ask again for a fresh link. On failure returns { success:false, error }: not_found (no media for that message), media_expired (WhatsApp no longer has the file), too_large (> 16 MB), unsupported_type, unsupported.

Bulk support: accepts message_ids for batched execution.

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": "<chat>"
    },
    "name": "whatsapp_get_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYes
accountNo
message_idYes
message_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare a safe read (readOnlyHint, idempotentHint, destructiveHint=false), yet the description still adds real value: 15-minute link lifetime, a 7-day private-storage copy, and the failure taxonomy (not_found, media_expired, too_large at 16 MB, unsupported_type, unsupported). Fails to say what happens with partial failures in batch mode or whether retrieval touches the network for expired media.

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

Conciseness5/5

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

Front-loads the purpose and expiry constraint, then the prerequisites, then the return shape and error taxonomy, closing with the bulk note. Every clause carries actionable information, and the error enumeration is compact enough to justify its space.

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?

With no output schema, the description supplies the return shape ({ url, mime, size, name, expires_at }) and the error shape, which is exactly what an agent needs. The remaining gap is the undocumented account parameter and undefined batch behavior on partial failure.

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

Parameters3/5

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

Schema description coverage is 0%, so the description carries the full burden. It explains message_id, chat (as a JID sourced from whatsapp_messages) and message_ids for batching, but the fourth parameter, account, is never mentioned, leaving its meaning and multi-account semantics undocumented.

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?

States a specific verb and resource with scope: an HTTPS link to the media of one message, enumerated types (photo, voice note, audio, video, document), scoped to LOCAL history. Clearly distinguishable from siblings like whatsapp_send_media and whatsapp_transcribe_media without opening either schema.

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?

Gives concrete prerequisites (requires message_id and chat, the chat JID obtainable from whatsapp_messages) and explains the re-request path ('ask again for a fresh link') plus the bulk alternative via message_ids. Lacks an explicit when-not-to-use statement or a named sibling for a true alternative flow.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.