Skip to main content
Glama

List Messages

wa_list_messages
Read-only

Read messages across all your accounts — WhatsApp and Telegram — 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. When a poll finds nothing new, wait about 30 seconds before the next one: calling again at once returns the same empty page.

Input Schema

NameRequiredDescriptionDefault
chatNoonly this conversation — a phone number or a group JID, or on a Telegram account the chat's Telegram id (<id>@telegram)
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
include_media_urlsNoalso return attachment.media_url on each available attachment — a time-limited (1h) signed URL to GET the bytes with plain HTTP instead of a wa_get_media call; off by default

Output Schema

NameRequiredDescriptionDefault
hintNopresent when the read found nothing new: wait before polling again
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
account_noticesNopresent when a number this read covers is not working: new messages are not arriving on it; says why and what to do

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / messages / items / properties / sent_by
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "present on an outbound message an AI agent or an app sent through WhatsMCP: who asked for the send",
      +  "properties": {
      +    "id": {
      +      "description": "the agent's, the API key's or the OAuth app's id",
      +      "type": "string"
      +    },
      +    "kind": {
      +      "description": "agent (a hosted AI agent), api_key (an app on one of your API keys) or oauth_app (an app you connected over OAuth, such as Claude)",
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "its name as it was when the message was sent",
      +      "type": "string"
      +    },
      +    "version": {
      +      "description": "an agent only: the number of the agent's version that wrote it",
      +      "type": "integer"
      +    },
      +    "via": {
      +      "description": "an app only: mcp or rest, the API it sent through",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind",
      +    "id"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
  2. Changed2 schema fields changed
    • changedOutput schema / properties / account_notices / items / properties / status / description
      Previous value: -"why it is not live: starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked"New value: +"why it is not live: starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked"
    • changedOutput schema / properties / refusal / properties / account_status / description
      Previous value: -"when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked"New value: +"when the number is not working: its status — starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked"
  3. Changed1 schema field changed
    • changedOutput schema / properties / messages / items / properties / chat_kind / description
      Previous value: -"dm, group, channel or broadcast"New value: +"dm, group, channel or broadcast; a Telegram supergroup reads as channel"
  4. Changed5 schema fields changed
    • changedOutput schema / properties / messages / items / properties / kind / description
      Previous value: -"what the message is: text, image, video, audio, document, sticker, reaction, location, live_location, contact, poll, poll_vote, video_note, album, event, comment, pin, group_invite, template or call_permission; other is a type this server does not classify. text carries a body, and so do image/video/document captions, template text and a call_permission request or answer; an image, video, audio, document or sticker attachment can be fetched with wa_get_media"New value: +"what the message is: text, image, video, audio, document, sticker, reaction, location, live_location, contact, poll, poll_vote, video_note, album, event, comment, pin, group_invite, template or call_permission; other is a type this server does not classify. text carries a body, and so do image/video/document captions, template text and a call_permission request or answer; an image, video, audio, document or sticker attachment can be fetched with wa_get_media; a reaction carries its emoji as text and names its target message in reacted_to_message_id, while a reply carries quoted_message_id for the message it quotes"
    • addedOutput schema / properties / messages / items / properties / quoted_message_id
      Added value: +{
      +  "description": "present on a reply: the message_id of the message this one quotes; pass it to wa_get_message to read what was quoted",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / quoted_sender
      Added value: +{
      +  "description": "who wrote the quoted message: a phone number when known, otherwise a JID",
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / reacted_to_message_id
      Added value: +{
      +  "description": "present on a kind=reaction message: the message_id this reaction is about; the emoji itself is in text",
      +  "type": "string"
      +}
    • changedOutput schema / properties / messages / items / properties / text / description
      Previous value: -"the message body"New value: +"the message body; for a kind=reaction message this is the emoji"
  5. Changed4 schema fields changed
    • addedInput schema / properties / include_media_urls
      Added value: +{
      +  "description": "also return attachment.media_url on each available attachment — a time-limited (1h) signed URL to GET the bytes with plain HTTP instead of a wa_get_media call; off by default",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / messages / items / properties / attachment / description
      Previous value: -"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"New value: +"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, or pass include_media_urls on the read to get a direct media_url"
    • addedOutput schema / properties / messages / items / properties / attachment / properties / media_url
      Added value: +{
      +  "description": "a time-limited (1h) signed URL to GET the attachment's bytes, present only when the read passed include_media_urls and the attachment is available; an expired link is refused — read again for a fresh one",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / candidates
      Added value: +{
      +  "description": "on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the id to retry with as account_id",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "the account's WhatsApp display name",
      +        "type": "string"
      +      },
      +      "phone": {
      +        "description": "the account's phone number, E.164",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  6. Changed3 schema fields changed
    • changedInput schema / properties / chat / description
      Previous value: -"only this conversation — a phone number or a group JID"New value: +"only this conversation — a phone number or a group JID, or on a Telegram account the chat's Telegram id (<id>@telegram)"
    • changedOutput schema / properties / messages / items / properties / chat / description
      Previous value: -"the conversation JID; pass it to wa_send_message's 'to' to reply here — a group is …@g.us, a channel …@newsletter"New value: +"the conversation JID; pass it to wa_send_message's 'to' to reply here — a group is …@g.us, a channel …@newsletter; on a Telegram account a Telegram id: <id>@telegram for a user, -<id>@telegram for a basic group, -100<id>@telegram for a channel or supergroup"
    • changedOutput schema / properties / messages / items / properties / peer / description
      Previous value: -"the other party's phone number (for a group/channel this is the individual SENDER; use chat to reply)"New value: +"the other party's phone number (for a group/channel this is the individual SENDER; use chat to reply); on a Telegram account the other party's Telegram id, <id>@telegram"
  7. Changed1 schema field changed
    • addedOutput schema / properties / hint
      Added value: +{
      +  "description": "present when the read found nothing new: wait before polling again",
      +  "type": "string"
      +}
  8. Changed1 schema field changed
    • changedOutput schema / properties / messages / items / properties / kind / description
      Previous value: -"what the message is: text, image, video, audio, document, sticker, reaction, location, live_location, contact, poll, poll_vote, video_note, album, event, comment, pin, group_invite or template; other is a type this server does not classify. text carries a body, and so do image/video/document captions and template text; an image, video, audio, document or sticker attachment can be fetched with wa_get_media"New value: +"what the message is: text, image, video, audio, document, sticker, reaction, location, live_location, contact, poll, poll_vote, video_note, album, event, comment, pin, group_invite, template or call_permission; other is a type this server does not classify. text carries a body, and so do image/video/document captions, template text and a call_permission request or answer; an image, video, audio, document or sticker attachment can be fetched with wa_get_media"
  9. Changed4 schema fields changed
    • addedOutput schema / properties / account_notices
      Added value: +{
      +  "description": "present when a number this read covers is not working: new messages are not arriving on it; says why and what to do",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the account this notice is about",
      +        "type": "string"
      +      },
      +      "message": {
      +        "description": "what is wrong and what to do; tell the user",
      +        "type": "string"
      +      },
      +      "since": {
      +        "description": "when it stopped working, RFC3339, when known",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "why it is not live: starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +        "type": "string"
      +      },
      +      "status_reason": {
      +        "description": "the detail, e.g. no_egress, no_plan, stopped",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id",
      +      "status",
      +      "message"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / refusal / properties / account_status
      Added value: +{
      +  "description": "when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / account_status_reason
      Added value: +{
      +  "description": "the detail of account_status, e.g. no_egress, stopped, no_plan",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / since
      Added value: +{
      +  "description": "when the number stopped working, RFC3339, when known",
      +  "type": "string"
      +}
  10. Changed6 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 / 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"
      +  ]
      +}
  11. Changed2 schema fields changed
    • 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"
      +}
  12. Changed3 schema fields changed
    • 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"
      +}
  13. 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"
      +}
  14. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and non-idempotency; the description adds substantial behavior: chronological vs. storage ordering when include_history is on, how next_cursor/after_cursor paging works, that a repeat poll returns the same empty page, and that media URLs are 1-hour signed GET links. This is exactly the operational context an agent cannot infer from 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?

Front-loaded with what the tool does and how to page, then narrowing filters, then polling advice — a sound information order with little waste. A few clauses echo the schema verbatim (e.g., 'until is exclusive'), which trims a point.

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?

For an eight-parameter, all-optional read tool with an output schema covering return shape (including next_cursor), the description covers paging, filtering, ordering side effects, and polling cadence. Nothing material is missing for correct invocation.

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 already 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema lacks: passing back the prior next_cursor, and the caveat that include_history flips page ordering so results must be sorted by 'at'. It does restate some schema-level facts (until is exclusive), so it stops short of a 5.

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'), the scope ('across all your accounts — WhatsApp and Telegram'), and the ordering ('oldest first'). An agent can immediately tell this apart from single-message siblings like wa_get_message or account-scoped siblings like wa_list_accounts.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('Use this to catch up after being notified of a new message') and a polling discipline ('when a poll finds nothing new, wait about 30 seconds'). It also routes away from wa_get_media for attachment bytes via the include_media_urls parameter.

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