Skip to main content
Glama
billyfranklim1

mcp-evolution

Delete Message

delete_message

Delete a WhatsApp message for all chat participants using the pinned instance. Specify the message ID, chat JID, and whether it was sent by you.

Instructions

Delete a message for everyone via the pinned WhatsApp instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMessage ID to delete
remoteJidYesJID of the chat containing the message
fromMeYesWhether the message was sent by this instance
participantNoParticipant JID (required for group messages)

Implementation Reference

  • Handler function registerDeleteMessage that registers the 'delete_message' tool. It defines input schema, builds a payload with id, remoteJid, fromMe, and optional participant, then calls the Evolution API endpoint /chat/deleteMessageForEveryone/{instanceName} via DELETE request.
    export function registerDeleteMessage(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "delete_message",
        {
          title: "Delete Message",
          description: "Delete a message for everyone via the pinned WhatsApp instance.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const payload: Record<string, unknown> = {
              id: args.id,
              remoteJid: args.remoteJid,
              fromMe: args.fromMe,
            };
            if (args.participant) payload["participant"] = args.participant;
            const data = await client.delete(`/chat/deleteMessageForEveryone/${client.instanceName}`, payload);
            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 using zod: id (string), remoteJid (string), fromMe (boolean), and optional participant (string for group messages).
    const schema = {
      id: z.string().min(1).describe("Message ID to delete"),
      remoteJid: z.string().min(1).describe("JID of the chat containing the message"),
      fromMe: z.boolean().describe("Whether the message was sent by this instance"),
      participant: z.string().optional().describe("Participant JID (required for group messages)"),
    };
  • Import statement for registerDeleteMessage from ./delete-message.js
    import { registerDeleteMessage } from "./delete-message.js";
  • Registration call to registerDeleteMessage(server, client) in the main tools registration function.
    registerDeleteMessage(server, client);
Behavior2/5

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

No annotations provided, so description carries full burden. It mentions 'for everyone' but does not disclose behavioral traits like irreversibility, required permissions, rate limits, or side effects (e.g., notifying participants).

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?

Single clear sentence with no wasted words, front-loading the core action.

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 simple delete tool, the description is sufficient given the parameter details. However, lack of output schema and annotations means more context on outcomes or error conditions could be helpful.

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 has 100% coverage with descriptions for all parameters. The description adds no extra meaning beyond the 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?

The description clearly states the action (delete), resource (message), and scope (for everyone via pinned WhatsApp instance). It distinguishes from sibling tools like archive_chat or send_text.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use, but the purpose is straightforward. Lacks guidance on prerequisites or alternatives among siblings.

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