Skip to main content
Glama
WhatsApp MCP Server

WhatsApp MCP Server

list_messages

Retrieve and filter WhatsApp messages from local storage by chat, date range, sender, media type, or text search to find specific conversations and message details.

Instructions

List messages from WhatsApp's local storage with rich filtering. Filter by chat, date range (ISO 8601), sender ('me' vs 'other'), media type, or text search. Returns message ID, stanza ID, text, timestamps, sender info, read status, and media details.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of messages to return (default 50, max 500).
orderNoSort order by message timestamp: 'desc' (newest first) or 'asc' (oldest first).desc
sinceNoFilter messages sent on or after this ISO 8601 UTC timestamp (e.g. '2026-11-01T00:00:00Z').
untilNoFilter messages sent on or before this ISO 8601 UTC timestamp.
offsetNoNumber of records to skip for pagination.
searchNoOptional case-insensitive substring search in message text.
senderNoFilter by sender: 'me' (outgoing), 'other' (incoming), or specific sender JID/phone.
chat_idNoFilter to a specific chat by JID, phone number, or contact name.
media_typeNoFilter by media type: 'text', 'image', 'video', 'audio', 'document', 'location', 'contact', 'sticker', or 'any_media'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does establish the read-only nature ('List') and the source ('local storage'), which implies a cached local read rather than a network call. It also enumerates the return fields, partially compensating for the absent output schema, but says nothing about result caps, ordering defaults, pagination cost, or whether the local store may be stale relative to the phone.

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?

Three sentences, front-loaded with purpose, then filter dimensions, then return shape. Every sentence carries information and nothing is padded, though the middle sentence is a near-verbatim echo of the schema's filter list.

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?

For a nine-parameter, all-optional list tool with no output schema, the definition covers purpose, filter surface, and returned fields, which is most of what an agent needs. The remaining gap is interaction between filters (whether they AND together) and pagination strategy, which the schema documents piecewise but never as a whole.

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 description coverage is 100%, so every parameter is already documented, and the description largely restates those filters (chat, date range, sender, media type, text search). It adds mild value by highlighting ISO 8601 and the 'me' vs 'other' sender semantics, but omits limit, offset, and order entirely, so it does not exceed the schema baseline.

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?

The description uses a specific verb and resource ('List messages from WhatsApp's local storage') and adds the qualifier 'with rich filtering,' which tells an agent this is the filtered-retrieval path. It does not name or contrast with the sibling search_messages, so the boundary between the two is left for the agent to infer.

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 implied rather than stated: enumerating filter dimensions signals this is the general-purpose message query tool. There is no explicit when-to-use/when-not guidance, no mention of when search_messages would be preferred, and no note about prerequisites such as an active connection or indexed local store.

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