Skip to main content
Glama
Automata MCP

Automata MCP

Search WhatsApp messages

search-messages
Read-onlyIdempotent

Find WhatsApp messages containing specified words across all chats or a single chat, with date, sender, and reaction filters.

Instructions

[WhatsApp] Find WhatsApp messages containing given words, newest first, across every chat unless a jid narrows it to one. Matching is case-insensitive and every word must appear in the same message. Covers the history imported when the account was paired as well as everything since. Reaction messages are not searched unless includeReactions is set, which also makes a bare emoji findable. A match you sent is marked fromMe and carries no author; on one you received, author is the sender's name where the account knows it, and absent where it does not. @-mentions in the text are shown as names where the account knows them, and left as raw numeric ids where it does not — an id is not a name to guess at. An edited message is matched on its new text and comes back with editOf, the id of the message it replaces — which may be a separate hit here still carrying its old wording, so prefer the edit when the two disagree. A hit's type names the record as WhatsApp stored it, so an edit reads as protocolMessage and an album item as associatedChildMessage; the text is the real content either way. An edit WhatsApp encrypted for the chat's participants is not searchable at all: its text is unknown to this connector, so a search finding nothing is not proof a message does not exist. Use this instead of paging read-messages when you are looking for something by what it says.

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": {
      "query": "<query>"
    },
    "name": "search-messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
jidNoRestrict to one chat, using a `jid` from list-chats. Omit to search every chat.
limitNoHow many matches to return
queryYesWords to look for. All of them must appear in the message.
sinceNoOnly messages at or after this date, e.g. 2024-03-01 or 2024-03-01T12:00:00Z
untilNoOnly messages at or before this date
fromMeNotrue for only messages you sent, false for only messages you received
includeReactionsNoSearch reaction messages too, matching against the emoji itself. Off by default: a reaction carries an id, an author and a timestamp to say one character, and it rarely answers a question about what was said.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare this a read-only, idempotent, open-world search; the description goes far beyond by disclosing matching rules (case-insensitive, all words in the same message), coverage of imported pre-pairing history, and reaction exclusion. It also states a critical limitation: encrypted edits are not searchable, so an empty result is not proof of absence — exactly the kind of caveat annotations cannot express.

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?

Purpose, ordering, and scope are front-loaded before the edge cases, and nearly every sentence carries non-obvious information (editOf precedence, protocolMessage typing, mention rendering). The weakness is form: one long unbroken paragraph where the return-shape details could be separated from the matching semantics for faster scanning.

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, the description carries the burden of explaining return values and does so: fromMe/author asymmetry, mention-name substitution, `type` values for edits and album items, and editOf. Combined with the search-coverage caveat, an agent has everything needed to call this correctly and to interpret thin results.

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 the baseline is 3; the description earns above that by adding meaning the schema lacks — that `jid` accepts an id from list-chats, that includeReactions also makes a bare emoji findable (not merely "search reactions"), and what fromMe implies about author presence. It does not add anything for `since`/`until` or `limit` beyond the schema, holding it back from a 5.

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?

Specific verb and resource: "Find WhatsApp messages containing given words, newest first," plus explicit scope ("across every chat unless a `jid` narrows it to one"). It distinguishes itself from read-messages by framing the lookup as content-based rather than paging, so an agent can separate it from the sibling catalog without reading the schema.

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?

The closing sentence names the alternative ("Use this instead of paging read-messages when you are looking for something by what it says") and gives the condition that selects it. The description also pins down includeReactions default behavior and when to set it, so the two most likely invocation mistakes are pre-empted.

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