Skip to main content
Glama
ExoCubeYT

OpenWA MCP Server

by ExoCubeYT

send_video

Send a video to a WhatsApp chat by providing a publicly accessible URL. Optionally include a caption.

Instructions

Send a video to a WhatsApp chat by providing a publicly accessible URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID to send from
chatIdYesTarget chat ID
urlYesPublic URL of the video
captionNoOptional caption for the video

Implementation Reference

  • Registration of the 'send_video' tool via server.registerTool(...)
    server.registerTool(
      "send_video",
      {
        description: "Send a video to a WhatsApp chat by providing a publicly accessible URL",
        inputSchema: {
          sessionId: z.string().describe("Session ID to send from"),
          chatId: z.string().describe("Target chat ID"),
          url: z.string().describe("Public URL of the video"),
          caption: z.string().optional().describe("Optional caption for the video"),
        },
      },
      async ({ sessionId, chatId, url, caption }) => {
        const data = await openwaClient({
          method: "POST",
          path: `/sessions/${sessionId}/messages/send-video`,
          body: { chatId, url, caption },
        });
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      }
    );
  • Handler function for 'send_video' that calls openwaClient to POST to /sessions/{sessionId}/messages/send-video
      async ({ sessionId, chatId, url, caption }) => {
        const data = await openwaClient({
          method: "POST",
          path: `/sessions/${sessionId}/messages/send-video`,
          body: { chatId, url, caption },
        });
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      }
    );
  • Input schema for 'send_video' tool: sessionId, chatId, url, and optional caption
    description: "Send a video to a WhatsApp chat by providing a publicly accessible URL",
    inputSchema: {
      sessionId: z.string().describe("Session ID to send from"),
      chatId: z.string().describe("Target chat ID"),
      url: z.string().describe("Public URL of the video"),
      caption: z.string().optional().describe("Optional caption for the video"),
    },
  • src/index.ts:15-15 (registration)
    Registration of message tools (including send_video) via registerMessageTools(server)
    registerSessionTools(server);
  • openwaClient helper function used by the send_video handler to make HTTP requests to the OpenWA API
    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 are provided, so the description must carry the full burden of behavioral disclosure. The description only states the action without revealing important traits like required authentication, error handling for invalid URLs, or whether the operation is synchronous. This is insufficient for a mutation-like tool.

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?

A single, front-loaded sentence that directly states the tool's purpose and a key requirement. No unnecessary words or repetition.

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?

Given the low complexity and full schema coverage, the description is adequate but leaves gaps. It fails to mention that a valid session must exist, what happens on failure (e.g., non-public URL), or how it differs from send_file which can also send videos. Annotations are missing, so the description should provide more behavioral context.

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?

With 100% schema description coverage, the description adds minimal value beyond the schema. It clarifies that the URL must be 'publicly accessible' and notes that 'caption' is optional, but this information is already implicit or stated in the schema. Baseline of 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' and resource 'video' to a specific target 'WhatsApp chat' with the constraint 'by providing a publicly accessible URL'. This distinctly separates it from sibling tools like send_image or send_file.

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 description implies the tool is for sending videos via a public URL, but it does not provide explicit guidance on when to use this tool versus alternatives (e.g., send_file for other media types, send_bulk_image for images). No exclusions or prerequisites are mentioned.

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