Skip to main content
Glama
billyfranklim1

mcp-evolution

Mark as Read

mark_as_read

Mark one or more WhatsApp messages as read by specifying the chat JID, sender status, and message IDs.

Instructions

Mark one or more messages as read via the pinned WhatsApp instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
readMessagesYesArray of message keys to mark as read

Implementation Reference

  • The main handler function `registerMarkAsRead` that registers the 'mark_as_read' tool with the MCP server. It defines the tool logic: accepting an array of message keys (remoteJid, fromMe, id) and POSTing to `/chat/markMessageAsRead/{instanceName}`.
    export function registerMarkAsRead(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "mark_as_read",
        {
          title: "Mark as Read",
          description: "Mark one or more messages as read via the pinned WhatsApp instance.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.post(`/chat/markMessageAsRead/${client.instanceName}`, {
              readMessages: args.readMessages,
            });
            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 the 'mark_as_read' tool using Zod. Defines `MessageKeySchema` (remoteJid, fromMe, id) and the `readMessages` array parameter.
    const MessageKeySchema = z.object({
      remoteJid: z.string().min(1).describe("JID of the chat"),
      fromMe: z.boolean().describe("Whether the message was sent by this instance"),
      id: z.string().min(1).describe("Message ID"),
    });
    
    const schema = {
      readMessages: z.array(MessageKeySchema).min(1).describe("Array of message keys to mark as read"),
    };
  • Import of `registerMarkAsRead` from the mark-as-read module.
    import { registerMarkAsRead } from "./mark-as-read.js";
  • Registration call `registerMarkAsRead(server, client)` inside `registerAllTools`, which wires up the tool to the MCP server.
    registerMarkAsRead(server, client);
Behavior2/5

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

No annotations provided. The description mentions 'via pinned WhatsApp instance' but fails to disclose authentication requirements, side effects (e.g., clearing badges), or error conditions. Minimal behavioral context beyond the action itself.

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 sentence, 12 words, front-loaded with the action. Every word is necessary and no redundancy.

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?

Tool is simple with one well-defined parameter, but the description does not explain the 'pinned' requirement or include guidance on prerequisites (e.g., instance must be connected). Without annotations or output schema, more context would 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 coverage is 100% with clear descriptions for each field (remoteJid, fromMe, id). The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

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 tool's action ('mark one or more messages as read') and the resource (WhatsApp messages via pinned instance). It distinguishes from siblings like 'delete_message' or 'archive_chat'.

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?

Implied usage after reading messages, but no explicit guidance on when to use vs alternatives (e.g., send_presence). No mention of when not to use or prerequisites.

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