Skip to main content
Glama
WhatsApp Messaging API by Retention Stack

WhatsApp Messaging API by Retention Stack

send_file

Send a file (PDF, document, etc.) to a contact, group, or channel via a public URL.

Instructions

Send a file (PDF, document, etc.) to a contact, group, or channel via a public URL.

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": {
      "chatId": "<chatId>",
      "fileUrl": "<fileUrl>"
    },
    "name": "send_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatIdYesRecipient: phone number, group ID, or channel ID
fileUrlYesPublic URL of the file
sessionNoSession name. Leave out when using a session token (ch_live_...).me
filenameNoFilename to display in the chat

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.0.1
    • addedInput schema / properties / session / default
      Added value: +"me"
    • changedInput schema / properties / session / description
      Previous value: -"Session name"New value: +"Session name. Leave out when using a session token (ch_live_...)."
    • changedInput schema / required
      Previous value: -[
      -  "session",
      -  "chatId",
      -  "fileUrl"
      -]New value: +[
      +  "chatId",
      +  "fileUrl"
      +]
  2. First observedv1.0.3

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose one real constraint — the file must be reachable via a public URL, so local paths will not work — but says nothing about session/auth requirements, size limits, failure behavior, or whether the send is immediate and irreversible.

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?

A single efficient sentence with no filler, front-loading the action and medium. The trailing 'etc.' is slightly vague but costs little.

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 simple 4-parameter action tool with a fully described schema and no output schema, the definition is adequate but thin: it omits the session/token context that the 'session' parameter implies and gives no indication of what a successful call returns or how failures surface.

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 all four parameters (chatId, fileUrl, session, filename) are already documented with formats and defaults. The description merely echoes the recipient types the schema already explains and adds no new meaning about accepted ID formats or filename defaults.

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 ('Send a file') plus the delivery channel types (contact, group, channel) and file kinds (PDF, document). An agent can distinguish it from send_image and send_text_message by medium, 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: the parenthetical '(PDF, document, etc.)' suggests non-image attachments, which weakly separates it from send_image. There is no explicit when-to-use/when-not guidance and no prerequisite such as an active session or paired account.

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