Skip to main content
Glama
TitanmindAGI

Titanmind WhatsApp MCP

by TitanmindAGI

register_msg_template_for_approval

Create and register WhatsApp message templates for approval, enabling structured bulk messaging with customizable components like headers, body text, and interactive buttons.

Instructions

creates and registers a new whatsapp message template for approval.
Args:
    template_name (str): name of the whatsapp message template, It only accepts a single word without no special characters except underscores
    language (str): language of the whatsapp message template (default is "en")
    category (str): category of the whatsapp message template (default is "MARKETING"), other possible values are "UTILITY", "AUTHENTICATION"
    message_content_components (dict): the message content that needs to be sent. It needs to be structured like the below example, 
    components are required to have BODY component at least, like this: {"type": "BODY", "text": "lorem body text"}, BODY component is for the simple text.
    All other components are optional. 
    HEADER component can have any of the below format, but only one format at a time can be used.: TEXT(the header component with TEXT needs to be like this
    {
    "type": "HEADER",
    "format": "TEXT",
    "text": "lorem header text"
    }
    ), VIDEO(the header component with VIDEO needs to be like this
    {
     "type":"HEADER",
     "format":"VIDEO",
     "example":{
        "header_handle":[
           "https://sample_video_url.jpg"
        ]
     }
    }
    )
    , IMAGE(the header component with IMAGE needs to be like this 
    {
     "type":"HEADER",
     "format":"IMAGE",
     "example":{
        "header_handle":[
           "https://sample_image_url.jpg"
        ]
     }
    }),
   DOCUMENT (the header component with DOCUMENT needs to be like this 
    {
     "type":"HEADER",
     "format":"DOCUMENT",
     "example":{
        "header_handle":[
           "https://sample_document_url"
        ]
     }
  }),
    message_content_components value with all other type of components is mentioned below.
        [
                {
                    "type": "HEADER",
                    "format": "TEXT",
                    "text": "lorem header text"
                },
                {
                    "type": "BODY",
                    "text": "lorem body text"
                },
                {
                    "type": "FOOTER",
                    "text": "lorem footer text"
                },
                {
                    "type": "BUTTONS",
                    "buttons": [
                        {
                            "type": "QUICK_REPLY",
                            "text": "lorem reply bt"
                        },
                        {
                          "type": "URL",
                          "text": "cta",
                          "url": "https:sample.in"
                        },
                        {
                          "type": "PHONE_NUMBER",
                          "text": "call ",
                          "phone_number": "IN328892398"
                        }
                    ]
                }
            ]
    Buttons need to follow order of first QUICK_REPLY, then URL, and then PHONE_NUMBER.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
template_nameYes
message_content_componentsYes
languageNoen
categoryNoMARKETING

Implementation Reference

  • Core handler function that executes the logic to register a WhatsApp message template for approval by making a POST request to the 'whatsapp/template/' endpoint using TitanMindAPINetworking.
    def register_msg_template_for_approval(
            template_name: str, language: str, category: str, message_content_components: list[dict[str, Any]]
    ):
        return asdict(
            TitanMindAPINetworking().make_request(
                endpoint=f"whatsapp/template/",
                payload={
                    "name": template_name,
                    "language": language,
                    "category": category,
                    "components": message_content_components
                },
                success_message="whatsapp template registered for approval.",
                method=HTTPMethod.POST,
            )
        )
  • MCP tool registration using @mcp.tool() decorator. Includes detailed docstring serving as input schema description with examples, and wrapper that delegates to the core handler in titan_mind_functions.
    @mcp.tool()
    def register_msg_template_for_approval(
            template_name: str,
            message_content_components: list[dict[str, Any]],
            language: str = "en", category: str = "MARKETING",
    ) -> Optional[Dict[str, Any]]:
        """
        creates and registers a new whatsapp message template for approval.
        Args:
            template_name (str): name of the whatsapp message template, It only accepts a single word without no special characters except underscores
            language (str): language of the whatsapp message template (default is "en")
            category (str): category of the whatsapp message template (default is "MARKETING"), other possible values are "UTILITY", "AUTHENTICATION"
            message_content_components (dict): the message content that needs to be sent. It needs to be structured like the below example, 
            components are required to have BODY component at least, like this: {"type": "BODY", "text": "lorem body text"}, BODY component is for the simple text.
            All other components are optional. 
            HEADER component can have any of the below format, but only one format at a time can be used.: TEXT(the header component with TEXT needs to be like this
            {
            "type": "HEADER",
            "format": "TEXT",
            "text": "lorem header text"
            }
            ), VIDEO(the header component with VIDEO needs to be like this
            {
             "type":"HEADER",
             "format":"VIDEO",
             "example":{
                "header_handle":[
                   "https://sample_video_url.jpg"
                ]
             }
            }
            )
            , IMAGE(the header component with IMAGE needs to be like this 
            {
             "type":"HEADER",
             "format":"IMAGE",
             "example":{
                "header_handle":[
                   "https://sample_image_url.jpg"
                ]
             }
            }),
           DOCUMENT (the header component with DOCUMENT needs to be like this 
            {
             "type":"HEADER",
             "format":"DOCUMENT",
             "example":{
                "header_handle":[
                   "https://sample_document_url"
                ]
             }
          }),
            message_content_components value with all other type of components is mentioned below.
                [
                        {
                            "type": "HEADER",
                            "format": "TEXT",
                            "text": "lorem header text"
                        },
                        {
                            "type": "BODY",
                            "text": "lorem body text"
                        },
                        {
                            "type": "FOOTER",
                            "text": "lorem footer text"
                        },
                        {
                            "type": "BUTTONS",
                            "buttons": [
                                {
                                    "type": "QUICK_REPLY",
                                    "text": "lorem reply bt"
                                },
                                {
                                  "type": "URL",
                                  "text": "cta",
                                  "url": "https:sample.in"
                                },
                                {
                                  "type": "PHONE_NUMBER",
                                  "text": "call ",
                                  "phone_number": "IN328892398"
                                }
                            ]
                        }
                    ]
            Buttons need to follow order of first QUICK_REPLY, then URL, and then PHONE_NUMBER.
        """
    
        return titan_mind_functions.register_msg_template_for_approval(
            template_name, language, category, message_content_components
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While it describes the creation/registration action, it doesn't mention important behavioral aspects like: whether this requires specific permissions, what happens after approval, whether templates can be modified later, rate limits, or error conditions. The description covers the basic operation but lacks critical behavioral context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is excessively long and poorly structured. It buries the core purpose in a wall of text with repetitive formatting examples. While the parameter information is valuable, it could be organized more efficiently. The description lacks front-loading of critical information and contains redundant examples that don't earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter mutation tool with no annotations and no output schema, the description provides excellent parameter documentation but lacks other critical context. It doesn't explain what happens after registration, what the approval process entails, what permissions are needed, or what the tool returns. The parameter coverage is strong, but overall completeness is compromised by missing behavioral and operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates excellently by providing detailed semantic information for all 4 parameters. It explains template_name restrictions, language and category defaults/enums, and provides extensive examples and formatting rules for message_content_components. The description adds substantial value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'creates and registers a new whatsapp message template for approval', specifying both the action (creates/registers) and resource (whatsapp message template). However, it doesn't differentiate from sibling tools like 'get_the_templates' or 'send_msg_to_multiple_num_using_approved_template', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when this tool is appropriate compared to sibling tools, or any exclusions. The only implied usage is for creating WhatsApp templates, but no contextual boundaries are established.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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