Skip to main content
Glama
DimitrisPasakaleris

WhatsApp MCP Server

list_messages

Retrieve WhatsApp messages by date range, sender, chat, or content query, with optional surrounding context and pagination.

Instructions

Get WhatsApp messages matching specified criteria with optional context.

Each message includes sender_display showing "Name (phone)" for easy identification.

Args: after: ISO-8601 date string (e.g., "2026-01-01" or "2026-01-01T09:00:00") before: ISO-8601 date string (e.g., "2026-01-09" or "2026-01-09T18:00:00") sender_phone_number: Phone number to filter by sender (e.g., "12025551234") chat_jid: Chat JID to filter by (e.g., "12025551234@s.whatsapp.net" or group JID) query: Search term to filter messages by content limit: Max messages to return (default 50, max 500) page: Page number for pagination (default 0) include_context: Include surrounding messages for context (default True) context_before: Messages to include before each match (default 1) context_after: Messages to include after each match (default 1) sort_by: "newest" (default, most recent first) or "oldest" (chronological)

Input Schema

NameRequiredDescriptionDefault
pageNo
afterNo
limitNo
queryNo
beforeNo
sort_byNonewest
chat_jidNo
context_afterNo
context_beforeNo
include_contextNo
sender_phone_numberNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses defaults (limit 50, max 500, page 0, include_context True, 1 before/after), sort semantics, and the sender_display output shape. It omits that this is a read-only/non-destructive operation and says nothing about permissions or rate limits, which is the main remaining gap.

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?

A front-loaded one-line purpose followed by a compact Args block where every line adds concrete information; the sender_display note is placed early where it is useful. Only minor redundancy between include_context and the context_before/after defaults.

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?

Eleven optional parameters are all explained, defaults are stated, and an output schema exists so return values need not be enumerated. Missing only operational context (read-only nature, pagination totals) which would fully close the loop.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate entirely, and it does: all 11 parameters get meaning, format, and examples (ISO-8601 dates, E.164-style phone, chat JID forms, sort_by enumerations) plus defaults and the max cap on limit. This is meaningfully richer than the bare schema types.

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

Purpose4/5

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

States a specific verb and resource ("Get WhatsApp messages") plus the notion of filtering by criteria and optionally pulling context. It is clear what the tool returns, but it never contrasts itself with the close sibling get_message_context, which also deals with surrounding context.

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?

Usage is only implied: the parameter list suggests filtering by sender, chat, date, or query, and include_context/context_before/context_after imply context retrieval. There is no explicit when-to-use statement and no guidance to prefer get_message_context or list_chats under any condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.