Skip to main content
Glama

Messaging: List recent messages

messaging_list_recent_messages
Read-onlyIdempotent

Digest of the messages RECEIVED across every WhatsApp/Instagram/Facebook/Telegram chat in a time window: 'what did I get on WhatsApp since yesterday noon?', 'summarize my Telegram messages of the last 2 hours', scheduled inbound digests. Enumerates chats without a creation-date filter, reads each one with message-level after/before and returns inbound messages grouped by chat, newest first. For Facebook, inbox_id selects one personal or Page inbox. When complete is false (enumeration or read limits, or unknown message direction), say so instead of presenting the digest as exhaustive. Returns chat_id + message id pairs usable with message_get / messaging_send_message.

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": {
      "provider": "<provider>",
      "after": "<after>",
      "include_sent": "<include_sent>",
      "chat_type": "<chat_type>",
      "max_chats": "<max_chats>"
    },
    "name": "messaging_list_recent_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterYesStart of the window, ISO 8601 with Z or offset (exclusive). Convert 'since yesterday noon' with the user's timezone.
beforeNoEnd of the window (exclusive); omit for 'until now'.
inbox_idNoRequired for Facebook: exact personal or PAGE_<id>_INBOX inbox.id from facebook_list_inboxes. Preserves the sending identity. Omit for other providers.
providerYesMessaging provider named by the user. LinkedIn recipients use linkedin_resolve_person + linkedin_start_conversation instead.
chat_typeYesRestrict to direct chats or groups.all
max_chatsYesMaximum number of chats read for messages (most recently active first).
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Required when the user has several accounts for the provider: pick the one the user named.
include_sentYesAlso return messages sent by the user (default: inbound only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / inbox_id
      Added value: +{
      +  "description": "Required for Facebook: exact personal or PAGE_<id>_INBOX inbox.id from facebook_list_inboxes. Preserves the sending identity. Omit for other providers.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / provider / enum
      Previous value: -[
      -  "whatsapp",
      -  "instagram",
      -  "telegram"
      -]New value: +[
      +  "whatsapp",
      +  "instagram",
      +  "facebook",
      +  "telegram"
      +]
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description still adds real behavior: no creation-date filter on enumeration, per-chat message-level after/before reads, newest-first grouping, max_chats-driven read limits, and the `complete=false` caveat the agent must surface. It also states the return shape (chat_id + message id pairs) usable with message_get / messaging_send_message.

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?

Front-loaded with the core purpose and example triggers, then the mechanics, then the completeness caveat — a sensible ordering with essentially no filler. It is dense (multi-clause sentences cramming enumeration, read, and return details) and could be split for readability, but nothing is redundant.

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?

With no output schema and 8 parameters, the description carries the burden well: it explains what is returned, ordering, grouping, and downstream tool handoff, plus the non-exhaustive-result warning. An agent can call it and interpret results correctly without further context.

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 coverage is 100%, so the schema already documents all 8 parameters including timezone conversion for `after`, `inbox_id` for Facebook, and the max_chats cap. The description only reinforces window semantics and the include_sent/inbound distinction, adding little meaning beyond structured fields.

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?

Opens with a specific verb+resource ('Digest of the messages RECEIVED across every WhatsApp/Instagram/Facebook/Telegram chat in a time window') and constrains it to inbound, grouped-by-chat output. This is clearly distinguishable from single-chat readers (messaging_list_messages) and chat enumerators (messaging_list_chats) named nearby in the toolset.

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?

Gives concrete user-utterance triggers ('what did I get on WhatsApp since yesterday noon?', scheduled inbound digests) and routes LinkedIn users elsewhere via the provider parameter. It does not explicitly say when to prefer messaging_list_messages or facebook_list_recent_messages over this multi-provider digest, so the negative case is only implied.

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.