Skip to main content
Glama
ExoCubeYT

OpenWA MCP Server

by ExoCubeYT

send_bulk_text

Send the same text message to multiple WhatsApp recipients at once by specifying the session, chat IDs, and message content.

Instructions

Send the same text message to multiple WhatsApp recipients at once

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID to send from
recipientsYesArray of chat IDs to send to
textYesMessage text content

Implementation Reference

  • Handler function that sends a bulk text message by calling the OpenWA API's send-bulk endpoint with recipients and text.
    async ({ sessionId, recipients, text }) => {
      const data = await openwaClient({
        method: "POST",
        path: `/sessions/${sessionId}/messages/send-bulk`,
        body: { recipients, text },
      });
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
  • Zod schema defining the input parameters for send_bulk_text: sessionId (string), recipients (array of strings), and text (string).
    inputSchema: {
      sessionId: z.string().describe("Session ID to send from"),
      recipients: z.array(z.string()).describe("Array of chat IDs to send to"),
      text: z.string().describe("Message text content"),
    },
  • src/tools/bulk.ts:6-24 (registration)
    Registration of the send_bulk_text tool on the McpServer via server.registerTool with description, inputSchema, and handler callback.
    server.registerTool(
      "send_bulk_text",
      {
        description: "Send the same text message to multiple WhatsApp recipients at once",
        inputSchema: {
          sessionId: z.string().describe("Session ID to send from"),
          recipients: z.array(z.string()).describe("Array of chat IDs to send to"),
          text: z.string().describe("Message text content"),
        },
      },
      async ({ sessionId, recipients, text }) => {
        const data = await openwaClient({
          method: "POST",
          path: `/sessions/${sessionId}/messages/send-bulk`,
          body: { recipients, text },
        });
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      }
    );
  • src/index.ts:17-17 (registration)
    Registration call in the main entry point that wires up the bulk tools (including send_bulk_text) onto the server.
    registerBulkTools(server);
  • Helper HTTP client that sends the actual POST request to the OpenWA API endpoint for bulk messaging.
    export async function openwaClient<T = unknown>(opts: RequestOptions): Promise<T> {
      const url = `${BASE_URL}${opts.path}`;
    
      const headers: Record<string, string> = {
        "Content-Type": "application/json",
        "X-API-Key": API_KEY,
      };
    
      const res = await fetch(url, {
        method: opts.method,
        headers,
        body: opts.body ? JSON.stringify(opts.body) : undefined,
      });
    
      const text = await res.text();
    
      if (!res.ok) {
        throw new Error(`OpenWA API ${res.status}: ${text}`);
      }
    
      try {
        return JSON.parse(text) as T;
      } catch {
        return text as T;
      }
    }
Behavior2/5

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

No annotations provided; description must carry full burden. Only states 'same text message' and 'at once' — lacks details on send order, error handling, rate limits, or asynchronous behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence of 10 words, front-loaded with the verb. No redundancy or unnecessary information.

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

Completeness2/5

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

For a bulk operation with 3 required params and no output schema, description lacks details on failure handling, whether sending is atomic, and what the response looks like. Incomplete for effective use.

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?

Input schema covers all 3 parameters with clear descriptions (100% coverage). Description adds minimal extra meaning ('same', 'multiple') but doesn't elaborate on valid chat ID format or constraints. Baseline 3 is appropriate.

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?

The description clearly states the verb ('Send'), resource ('same text message'), and scope ('multiple WhatsApp recipients at once'). It effectively distinguishes from sibling tools like send_text and send_bulk_image.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives (e.g., send_text for single recipients). No mention of prerequisites, limitations like maximum recipients, or potential issues.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExoCubeYT/openwa-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server