Skip to main content
Glama
Jem-HR
by Jem-HR

send_video

Send video messages via WhatsApp Business API to share visual content with optional captions, footers, and reply functionality.

Instructions

Send a video message.

Args: to: Phone number or WhatsApp ID video: Video URL or media ID caption: Optional video caption footer: Optional footer text reply_to_message_id: Message ID to reply to

Returns: Dictionary with success status and message ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
videoYes
captionNo
footerNo
reply_to_message_idNo

Implementation Reference

  • The complete implementation of the send_video tool - includes both the @mcp.tool() registration decorator and the handler function that sends video messages via WhatsApp API
    @mcp.tool()
    async def send_video(
        to: str,
        video: str,
        caption: Optional[str] = None,
        footer: Optional[str] = None,
        *,
        reply_to_message_id: Optional[str] = None,
    ) -> dict:
        """
        Send a video message.
        
        Args:
            to: Phone number or WhatsApp ID
            video: Video URL or media ID
            caption: Optional video caption
            footer: Optional footer text
            reply_to_message_id: Message ID to reply to
        
        Returns:
            Dictionary with success status and message ID
        """
        try:
            result = wa_client.send_video(
                to=to,
                video=video,
                caption=caption,
                footer=footer,
                reply_to_message_id=reply_to_message_id,
            )
            
            logger.info(f"Video sent to {to}")
            message_id = getattr(result, 'id', str(result)) if result else None
            return {"success": True, "message_id": message_id}
        except Exception as e:
            logger.error(f"Failed to send video: {str(e)}")
            return {"success": False, "error": str(e)}
  • Tool registration via @mcp.tool() decorator with function signature defining input parameters and return type
    @mcp.tool()
    async def send_video(
        to: str,
        video: str,
        caption: Optional[str] = None,
        footer: Optional[str] = None,
        *,
        reply_to_message_id: Optional[str] = None,
    ) -> dict:
  • Schema documentation defining the tool's purpose, input parameters, and return structure
    """
    Send a video message.
    
    Args:
        to: Phone number or WhatsApp ID
        video: Video URL or media ID
        caption: Optional video caption
        footer: Optional footer text
        reply_to_message_id: Message ID to reply to
    
    Returns:
        Dictionary with success status and message ID
    """

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/Jem-HR/pywa-mcp-server'

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