Skip to main content
Glama

Send a photo, video, voice note or file

send_media
Destructive

Send media over WhatsApp from a public URL or base64 data. type chooses the format: image and video support a caption; document uses fileName; ogg/opus audio becomes a voice note. Other audio formats become playable attachments. Files are limited to 16 MB. Prefer url for large files. Counts as one message.

With pacing on, media to one person waits unless they messaged this number in the last 24 hours. The answer carries status: "queued" and scheduledAt. Known contacts still wait. The file is fetched when the message's turn comes, so a url must remain reachable until then.

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": {
      "to": "<to>",
      "type": "<type>"
    },
    "name": "send_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesRecipient: a phone number in international format (+5511988887777) or a WhatsApp address (5511988887777@s.whatsapp.net, an @lid contact, or a @g.us group).
urlNoPublic https URL of the file. It is the better option. We stream the download and forward the bytes, so the size of the file never rides in your request.
fromNoWhich of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.
typeYesWhich kind of media bubble to send.
base64NoThe file as base64, bare or as a `data:<mime>;base64,…` URI. Base64 inflates a request by a third, so prefer `url` for anything but small files.
captionNoText shown under the media. Images and videos only. WhatsApp has no caption field for documents or audio.
secondsNoVoice notes: duration, so the bubble shows the right length.
fileNameNoDocuments: the filename WhatsApp shows on the bubble.
humanizeNoWhether to come online, read the recipient's last message and show a typing indicator before sending. On by default, which adds a few seconds. false skips those steps, not the send queue. Configure each part per number with update_number.
mimeTypeNoOverrides the detected content type, e.g. `image/webp`.
skipQueueNoSend immediately instead of waiting in this number's queue. Only for a message the recipient expects right now, such as a login code or a confirmation they requested. This bypasses the configured spacing, so using it for outreach can create bursts and increase the risk of a ban. Default: off.
idempotencyKeyNoYour own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the generic write/open-world/destructive profile; the description goes well beyond them with a 16 MB cap, the pacing rule that media to one person waits unless they messaged in the last 24 hours (including for known contacts), the returned `status: "queued"` / `scheduledAt`, and the crucial timing constraint that a `url` is fetched only when the message's turn comes. It also notes the send counts as one message and that `humanize` adds latency by default.

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 paragraphs, front-loaded with what the tool does, then a separate paragraph for the pacing/queue caveat. Nearly every sentence carries distinct information; the 'Prefer `url` for large files' line mildly duplicates the schema's base64 note, which keeps it from a 5.

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 12-parameter send tool with no output schema, the definition covers sourcing, size limit, per-type behavior, queue semantics, the shape of the answer (status/scheduledAt), and the ban trade-off of `skipQueue`. An agent has enough to call it correctly and interpret the result without guessing.

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; the description still adds cross-parameter meaning the schema cannot express — which fields apply to which `type` (caption for image/video, fileName for documents, seconds for voice notes) and the downstream consequence that `url` must stay reachable until dequeue. It stops short of restating individual formats like idempotency windows, which the schema already covers.

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 ('Send media over WhatsApp') plus the two accepted sources (public URL or base64) and how `type` maps to bubble behavior ('ogg/opus audio becomes a voice note'). An agent can immediately tell this apart from text-based siblings such as send_message or send_location.

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

Usage Guidelines5/5

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

Gives explicit selection rules: 'Prefer `url` for large files', ogg/opus audio for voice notes vs other audio formats becoming attachments, and a narrow, named condition for `skipQueue` ('only for a message the recipient expects right now, such as a login code'). It also warns what happens when the guidance is ignored (bursts and ban risk).

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