Skip to main content
Glama
Maheidem

WAHA WhatsApp MCP Server

by Maheidem

Read WhatsApp Messages

whatsapp_read_messages

Retrieve messages from any WhatsApp chat. Filter by search, date range, sender, type, and more to get sender, content, timestamp, and message ID.

Instructions

Read messages from a specific WhatsApp chat.

Returns messages with sender, text content, timestamp, and message ID. Use the message ID from results for whatsapp_react or reply_to in whatsapp_send_text.

Powered by Message Store — persistent full history with full-text search and sender filtering.

Args:

  • contactId: Phone digits for a person ("5521986910666"; survives @c.us↔@lid flips), or group JID "*@g.us". Look up via whatsapp_list_contacts.

  • limit: Number of messages to return (1-100, default 20)

  • offset: Skip N messages for pagination (default 0)

  • search: Full-text search within this chat's messages (optional)

  • sender: Filter by sender name or JID (optional)

  • type: Filter by message type: chat, image, album (optional)

  • since: ISO date — messages after this date (optional)

  • until: ISO date — messages before this date (optional)

  • fromMe: Filter sent (true) or received (false) messages (optional)

  • downloadMedia: Include media download URLs when falling back to live (default false)

  • markAsRead: Mark messages as read after fetching (default false)

Returns:

  • messages: Array with id, sender, body, timestamp, type, fromMe, hasMedia

  • total: Total matching messages

  • hasMore: Whether more results exist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contactIdYesPhone digits for a person, or "*@g.us" for a group
limitNoNumber of messages to return (1-100, default 20)
offsetNoSkip N messages for pagination (default 0)
searchNoFull-text search within this chat (optional)
senderNoFilter by sender name or JID (optional)
typeNoFilter by message type: chat, image, album (optional)
sinceNoISO date — only messages after this date (optional)
untilNoISO date — only messages before this date (optional)
fromMeNoFilter: true = sent, false = received (optional)
downloadMediaNoInclude media download URLs when falling back to live (default false)
markAsReadNoMark messages as read after fetching (default false)
Behavior4/5

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

Annotations do not indicate readOnlyHint but description explains the markAsRead parameter (side effect). It also describes return fields and the 'hasMore' flag. No contradictions with annotations.

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 structured with a summary paragraph then bullet lists for args and returns, making it readable. A bit lengthy but well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 11 parameters and no output schema, the description covers each parameter and outlines return fields. Examples and usage tips enhance completeness.

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?

Schema coverage is 100%, but description adds extra context for contactId (phone digits, group JID, format survival) and return fields, providing value 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 'Read messages from a specific WhatsApp chat,' specifying the action and resource. It also distinguishes from siblings like whatsapp_search_messages and provides context on returned fields.

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

Usage Guidelines4/5

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

The description advises using message IDs from results for reacting or replying, and mentions looking up contactId via whatsapp_list_contacts. While it doesn't explicitly state when not to use this tool, the context is clear.

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/Maheidem/waha-mcp-server'

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