Skip to main content
Glama

Messaging: List chats

messaging_list_chats
Read-onlyIdempotent

List chats for WhatsApp, Instagram or Telegram, most recently active first; use it to find a chat_id. LinkedIn requires inbox-specific listing. V2 filters: type, before/after (on the chat's last activity), archived and unread; WhatsApp pages by offset, other providers by cursor. For 'messages received between X and Y' call messaging_list_recent_messages, which also reads the messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
afterNo
limitNo
beforeNo
cursorNo
offsetNo
providerYes
is_unreadNo
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here.
is_archivedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description adds substantial behavioral context: sort order (most recently active first), filter semantics (before/after based on last activity, archived, unread), pagination differences (WhatsApp offset vs. cursor for others), and provider scope (LinkedIn excluded). It also clarifies that this tool does not read message content by pointing to the alternative. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, compact paragraph with three sentences, each carrying essential information: primary purpose and scope, filter and pagination details, and the alternative tool. It front-loads the core purpose, and every sentence earns its place without redundancy or 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?

Given the complexity of 10 parameters, no output schema, and multiple providers, the description is remarkably complete. It covers the main use case, provider-specific differences, pagination behavior, and the alternative for message retrieval. It does not explicitly list return fields, but the agent can infer that chat objects with chat_ids are returned, and the description clearly states the tool's purpose is to find a chat_id. Nothing essential for correct invocation is missing.

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?

With only 10% schema description coverage, the description compensates by explaining the purpose of key parameters: type, before/after, archived, unread, and pagination (offset vs. cursor). It clarifies that before/after refer to the chat's last activity. However, it does not explicitly describe the 'limit' parameter or the exact output shape, leaving some inference needed. Still, it adds meaningful semantics beyond the 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 states the tool lists chats for WhatsApp, Instagram, or Telegram, most recently active first, and explicitly says its purpose is to find a chat_id. It differentiates from siblings by noting LinkedIn requires inbox-specific listing and by pointing to messaging_list_recent_messages for a different use case. The verb and resource are specific, and the scope is clear.

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?

It provides explicit when-to-use guidance: use to find a chat_id, and clearly states an alternative: for messages between X and Y, call messaging_list_recent_messages. It also warns that LinkedIn requires inbox-specific listing, implying this tool is not for LinkedIn. These exclusions and alternatives are direct and actionable.

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.