Skip to main content
Glama

get_whatsapp_chats

Comprehensive WhatsApp chat retrieval tool supporting all chat operations through a unified action-based interface. Perfect for accessing chat lists, searching conversations, filtering by various criteria, and managing chat data. Supports all WhatsApp chat retrieval operations with consistent formatting.

Available actions:

  • recent: Most recent chats

  • unread: Chats with unread messages

  • by_status: Filter by chat status (pending, active, resolved, archived...)

  • assigned: Chats assigned to an agent or department, or to anyone

  • unassigned: Chats nobody is handling yet

  • by_contact_type: Filter by chat type (chat, group, community, channel)

  • by_id: One chat by its WhatsApp ID

  • search: Free text search over phone, name, contact, company, metadata and private notes

  • archived: Archived chats

  • by_date_range: Chats by last message, first message or last inbound message date

Every action accepts labels, labelsExclude, status and contactTypes as extra filters. To find leads that went quiet, use by_date_range with activityType "lastInbound" and a toDate: those are the chats where the customer has not written since then.

Input Schema

NameRequiredDescriptionDefault
pageNoResults page, starting at 0
sortNoResult order. Defaults to the API order (most recent activity first)
limitNoNumber of WhatsApp chats per call (max 100)
queryNoFree text to search for (required for search action)
actionNoChat retrieval action to performrecent
chatIdNoSpecific chat ID (required for by_id action)
deviceYesWhatsApp device ID connected to Wassenger (24 character hexadecimal string)
fieldsNoExplicit dot-path allowlist, e.g. ['id','name','contact.phone','unreadCount']. Overrides verbosity when set.
labelsNoOnly chats carrying at least one of these labels. Use ["*"] for any label. Cannot be combined with labelsExclude
statusNoFilter by chat status (required for by_status action, optional elsewhere)
toDateNoEnd date (for by_date_range and archived actions)
agentIdNoFilter by assigned agent ID (for assigned action)
fromDateNoStart date (for by_date_range and archived actions)
verbosityNoResponse detail level: summary = curated high-signal fields (default, token-lean); standard = broader set; full = complete chat objects (escape hatch).summary
activityTypeNoWhich date the range applies to: last message of any side, first message ever, or last message received from the customerlastMessage
contactTypesNoFilter by chat type (required for by_contact_type action, optional elsewhere)
departmentIdNoFilter by assigned department ID (for assigned action)
labelsExcludeNoExclude chats carrying any of these labels. Use ["*"] to exclude every labelled chat

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the filter-composition rule ('Every action accepts labels, labelsExclude, status and contactTypes as extra filters') and a semantic subtlety for date ranges, but says nothing about permission/auth requirements, pagination or rate limits despite 18 parameters. It adds some context beyond the schema but not enough for a tool of this complexity.

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 action list is scannable and earns its space. The opening two sentences are redundant though: 'Comprehensive... supporting all chat operations' and 'Supports all WhatsApp chat retrieval operations with consistent formatting' say the same thing twice and could collapse into one.

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

Completeness3/5

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

For an 18-parameter tool with no output schema and no annotations, the description covers action selection but omits the required device parameter, pagination semantics, and what the verbosity levels actually return. An agent could pick an action, but the call contract is only complete once it opens the schema.

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; the description lifts it above that by glossing each action's intent and by showing the non-obvious combination of by_date_range + activityType 'lastInbound' + toDate, which the enum descriptions do not convey. It still leaves the device parameter and pagination handling unaddressed.

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?

States a specific verb and resource ('WhatsApp chat retrieval') and enumerates ten named retrieval actions, so an agent knows exactly what it does. However, it never distinguishes itself from the many direct-overlap siblings (get_whatsapp_unread_chats, get_whatsapp_chats_by_status, search_whatsapp_chats_by_name, etc.), which is the difference between a 4 and a 5.

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?

It provides internal guidance via the action glossary and one concrete scenario ('To find leads that went quiet, use by_date_range with activityType "lastInbound" and a toDate'), which is genuinely useful. But it gives zero routing against alternatives, even though siblings like get_whatsapp_unread_chats and search_whatsapp_chats_by_name cover the same ground. Usage is implied through actions, not stated vs. alternatives.

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