Skip to main content
Glama
Meta Business Messaging

Meta Business Messaging

whatsapp_upload_media

Upload media to WhatsApp servers so it can be reused in messages; provide a public HTTPS URL or base64-encoded bytes and a MIME type.

Instructions

Upload a media asset to WhatsApp servers so it can be reused in messages. Accepts either a public URL (downloaded server-side) or a base64-encoded payload.

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": {
      "mime_type": "<mime_type>"
    },
    "name": "whatsapp_upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
base64NoBase64-encoded file bytes (alternative to source_url)
filenameNo
mime_typeYesMIME, e.g. image/jpeg, audio/ogg, video/mp4, application/pdf
source_urlNoPublic HTTPS URL of the file to upload
access_tokenNoOptional override for the access token (falls back to WHATSAPP_ACCESS_TOKEN env)
phone_number_idNoWhatsApp Business Phone Number ID (falls back to WHATSAPP_PHONE_NUMBER_ID env)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it discloses only that URL sources are fetched server-side. It says nothing about auth requirements (the schema hints at access_token env fallback, but the description is silent), size or MIME limits, media ID lifetime/expiry, or what the call returns – and with no output schema, that return value is exactly what the agent needs to reuse the asset.

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?

Two tight sentences, purpose front-loaded and the two input modes stated second. Nothing is padded, though the second sentence is largely a restatement of schema-level facts.

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

Completeness3/5

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

For a 6-parameter mutation with no annotations and no output schema, the description covers what it does but not what the caller gets back (presumably a media ID) or any constraints on the upload. Adequate to invoke, insufficient to use the result correctly.

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?

Coverage is 83%, so the schema already documents most parameters; the description's one genuine addition is that source_url is downloaded server-side. It does not mention filename, access_token, or phone_number_id, but those carry inline schema descriptions, so a baseline 3 is appropriate.

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 and resource plus the reason for it: 'Upload a media asset to WhatsApp servers so it can be reused in messages.' The reuse framing subtly distinguishes it from the sibling send_* tools and from whatsapp_get_media/delete_media, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is only implied by 'so it can be reused in messages' – an agent can infer this is the prerequisite step before referencing a media ID in a send call. There is no explicit when-to-use/when-not guidance, and nothing tells the agent whether to upload here versus passing a URL directly to a send tool.

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