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

send_reaction

Send emoji reactions to WhatsApp messages using the WhatsApp Business API. React to specific messages by providing phone number, emoji, and message ID.

Instructions

Send a reaction to a message.

Args: to: Phone number or WhatsApp ID emoji: Reaction emoji message_id: ID of message to react to sender: Optional sender phone ID

Returns: Dictionary with success status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
emojiYes
message_idYes
senderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The send_reaction tool handler function decorated with @mcp.tool() that implements the reaction sending logic. It takes parameters (to, emoji, message_id, optional sender) and calls wa_client.send_reaction(), returning a success/error dictionary.
    @mcp.tool()
    async def send_reaction(
        to: str,
        emoji: str,
        message_id: str,
        *,
        sender: Optional[str] = None,
    ) -> dict:
        """
        Send a reaction to a message.
        
        Args:
            to: Phone number or WhatsApp ID
            emoji: Reaction emoji
            message_id: ID of message to react to
            sender: Optional sender phone ID
        
        Returns:
            Dictionary with success status
        """
        try:
            result = wa_client.send_reaction(
                to=to,
                emoji=emoji,
                message_id=message_id,
                sender=sender,
            )
            
            logger.info(f"Reaction sent to message {message_id}")
            result_data = str(result) if result else None
            return {"success": True, "result": result_data}
        except Exception as e:
            logger.error(f"Failed to send reaction: {str(e)}")
            return {"success": False, "error": str(e)}
  • The register_all_tools function that registers all tools including send_reaction by calling register_messaging_tools, which is invoked from server.py during server initialization.
    def register_all_tools(mcp, wa_client):
        """Register all available tools with the MCP server."""
        register_messaging_tools(mcp, wa_client)
        register_interactive_tools(mcp, wa_client)
        register_template_tools(mcp, wa_client)
  • server.py:62-69 (registration)
    Server initialization code that creates the WhatsApp client and registers all tools (including send_reaction) by calling register_all_tools(mcp, client).
    # Initialize WhatsApp client and register tools on startup
    try:
        client = get_whatsapp_client()
        logger.info("WhatsApp client configuration validated")
        
        # Register all tools from modules
        register_all_tools(mcp, client)
        logger.info("All tools registered successfully")
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions that it 'Sends a reaction' and returns a 'Dictionary with success status', but fails to disclose critical behavioral traits like authentication requirements, rate limits, error handling, or whether it's a read-only or destructive operation. This leaves significant gaps for an agent to understand how to use it safely and effectively.

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

Conciseness4/5

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

The description is well-structured with a clear purpose statement followed by parameter and return value sections. It's front-loaded and efficient, with no wasted sentences, though it could be slightly more concise by integrating the 'Args' and 'Returns' into the main flow without separate headings.

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?

Given the complexity of a messaging reaction tool with no annotations and 0% schema coverage, the description is moderately complete. It covers the basic purpose and parameters, and an output schema exists, so return values don't need explanation. However, it lacks behavioral details and usage guidelines, making it inadequate for full contextual understanding.

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

Parameters4/5

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

The description includes an 'Args' section that explains each parameter's purpose (e.g., 'to: Phone number or WhatsApp ID', 'emoji: Reaction emoji'), adding meaningful context beyond the input schema, which has 0% description coverage. This compensates well for the schema's lack of descriptions, though it doesn't detail format constraints or examples for parameters like 'emoji'.

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 action ('Send a reaction') and target ('to a message'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'remove_reaction' or other messaging tools, though the purpose is distinct enough to be understood in context.

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 like 'send_message' or 'remove_reaction'. It lacks context about prerequisites, such as needing an existing message to react to, or exclusions, making it minimally helpful for decision-making.

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/Jem-HR/pywa-mcp-server'

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