Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

List Messages

wa_list_messages
Read-only

Read messages across all your WhatsApp accounts, oldest first. Page with after_cursor: pass back the next_cursor you were given to see only what has arrived since. Use this to catch up after being notified of a new message. Narrow with account_id, chat, and since/until (when the message was sent; until is exclusive). Add include_history to also read synced history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNoonly this conversation — a phone number or a group JID
limitNohow many to return, 1-200; defaults to 50
sinceNoonly messages sent at or after this time: RFC3339 with a zone (2026-10-01T09:00:00+03:00) or a date (2026-10-01 = midnight UTC); omit for no lower bound
untilNoonly messages sent BEFORE this time — exclusive, so all of 1 October is since 2026-10-01 until 2026-10-02; same formats as since; omit for no upper bound
account_idNoonly this account's messages, from wa_list_accounts; omit for every account
after_cursorNoreturn messages after this cursor; omit or 0 to start from the beginning
include_historyNoalso return imported history (pairing sync and wa_load_history); off by default. With it on, a page is in storage order rather than time order — sort by at

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refusalNopresent only when the request was declined; next_cursor is then your after_cursor, unchanged
has_moreYestrue when the page was full and more may be waiting
messagesYesmessages in order, oldest first
next_cursorYespass this as after_cursor next time to get only newer messages

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedInput schema / properties / account_id
      Added value: +{
      +  "description": "only this account's messages, from wa_list_accounts; omit for every account",
      +  "type": "string"
      +}
    • addedInput schema / properties / chat
      Added value: +{
      +  "description": "only this conversation — a phone number or a group JID",
      +  "type": "string"
      +}
    • addedInput schema / properties / include_history
      Added value: +{
      +  "description": "also return imported history (pairing sync and wa_load_history); off by default. With it on, a page is in storage order rather than time order — sort by at",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / since
      Added value: +{
      +  "description": "only messages sent at or after this time: RFC3339 with a zone (2026-10-01T09:00:00+03:00) or a date (2026-10-01 = midnight UTC); omit for no lower bound",
      +  "type": "string"
      +}
    • addedInput schema / properties / until
      Added value: +{
      +  "description": "only messages sent BEFORE this time — exclusive, so all of 1 October is since 2026-10-01 until 2026-10-02; same formats as since; omit for no upper bound",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / account_name
      Added value: +{
      +  "description": "the WhatsApp display name of that account",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / account_phone
      Added value: +{
      +  "description": "the phone number of your account this message was sent from or received on, E.164",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / attachment
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "present on an image, video, audio, document or sticker message: the file's mime type, size and name; fetch the bytes with wa_get_media",
      +  "properties": {
      +    "available": {
      +      "description": "true when the file should be fetchable with wa_get_media(account_id, message_id) — a live received attachment; false for history and for files you sent, which are not kept",
      +      "type": "boolean"
      +    },
      +    "file_name": {
      +      "description": "documents only: the file name the sender gave it",
      +      "type": "string"
      +    },
      +    "mime": {
      +      "description": "the attachment's mime type as the sender declared it, e.g. image/jpeg or application/pdf; empty for a message stored before this was recorded",
      +      "type": "string"
      +    },
      +    "size": {
      +      "description": "the attachment's size in bytes as the sender declared it; 0 when unknown",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "available"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / messages / items / properties / received_at
      Added value: +{
      +  "description": "when this server received and stored the message, RFC3339; later than at for a message delivered late or loaded as history",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / sender_name
      Added value: +{
      +  "description": "who wrote the message, by name: for inbound the sender's name as saved in this account's contacts, or else the name they chose for themselves; for outbound this account's own WhatsApp name. Empty when no name is known",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "present only when the request was declined; next_cursor is then your after_cursor, unchanged",
      +  "properties": {
      +    "message": {
      +      "description": "a human-readable explanation",
      +      "type": "string"
      +    },
      +    "reason": {
      +      "description": "why the call was declined",
      +      "type": "string"
      +    },
      +    "refused": {
      +      "description": "true when the call was declined rather than performed",
      +      "type": "boolean"
      +    },
      +    "retry_after_seconds": {
      +      "description": "seconds to wait before retrying; absent or 0 means retrying will not help",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "refused",
      +    "reason",
      +    "message"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / messages / items / properties / status
      Added value: +{
      +  "description": "delivery status of an outbound message from the provider's receipts: sent, delivered, read or failed; empty when no receipt has arrived (or for inbound). Only Business (Cloud API) numbers report this today",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / messages / items / properties / imported
      Added value: +{
      +  "description": "true for a message loaded as history (pairing sync or wa_load_history) rather than received live",
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=false, so safety is covered. The description goes beyond that with real behavioral context: chronological ordering, the next_cursor round-trip pattern, the exclusivity of 'until', and the fact that include_history switches a page to storage order rather than time order.

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?

Four tight sentences, front-loaded with purpose and ordering, then paging mechanics, then the use case, then filters. No sentence is filler and no structured field is redundantly restated.

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

Completeness5/5

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

An output schema exists, so return shape need not be described, and annotations cover the read-only safety profile. Ordering, pagination, filtering, and the history-mode caveat are all present, leaving nothing an agent needs to call it correctly.

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%, so the baseline is 3, but the description adds value the schema does not: it explains the cursor-passing loop for after_cursor and the ordering consequence of include_history. It does not restate the since/until formats, which is fine because the schema already documents them.

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?

States a specific verb and resource ('Read messages across all your WhatsApp accounts') plus an ordering guarantee ('oldest first'). It is clearly distinguishable from sibling wa_get_message (single message) and other wa_list_* tools without opening the schema.

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?

Gives a concrete triggering context ('Use this to catch up after being notified of a new message') and explains the paging workflow. It never names a competing sibling (e.g. wa_get_message or wa_get_chat) as an alternative, so it stops short of full when-not routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources