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

mark_message_as_read

Update WhatsApp message status to read by providing the message ID, helping manage conversation flow and track message delivery status.

Instructions

Mark a message as read.

Args: message_id: The WhatsApp message ID to mark as read sender: Optional phone ID

Returns: Dictionary with success status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes
senderNo

Implementation Reference

  • Main handler function for mark_message_as_read tool. Decorated with @mcp.tool() for registration, it accepts message_id (required) and sender (optional) parameters, calls wa_client.mark_message_as_read() to perform the actual WhatsApp API call, and returns a success/error response with logging.
    @mcp.tool() async def mark_message_as_read( message_id: str, *, sender: Optional[str] = None, ) -> dict: """ Mark a message as read. Args: message_id: The WhatsApp message ID to mark as read sender: Optional phone ID Returns: Dictionary with success status """ try: result = wa_client.mark_message_as_read( message_id=message_id, sender=sender, ) logger.info(f"Message {message_id} marked as read") result_data = str(result) if result else None return {"success": True, "result": result_data} except Exception as e: logger.error(f"Failed to mark message as read: {str(e)}") return {"success": False, "error": str(e)}

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