send_whatsapp_message_to_a_conversation
Send targeted WhatsApp messages directly to specific conversations using a conversation ID, enabling precise communication within the Titanmind WhatsApp MCP platform.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conversation_id | Yes | ||
| message | Yes |
Implementation Reference
- Core handler function that executes the tool logic by making a POST request to the TitanMind API endpoint to send a WhatsApp message to the specified conversation.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 } } ) )
- src/titan_mind/server.py:104-117 (registration)Registration of the MCP tool using @mcp.tool() decorator. This wraps the core handler, adds documentation and workflow instructions, and handles the tool invocation.@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 )