Skip to main content
Glama
billyfranklim1

mcp-evolution

Send Reaction

send_reaction

React to a WhatsApp message with an emoji. Send an empty string to remove the reaction.

Instructions

React to a WhatsApp message with an emoji via the pinned instance. Send empty string to remove reaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesMessage key identifying the message to react to
reactionYesEmoji reaction (e.g. '👍'). Send empty string to remove reaction.

Implementation Reference

  • Main handler function `registerSendReaction` that registers the 'send_reaction' tool. It uses Zod schema for input validation, sends a POST request to `/message/sendReaction/{instanceName}` with the message key and reaction emoji, and returns the API response.
    import { z } from "zod";
    import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { McpError } from "@modelcontextprotocol/sdk/types.js";
    import type { EvolutionClient } from "../evolution-client.js";
    
    const schema = {
      key: z.object({
        remoteJid: z.string().min(1).describe("JID of the chat (e.g. 5511999999999@s.whatsapp.net)"),
        fromMe: z.boolean().describe("Whether the message was sent by this instance"),
        id: z.string().min(1).describe("Message ID to react to"),
      }).describe("Message key identifying the message to react to"),
      reaction: z.string().describe("Emoji reaction (e.g. '👍'). Send empty string to remove reaction."),
    };
    
    export function registerSendReaction(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "send_reaction",
        {
          title: "Send Reaction",
          description: "React to a WhatsApp message with an emoji via the pinned instance. Send empty string to remove reaction.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.post(`/message/sendReaction/${client.instanceName}`, {
              key: args.key,
              reaction: args.reaction,
            });
            return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
          } catch (e) {
            if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] };
            throw e;
          }
        }
      );
    }
  • Input schema for 'send_reaction' tool: requires a `key` object (remoteJid, fromMe, id) identifying the message to react to, and a `reaction` string containing the emoji (empty string to remove).
    const schema = {
      key: z.object({
        remoteJid: z.string().min(1).describe("JID of the chat (e.g. 5511999999999@s.whatsapp.net)"),
        fromMe: z.boolean().describe("Whether the message was sent by this instance"),
        id: z.string().min(1).describe("Message ID to react to"),
      }).describe("Message key identifying the message to react to"),
      reaction: z.string().describe("Emoji reaction (e.g. '👍'). Send empty string to remove reaction."),
    };
  • Import of `registerSendReaction` from the send-reaction module.
    import { registerSendReaction } from "./send-reaction.js";
  • Registration call: `registerSendReaction(server, client)` called from `registerAllTools` function.
    registerSendReaction(server, client);
  • The `post` method on EvolutionClient used by the handler to make the HTTP request.
    async post<T = unknown>(path: string, body: unknown): Promise<T> {
      return this.request<T>("POST", path, body);
    }
Behavior2/5

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

No annotations provided, so description must disclose behavior. It implies a mutation (sending a reaction) but lacks detail on idempotency, error handling, permissions, or what happens if the message doesn't exist. The removal behavior is stated but without further context.

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

Conciseness5/5

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

Two concise sentences that front-load the main purpose and a key behavioral detail. No redundant information.

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 tool with a nested object and no output schema, the description covers the basic operation but lacks context on error scenarios, constraints (e.g., valid emojis), or expected outcomes. Adequate but not thorough.

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

Parameters3/5

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

Schema coverage is 100%, with detailed parameter descriptions already defining the message key and reaction. The description adds only the removal capability note, which is already in the schema. Minimal added value beyond schema.

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

Purpose5/5

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

Description clearly states the action: react to a WhatsApp message with an emoji, and the ability to remove a reaction by sending an empty string. It distinguishes from sibling message tools like send_text or delete_message.

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?

No explicit guidance on when to use this tool vs alternatives (e.g., when to react vs send a text). The mention of 'via the pinned instance' is vague and doesn't provide context for selection.

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/billyfranklim1/mcp-evolution'

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