read_message
Mark WhatsApp messages as read to maintain organized conversations and clear message status indicators in business messaging workflows.
Instructions
Mark message as read
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"instanceName": "<instanceName>",
"remoteJid": "<remoteJid>"
},
"name": "read_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromMe | No | Is message from me | |
| id | No | Message ID | |
| instanceName | Yes | Instance name | |
| remoteJid | Yes | Chat JID |
Implementation Reference
- src/index.ts:427-439 (registration)Registration of the 'read_message' tool in the MCP tools array, including name, description, and input schema.
name: 'read_message', description: 'Mark message as read', inputSchema: { type: 'object', properties: { instanceName: { type: 'string', description: 'Instance name' }, remoteJid: { type: 'string', description: 'Chat JID' }, fromMe: { type: 'boolean', description: 'Is message from me' }, id: { type: 'string', description: 'Message ID' } }, required: ['instanceName', 'remoteJid'] } } - src/index.ts:969-983 (handler)MCP handler for 'read_message' tool that calls the EvolutionAPI service and formats the response.
private async handleReadMessage(args: any) { const result = await evolutionAPI.readMessage(args.instanceName, { remoteJid: args.remoteJid, fromMe: args.fromMe, id: args.id }); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } - Helper method in EvolutionAPI service that makes the HTTP POST request to mark a message as read in the underlying Evolution API.
async readMessage(instanceName: string, data: { remoteJid: string; fromMe?: boolean; id?: string; }): Promise<any> { const response = await this.client.post(`/chat/readMessage/${instanceName}`, data); return response.data; }