Skip to main content
Glama
TitanmindAGI

Titanmind WhatsApp MCP

by TitanmindAGI

send_whatsapp_message_to_a_conversation

Send WhatsApp messages to specific conversations using conversation IDs, enabling direct communication within the 24-hour messaging window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYes
messageYes

Implementation Reference

  • Registration of the MCP tool 'send_whatsapp_message_to_a_conversation' using @mcp.tool() decorator. Includes the handler function which wraps and calls the core implementation.
    @mcp.tool()
    def send_whatsapp_message_to_a_conversation(conversation_id: str, message: str) -> Optional[Dict[str, Any]]:
        ("""
        sends a whatsapp message to a Titanmind's whatsapp conversation.
    
        Args:
            conversation_id (str): id of the whatsapp conversation.
            message (str): the message to send.
        """ + _titan_mind_product_whatsapp_channel_messaging_functionality_and_workflow)
    
        return titan_mind_functions.send_whatsapp_message_to_a_conversation(
            conversation_id, message
        )
  • Core handler logic that executes the HTTP POST request to send a WhatsApp message to the specified conversation via TitanMind API.
    def send_whatsapp_message_to_a_conversation(conversation_id: str, message: str):
        return asdict(
            TitanMindAPINetworking().make_request(
                endpoint=f"msg/conversations/{conversation_id}/messages/whatsapp/send-message/",
                success_message="whatsapp message sent request created.",
                method=HTTPMethod.POST,
                payload={
                    "recipient_type": "individual",
                    "type": "text",
                    "text": {
                        "body": message
                    }
                }
            )
        )

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/TitanmindAGI/titan-mind-whatsapp-mcp'

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