Skip to main content
Glama
Automata MCP

Automata MCP

Read WhatsApp messages

read-messages
Read-onlyIdempotent

Read a page of messages from a WhatsApp conversation, newest first, using the chat ID; filter by date and page back to fetch older history.

Instructions

[WhatsApp] Read one page of messages from one WhatsApp conversation, newest first. Takes the jid returned by list-chats. Covers the history imported when the account was paired as well as everything since, so older conversations are reachable — use since/until to target a date range. A response is one page, not the whole range: when hasMore is true there are older messages you have not seen, so call again with nextPage and the same jid, limit and window bounds, and keep going until hasMore is false before treating the range as fully read. covered reports the span this page actually covers, which for a truncated range is narrower than the one you asked for, and totalMatching/totalPages say how much the range holds in full — a count of distinct messages, safe to quote. A message you sent is marked fromMe and carries no author; on one you received, author is the sender's name where the account knows it, and absent where it does not. Reaction messages are left out unless includeReactions is set. @-mentions in the text are shown as names where the account knows them, and left as raw numeric ids where it does not — an id is not a name to guess at. An edited message arrives as its own record carrying the new text, with editOf naming the message it replaces; that earlier record is still in the history with the text it had before, so read the pair as one message that changed rather than as two. WhatsApp's own control records — deletions, disappearing-message timer changes, key exchanges — carry nothing to read and are left out, counted by protocolMessagesExcluded when any were, and still included in totalMatching. An edit that WhatsApp encrypted for the chat's participants comes back with no text and unreadable: 'encrypted-edit': the current wording of that message is unknown here, so report it as unknown rather than treating the earlier version as final. To find a message by what it says, prefer search-messages when this connector offers it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "jid": "<jid>"
    },
    "name": "read-messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
jidYesChat identifier from list-chats, e.g. 5511999999999@s.whatsapp.net
pageNo1-based page of `limit` messages, counting back from the newest. Walk this up while `hasMore` is true.
limitNoHow many messages to return in this page
sinceNoOnly messages at or after this date, e.g. 2024-03-01 or 2024-03-01T12:00:00Z
untilNoOnly messages at or before this date. Pass back the `window.until` from a previous page when paging a range.
includeReactionsNoInclude reaction messages. Each reaction is its own record — an id, an author, a timestamp and an emoji — so in an active group they are a large share of a page while rarely mattering for reconstructing the conversation. Off by default for that reason; turn it on when who reacted is the question.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, but the description adds substantial return-shape semantics: hasMore/nextPage paging, covered span, totalMatching/totalPages, fromMe vs author, editOf paired records, protocolMessagesExcluded, and unreadable encrypted edits. This is rich behavioral disclosure beyond the 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 purpose is front-loaded and the structure follows a logical flow from scope to paging to field semantics. It is long but nearly every sentence carries useful information; the main inefficiency is the ambiguous nextPage/window paging language.

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?

With no output schema and six parameters, the description carries the full burden of explaining return values. It covers pagination, date windows, counts, message authorship, edits, reactions, and protocol exclusions, leaving an agent well equipped to call and interpret the tool.

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 coverage is 100%, so the schema already documents all six parameters. The description adds useful meaning for since/until and includeReactions, but it references 'nextPage' and 'window' as if they were parameters when the schema only has 'page' and no 'window' parameter. That mismatch reduces clarity about how to actually page.

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 one page of messages from one WhatsApp conversation'), specifies ordering ('newest first'), and names the sibling alternative ('search-messages') for text-based lookup. An agent can immediately distinguish this from list-chats or search-messages.

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?

Explicitly says to use since/until for date ranges, describes the paging loop with hasMore and nextPage, and directs the agent to search-messages when searching by message text. It also gives clear guidance on when to enable includeReactions. When-to-use and when-not-to-use are both covered.

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