Skip to main content
Glama

Get Media

wa_get_media
Read-only

Fetch the attachment (image/video/audio/document/sticker) a received message carried. A small attachment comes back as base64 in media_base64; a large one comes back as media_url, a time-limited link to GET the bytes. Use the message_id from wa_list_messages. 'refused' means no retrievable media for that id.

Input Schema

NameRequiredDescriptionDefault
account_idNothe account that received the message, from wa_list_accounts; omit it when the workspace has only one account
message_idYesthe message id whose attachment to fetch, from wa_list_messages (a WhatsApp message id, or on a Telegram account one of the form <chat>_<n>)

Output Schema

NameRequiredDescriptionDefault
mimeNo
sizeNothe attachment size in bytes
statusYesok (media returned, inline or as a url) or refused
refusalNo
media_urlNoa time-limited (1h) URL to GET a large attachment's bytes, present instead of media_base64 when the attachment is over the inline cap
media_base64Nobase64 of the attachment, present for a small attachment

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / refusal / properties / account_status / description
      Previous value: -"when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked"New value: +"when the number is not working: its status — starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked"
  2. Changed3 schema fields changed
    • changedInput schema / properties / account_id / description
      Previous value: -"the account that received the message, from wa_list_accounts"New value: +"the account that received the message, from wa_list_accounts; omit it when the workspace has only one account"
    • changedInput schema / required
      Previous value: -[
      -  "account_id",
      -  "message_id"
      -]New value: +[
      +  "message_id"
      +]
    • addedOutput schema / properties / refusal / properties / candidates
      Added value: +{
      +  "description": "on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the id to retry with as account_id",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "the account's WhatsApp display name",
      +        "type": "string"
      +      },
      +      "phone": {
      +        "description": "the account's phone number, E.164",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / message_id / description
      Previous value: -"the WhatsApp message id whose attachment to fetch, from wa_list_messages"New value: +"the message id whose attachment to fetch, from wa_list_messages (a WhatsApp message id, or on a Telegram account one of the form <chat>_<n>)"
  4. Changed4 schema fields changed
    • changedOutput schema / properties / media_base64 / description
      Previous value: -"base64 of the attachment, present when status is ok"New value: +"base64 of the attachment, present for a small attachment"
    • addedOutput schema / properties / media_url
      Added value: +{
      +  "description": "a time-limited (1h) URL to GET a large attachment's bytes, present instead of media_base64 when the attachment is over the inline cap",
      +  "type": "string"
      +}
    • addedOutput schema / properties / size
      Added value: +{
      +  "description": "the attachment size in bytes",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / status / description
      Previous value: -"ok (media returned) or refused"New value: +"ok (media returned, inline or as a url) or refused"
  5. Changed3 schema fields changed
    • addedOutput schema / properties / refusal / properties / account_status
      Added value: +{
      +  "description": "when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / account_status_reason
      Added value: +{
      +  "description": "the detail of account_status, e.g. no_egress, stopped, no_plan",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / since
      Added value: +{
      +  "description": "when the number stopped working, RFC3339, when known",
      +  "type": "string"
      +}
  6. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/idempotentHint annotations by disclosing the size-dependent return contract: small attachments arrive as base64 in media_base64, large ones as a time-limited media_url to GET separately. It also defines the 'refused' failure semantic, which is the kind of thing an agent otherwise discovers only by trial.

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?

Three short sentences: what it fetches, how the payload varies by size, and the failure case. Front-loaded with the core action and free of repetition or filler.

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 an output schema present the description need not document return fields, yet it still covers the branching payload shape and the refusal case. Combined with annotations and full schema coverage, an agent has everything needed to call it and interpret the result.

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 coverage is 100%, so both parameters are already documented, including the account_id omission rule and the Telegram id format. The description reinforces that message_id comes from wa_list_messages but adds no syntax or format detail the schema lacks, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb (fetch) and resource (the attachment a received message carried), and enumerates the media kinds covered, so an agent knows this is binary retrieval rather than message text. It never names the obvious sibling wa_get_message, leaving the attachment-vs-message-body distinction implicit.

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 a concrete prerequisite chain by telling the agent to use the message_id from wa_list_messages, and pre-empts the most likely confusing outcome by defining what 'refused' means. No explicit when-not-to-use or named alternative is provided.

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.

Resources