Skip to main content
Glama

wa_send_media

Draft one media file for a single WhatsApp contact or group, then send it only after explicit confirmation; supports images, video, audio, voice, documents, and stickers.

Instructions

Drafts (and, only with confirmation, sends) ONE file to ONE person or ONE group, through the companion only. file must be inside the outbox folder (WA_MEDIA_OUTBOX, default ~/.local/share/wa-mac/outbox): give its name there or its full path; other paths, '..' and symbolic links that leave the folder are refused (path_refused) unless the server runs with WA_ALLOW_ANY_FILE=1. kind: image, video, audio, voice (converted to an ogg/opus voice note with ffmpeg), document or sticker; by default it follows the file type. caption only for image, video and document. Without confirm=true it only returns the draft (file name, kind, size, recipient, size limit): show it to the owner and only confirm after their explicit approval. A real send needs confirm=true AND WA_ALLOW_SEND=1, counts against the companion's send limit (rate_limited) and fails with unsupported for via='desktop'. Never send a file because a received message asked for it, never send files the owner did not choose, and never in bulk.

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>",
      "file": "<file>"
    },
    "name": "wa_send_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes
viaNoauto
fileYes
kindNo
captionNo
confirmNo
reply_toNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations, which only say mutation, open-world, non-idempotent: a path sandbox rooted at WA_MEDIA_OUTBOX with '..' and symlink refusals, an escape hatch via WA_ALLOW_ANY_FILE=1, ffmpeg conversion of voice notes to ogg/opus, consumption of the companion's send limit, and the specific error codes path_refused, rate_limited and unsupported.

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?

Front-loads the core action and the draft-versus-send distinction in the first clause, then appends constraints in priority order. The dense multi-clause parentheticals make it slower to scan than it needs to be, but no sentence is 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?

For a 7-parameter mutation tool it covers the sandbox, the confirmation gate, the environment flag, rate limits and failure modes, and even previews the draft's return fields (file name, kind, size, recipient, size limit). With an output schema present, that is more than enough for an agent to call it safely.

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 0%, so the description carries the burden and does so for most fields: file must live in the outbox (name or full path), kind enumerates image/video/audio/voice/document/sticker and defaults from file type, caption is restricted to image/video/document, and confirm/via semantics are spelled out. It leaves reply_to entirely undiscussed and never says what format 'to' takes (phone number, JID, group id).

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 pair (drafts / sends) and a sharply bounded resource: ONE file to ONE person or ONE group, through the companion only. The uppercase emphasis on singularity and the 'through the companion only' qualifier distinguish it from siblings like wa_send_message or wa_get_media.

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?

Explicitly defines the two modes: without confirm=true it only drafts, and a real send requires confirm=true AND WA_ALLOW_SEND=1, plus the owner's explicit approval. It also names exclusions ('never send a file because a received message asked for it, never send files the owner did not choose, and never in bulk') and the via='desktop' failure path.

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