Skip to main content
Glama

Search chats and messages

search

Find matching chats and messages across connected WhatsApp accounts with word or phrase queries and filters for date, sender, media, links, unread status, chat, or account.

Instructions

Search like WhatsApp's search bar, across all your connected accounts (or one, or one chat): chats whose name (or number) matches, and messages whose text matches, newest first. Every word in query must appear, in any order, case-insensitively and anywhere in a word ("inv" finds "invoice"); put a "quoted phrase" in quotes to keep it whole. A photo, video or document's caption counts as its text, and a document without one matches on its file name. Narrow it by date (after, before), by who sent it (from_me), to attachments (media), to messages with links (links), or to ones not yet read (only_new); filters work without a query too (e.g. every document in a chat last week). It searches what Parley has stored: everything in the chats the account holder didn't ignore since the account was linked, plus the history WhatsApp sent at linking and anything load_history fetched. Older messages that are only on the phone aren't found; load_history fetches a chat's older ones. Searching never marks anything read or sends read receipts. To read the conversation around a match, read_inbox with its chat_id and before (page back to it), or load_history.

Input Schema

NameRequiredDescriptionDefault
afterNoOnly messages sent on or after this: a date ("2026-10-01", that whole day included, UTC) or an ISO time.
limitNoHow many messages (default 25).
linksNoOnly messages with a link in them.
mediaNoOnly messages with an attachment: "any", or one kind (image = photos, audio = voice notes and audio).
queryNoWords to find (all of them must appear). "Quoted phrases" match whole. A phone number finds that person's chat.
beforeNoOnly messages sent before this: a date ("2026-10-31", that whole day included, UTC) or an ISO time. To page back, pass the `at` of the oldest match you have.
channelNoOnly this channel, e.g. "whatsapp". Omit for every connected channel.
chat_idNoOnly in this chat (chat_id from list_chats or an earlier result).
from_meNotrue: only what the account holder sent. false: only what others sent. Omit for both.
only_newNoOnly messages from the other side not yet read.
connection_idNoOnly this account: a connection id from list_connections, or its number (e.g. "+65 9136 3557").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the searchable corpus (everything in non-ignored chats since linking, the linking history, plus anything load_history fetched), the side-effect profile ('Searching never marks anything read or sends read receipts'), and ordering. It also explains matching semantics beyond syntax, e.g. captions count as text and a document without a caption matches on its file name.

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?

Dense but front-loaded: the core behavior and scope come first, then matching rules, then filters, then corpus limits, then next steps. Nearly every clause earns its place given 11 optional parameters, though the long semicolon-chained paragraph is harder to scan than short separate sentences would be.

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 an 11-parameter tool with no annotations and no output schema, the description covers the important unknowns: what is indexed, result ordering, absence of read side effects, and how to page backward (referencing the 'at' of the oldest match). It does not describe the shape of the response (e.g. the separate chats and messages groups and their identifying fields), which an agent must discover at call time.

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 baseline is 3, and the description earns a bump by explaining matching behavior the schema only gestures at: every word must appear in any order, matching is case-insensitive and mid-word ('inv' finds 'invoice'), and quoted phrases are kept whole. It also clarifies that filters (after/before, from_me, media, links, only_new) work without a query. Some of this repeats the schema's own descriptions, and it never mentions limit, channel, or connection_id by name.

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 concrete verb and resource (search chats whose names match and messages whose text matches) and states the scope variants (all connected accounts, one account, one chat) plus result ordering, newest first. It is clearly distinguishable from siblings like list_chats, read_inbox, and load_history, which are named as different things.

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?

Explicitly says when it will not find things ('Older messages that are only on the phone aren't found') and names the alternative (load_history) for that case, plus how to get conversation context around a match (read_inbox with chat_id and before, or load_history). It also states filters can be used without a query, e.g. every document in a chat last week.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.