get_the_templates
Retrieve WhatsApp message templates for marketing campaigns, enabling users to access and manage pre-approved message formats for broadcasting and conversation workflows.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_name | No | None | |
| page | No | ||
| page_size | No |
Implementation Reference
- Core handler function that builds the payload for fetching WhatsApp templates via API and returns the response.def get_the_templates( template_name: str = "None", page: int = 1, page_size: int = 10, ): payload = { "channel": "whatsapp", "page": page, "page_size": page_size } if template_name is not None and template_name.lower() not in ["none", "null"]: payload["name__icontains"] = template_name return asdict( TitanMindAPINetworking().make_request( endpoint=f"template/", payload=payload, success_message="templates fetched", method=HTTPMethod.GET, ) )
- src/titan_mind/server.py:215-230 (registration)MCP tool decorator registration with schema (type annotations and docstring) that delegates to the core handler in titan_mind_functions.def get_the_templates( template_name: str = "None", page: int = 1, page_size: int = 10, ) -> Optional[Dict[str, Any]]: (""" gets all the created templates with the details like approved/pending status Args: template_name (str): name of the whatsapp message template, It only accepts a word without no special characters only underscores. Default is "None" to get all the templates page (int): page refers to the page in paginated api. default is 1 page_size (int): page_size refers to the page_size in paginated api. default is 25 """ + _titan_mind_product_whatsapp_channel_messaging_functionality_and_workflow) return titan_mind_functions.get_the_templates( template_name, page, page_size )