Skip to main content
Glama

search_messages

Search WhatsApp messages for any term across recent chats or within a specific chat. Returns matching messages for quick retrieval.

Instructions

Procura um termo nas mensagens recentes (a uazapi não busca texto no servidor).

chat vazio = varre os chats mais recentes; com chat, busca só nele.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNo
sinceNo7d
termoYes
instanceNo
limite_chatsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of disclosing behavior. It usefully warns that 'a uazapi não busca texto no servidor,' meaning the search is limited to locally available recent messages. However, it does not disclose pagination, result ordering, or whether the operation has any side effects, which leaves meaningful behavioral gaps for a search tool.

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 description is short and front-loaded with the core purpose. The parenthetical about server-side search is useful and does not waste words. The chat-mode guidance is compact and adds operational clarity. It could be slightly better structured with explicit parameter notes, but it remains appropriately sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has five parameters, no annotations, and zero schema description coverage, so the description needs to do substantial work. It covers termo and chat adequately but omits the meaning of since, instance, and limite_chats. The output schema exists, so return format is covered elsewhere, but the parameter gaps leave the description incomplete for confident invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the semantics of chat ('chat vazio = varre os chats mais recentes; com chat, busca só nele') and implicitly clarifies termo as the search term. But it leaves since, instance, and limite_chats unexplained, and their role is not inferable from names alone for an AI agent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Procura um termo nas mensagens recentes' (searches for a term in recent messages). It also clarifies behavior with and without a chat argument, which distinguishes it from generic message retrieval tools like get_messages. However, it does not explicitly name sibling alternatives or contrast search_messages against them.

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

Usage Guidelines3/5

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

The description gives practical usage guidance for the chat parameter: empty chat scans recent chats, filled chat searches only in that chat. This implies when to use each mode, but it does not explain when to choose search_messages over siblings like get_messages or list_chats, nor does it state any exclusions or limitations beyond the server-side search caveat.

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