Skip to main content
Glama

get_recent_chats

Read-only

Lists the user's most recent WhatsApp chats (people and groups), newest first: each with its chat_jid, a preview of the last message, last_message_from_me (true if the user sent it, null when unknown), and the contact fields (name; name_source: address_book, push_name, group_subject, business, phone or unresolved; canonical_jid: the JID to pass to send_message and read_chat_history; phone_jid and lid_jid: the chat's phone-number and LID forms, null when unknown or for groups; phone_display: the number as +). Use it for "what's new", to find a chat's JID before read_chat_history, or to pick up recent conversations. To find chats waiting for a reply, use get_unanswered_chats instead.

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": {
      "limit": "<limit>"
    },
    "name": "get_recent_chats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitYesNumber of chats to return (e.g. 20). Keep it small to save context.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds real value beyond that by defining null semantics ('null when unknown', 'null when unknown or for groups') and by telling the agent which field (canonical_jid) to feed into send_message and read_chat_history. It does not discuss pagination or result volume beyond the limit parameter, which is a minor gap.

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 before the field enumeration and the alternative-tool routing comes last, which is the right order. The long parenthetical field list is dense but every item (name_source values, canonical_jid role, phone_display format) is informative rather than filler.

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?

There is no output schema, so the description must explain return values, and it does so field-by-field including enum-like values for name_source and null behavior. Combined with the use-case routing and the annotations, an agent has everything needed to call it 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 100% and the single 'limit' parameter already carries its own guidance ('Number of chats to return (e.g. 20). Keep it small to save context'). The description adds no further constraint on limit, so the schema does the heavy lifting and baseline 3 applies.

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 ('Lists the user's most recent WhatsApp chats (people and groups), newest first') and immediately enumerates the returned fields, so the agent knows exactly what it gets. It also names the sibling it is not ('get_unanswered_chats'), distinguishing the two unambiguously.

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 three concrete use cases ("what's new", obtaining a chat's JID before read_chat_history, resuming recent conversations) and an explicit exclusion routed to an alternative tool ('To find chats waiting for a reply, use get_unanswered_chats instead'). No inference is required to choose this tool.

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.