Skip to main content
Glama

search_messages

Search cached WhatsApp messages by case-insensitive substring, newest first, with a configurable limit to locate specific chats or message history.

Instructions

Full-text search across cached messages, newest first.

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
limitNoMax results (1-200).
queryYesCase-insensitive substring to search for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden and does disclose two useful traits: results are limited to the cache and are ordered newest first. It omits other behavior an agent would want, such as whether non-cached history is searched at all, permission requirements, or pagination beyond the limit parameter.

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?

One short sentence with the scope and ordering front-loaded and no filler. It is efficient, though its brevity is partly the cause of the missing usage guidance rather than a sign of completeness.

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?

The tool is simple (two parameters, one required, no nesting, no output schema), and the description covers what is searched and how results are ordered. Given the low complexity and full schema coverage, the remaining gaps are minor.

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 both parameters are already documented, and baseline is 3. The description's phrase 'full-text search' sits slightly at odds with the schema's 'case-insensitive substring' wording, which could mislead an agent about matching semantics rather than clarifying it.

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?

"Full-text search across cached messages" gives a specific verb and resource, and "newest first" adds result ordering. It is distinguishable from retrieval siblings like get_messages or get_message_context, though it never names them to sharpen the contrast.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance and no routing to alternatives such as get_messages or get_message_context. The only implied cue is that 'search' fits content lookup rather than sequential retrieval, which the agent must infer.

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