Skip to main content
Glama

chats

Read, search, and manage WhatsApp conversations: list threads, fetch messages and media, send text/media/polls, mark read, archive, and load older history.

Instructions

Read or send WhatsApp messages inside chats on the connected engine. Available actions:

  • list: list chats, newest message first (offset pagination via limit/skip)

  • search: list chats matching a name/keyword query. Archived chats are excluded by default — pass include_archive=true to find an archived chat (e.g. to get its chat_id before unarchive).

  • get: retrieve a single chat by chat_id (e.g. 972544325389@c.us)

  • list_messages: list messages inside a chat

  • mark_read: mark all messages in a chat as read

  • archive: archive a chat (hide it from the main chat list)

  • unarchive: unarchive a chat (restore it to the main chat list)

  • get_media: download media bytes for one message by its wire key — returns url/data_base64 + mimetype/filename + original_quality flag (false when WA returned a preview rather than the original; currently only happens for own-sent newsletter media).

  • get_participants: list the members of a group chat

  • load_more_history: request OLDER history for ONE specific chat (chat_id) from the phone, so a subsequent list_messages can page further back. Each call pulls one page; call it again to go deeper. Use it whenever a chat's loaded messages don't reach far enough back for what you need. Paced and limited: one request per chat at a time, WA-paced — a call while that chat's request is in flight or cooling down returns added:0 (not an error); wait and retry. While the initial sync is still running the call throws a not_connected error. After repeated unanswered requests WhatsApp history requests pause: the result's error starts "cooling_down:" and says how long to wait — retry after that, don't treat it as "no history". canLoadMore:false = history is genuinely exhausted — stop paging. A chat with no messages AND no chat activity on the engine (e.g. a saved contact whose conversation WhatsApp's first sync never delivered: get returns it with lastMessageAt null) has nothing to page back from, so added stays 0. Once one message is sent or received in that chat, its older history can be requested.

  • send_message_text: send a text message NOW (fire-and-forget). Body: {chat_id, type: "text", text}

  • send_message_media: send an image/video/audio/document NOW. Body: {chat_id, type: "media", media: {url, kind?, caption?, filename?}}

  • send_message_poll: send a poll NOW. Body: {chat_id, type: "poll", poll: {question, options[2..12], allow_multiple?}}

type is derived automatically from the action ("text"/"media"/"poll"), so you don't need to send it; include it only if you want to be explicit.

send_message_* is for IMMEDIATE delivery into a chat — use the scheduled_messages tool's send action to schedule a future send (with send_at) or to keep the message in a queue you can edit/cancel before dispatch.

Examples:

Input Schema

NameRequiredDescriptionDefault
keyNo
pollNo
skipNo
textNo
typeNo
limitNo
mediaNo
orderNo
queryNo
sinceNo
untilNo
actionYes
chat_idNo
reply_toNo
message_typesNo
include_archiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does so well for the most complex action: it discloses `load_more_history` pacing, `added:0` retry semantics, `not_connected` during initial sync, `cooling_down:` errors, and `canLoadMore:false` exhaustion. It also notes that sends are fire-and-forget, archive/unarchive hide or restore a chat, and `get_media` may return a preview via `original_quality=false`. It still omits some operational details such as send failure modes, permission requirements, and rate limits for sending media.

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 description is long, but the length is largely justified by 13 actions and several important caveats. It is front-loaded with the core purpose and structured as a clear bullet list with examples at the end. The `load_more_history` section is somewhat verbose and repetitive, but most sentences provide operational value rather than filler.

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?

Given the tool's complexity, lack of annotations, and 0% schema description coverage, the description is substantially complete for action selection and many invocation details, especially for `load_more_history` and immediate versus scheduled sending. It still leaves some optional parameters and return-shape expectations undocumented, so an agent may need to infer how to use filters such as `since`, `until`, `message_types`, and `reply_to` correctly.

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 0%, so the description must compensate, and it does explain several important parameters: `limit`/`skip` pagination, `query` in search, `include_archive`, `chat_id` examples, poll option constraints, media body fields, and automatic `type` derivation for send actions. However, several parameters remain unexplained, including `key`, `order`, `since`, `until`, `message_types`, `reply_to`, and `media.data_base64`, leaving meaningful gaps across a 16-parameter schema.

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?

The description opens with a specific verb and resource: "Read or send WhatsApp messages inside chats on the connected engine." It then enumerates all 13 actions with concrete meanings, so an agent can distinguish chat listing, searching, message listing, media retrieval, and sending without opening the schema. It also explicitly separates immediate sends from the sibling `scheduled_messages` tool.

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?

The description gives explicit usage conditions: `send_message_*` is for immediate delivery while `scheduled_messages` handles future sends, `include_archive=true` is needed to find archived chats, and `load_more_history` is the tool to use when a chat's loaded messages do not reach far enough back. These are concrete when-to-use and when-to-use-alternative instructions rather than implied guidance.

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