Skip to main content
Glama

List the chats a number kept

list_chats
Read-only

The chats a number kept messages from, most recent first: the people and groups it received messages from or sent messages to. Each chat is written the way the message.created webhook writes it, so it matches the chats your server already knows. Read one with get_chat_history.

A chat is listed while any of its messages are kept, so the list follows the number's historyPerChat (see update_number); 0 keeps none, and lists none. A contact whose number WhatsApp hides comes back as its phone once your number has seen it, and as its …@lid address until then. Free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_chats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many to return, most recent first. Up to 500; 50 when left out.
numberNoWhich of your numbers: its id or its phone. Optional when you have only one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, non-destructive, closed-world), and the description goes well beyond them: it discloses the ordering, the dependency on the number's historyPerChat retention setting, the fact that a contact appears as a phone number once seen and as its …@lid address until then, and that the call is free. It also explains that each chat matches the message.created webhook shape, so results are consistent with data the server already has.

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 core purpose and the sibling routing are front-loaded, and the retention caveat follows in the right order. Dense but largely waste-free; the density of the final two sentences (lid addressing, free) makes them slightly harder to scan than necessary, but nothing is genuinely redundant.

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?

For a two-parameter, read-only list tool with no output schema, the description supplies the result shape by analogy (written the way the message.created webhook writes it) and explains retention-driven variability of results. The only missing piece is pagination: with a 500 cap and no cursor mentioned, an agent has no guidance on how to reach older chats beyond the limit.

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 both parameters (limit with its 1-500 range and 50 default, plus number accepting an id or phone and being optional for single-number accounts) are fully documented there. The description reinforces 'most recent first' ordering but adds no syntax or format detail beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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 resource and scope: the chats a number kept messages from, most recent first, with people and groups that received or sent messages. It also explicitly distinguishes itself from the read-one sibling: "Read one with get_chat_history." An agent can pick between the list and the single-chat read without opening either schema.

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

Usage Guidelines4/5

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

Names the alternative (get_chat_history) and gives the condition for membership: a chat is listed while any of its messages are kept, and historyPerChat=0 keeps none. The retained-message prerequisite is a real when/when-not rule. The only gap is that it doesn't say what to do instead when the list comes back empty, though the historyPerChat reference points at the fix.

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