Skip to main content
Glama

download_media

Idempotent

Retrieves the stored file for a WhatsApp message by reusing a verified local copy or downloading it through the bridge into downloads_dir; expired media may require a new phone request.

Instructions

Get the file for one stored message. Reuses a verified local copy or downloads through the bridge into downloads_dir. Expired media may need a new phone request and up to 40 seconds. Returns chat, msg_id, kind and path. Use transcribe_chat_audio for speech or download_chat_media in the media toolset for a batch.

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": {
      "chat": "<chat>",
      "message_id": "<message_id>"
    },
    "name": "download_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesChat JID from list_chats (15550100001@s.whatsapp.net or 120363000000001@g.us), international phone number or chat name.
accountNoAccount name from list_accounts, such as work. Omit to use the default account.
message_idYesOpaque id from list_messages in this chat, such as ABC123. Copy it exactly.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • changedInput schema / properties / account / description
      Previous value: -"Account from list_accounts when several WhatsApp numbers are set up; default: default"New value: +"Account name from list_accounts, such as work. Omit to use the default account."
    • addedInput schema / properties / chat / description
      Added value: +"Chat JID from list_chats (15550100001@s.whatsapp.net or 120363000000001@g.us), international phone number or chat name."
    • addedInput schema / properties / message_id / description
      Added value: +"Opaque id from list_messages in this chat, such as ABC123. Copy it exactly."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare idempotency, non-destructiveness and open-world access, so the bar is lower; the description still adds genuine behavior the annotations cannot convey. It discloses that a verified local copy is reused rather than re-fetched, that output lands in downloads_dir, and that expired media may require a new phone request with up to 40 seconds of latency. Return fields are also named, which is slightly redundant given the output schema.

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?

Four short sentences, front-loaded with the core action, then behavior, then return shape, then alternatives. No filler and no repetition of the tool name or title.

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?

For a three-parameter download tool with an output schema and full annotation coverage, everything an agent needs is present: what it fetches, where output goes, cache behavior, latency/failure mode, and which siblings to use instead. Return values need only be named because the output schema exists.

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 100%, so chat, account and message_id are already fully documented with examples (JID formats, 'Omit to use the default account', 'Copy it exactly'). The description adds no format hints, constraints, or cross-parameter relationships beyond the schema, which matches the baseline 3 when the schema does the heavy lifting.

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 ('Get the file for one stored message') and immediately scopes it to a single message's attachment. It also distinguishes itself from near-neighbors by naming transcribe_chat_audio (speech) and download_chat_media (batch), so an agent can route correctly without opening schemas.

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?

Explicitly routes the agent away from this tool in two concrete cases: use transcribe_chat_audio for speech and download_chat_media for batches. It also flags the expired-media path (may require a new phone request), which is a real usage consideration, though it does not say when to prefer get_message_context or get_chat metadata-only reads.

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