Skip to main content
Glama

wa_send_document

Send a local or URL-based document to a WhatsApp number or group JID, optionally setting the displayed file size without altering the file.

Instructions

Send a document (local file) to a user number or group JID. Optional file_length (bytes) overrides the size WhatsApp displays for the document — the file itself is sent unchanged (used by the -fakedoc prank).

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

Input Schema

NameRequiredDescriptionDefault
toYesPhone number (e.g. 923001234567), or full JID ...@g.us
urlNoFile URL to fetch and send (alternative to file_path)
file_nameNoName shown for the document (default: the file base name)
file_pathNoAbsolute path of the local file to send
file_lengthNoDisplayed size in bytes (display only; does not change the file)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

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 behavioral burden. It usefully discloses that file_length only changes the displayed size and not the underlying file, which is valuable non-obvious behavior. It does not mention permissions, delivery behavior, rate limits, or whether sending is 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?

The description is two compact sentences and front-loads the core action. The parenthetical prank context is slightly distracting but still short and not harmful.

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 send operation with a fully described schema, the definition is adequate but not rich. It leaves out delivery semantics and the choice between file_path and url, which matter when invoking a messaging action with no annotations.

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 the schema already documents all five parameters. The description adds some meaning by explaining the display-only nature of file_length, but its 'local file' framing does not account for the url parameter that the schema exposes.

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?

The description states a specific action and resource: sending a document to a user number or group JID. It is clearly distinguishable from text, image, audio, and video sending siblings, though the parenthetical 'local file' slightly conflicts with the schema's URL option.

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?

The intended use is implied by 'send a document,' and the target formats are mentioned. However, it does not explicitly say when to choose this over wa_send_image or explain the file_path versus url alternatives, leaving routing largely to the parameter names.

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