Skip to main content
Glama

search_messages

Read-only

Smart search of the user's connected message sources (Gmail, Slack, and Facebook Messenger today; more later). Give a natural-language intent; we compile the query, search all connected accounts, retry with different wording if nothing matches, and return only the messages relevant to the intent, plus trials (each query tried + hit count) and note (what was excluded). Slack requires a workspace connected with search:read (older connections must reconnect; they're skipped automatically). Use search_messages_raw instead if you want to run an exact connector query yourself. Chatwork has no search API: it scans only the latest 100 messages of each of the most recently active rooms (default 10, max 30), by keyword substring (space-separated = AND) — older messages are NOT found and there is no time-range filter. coverage in the result says exactly what was scanned.

Input Schema

NameRequiredDescriptionDefault
textYesNatural-language search intent, e.g. "先週の田中さんからの未読メール".
accountsNoLimit to these account labels (see list_accounts). Omit to search all accounts.
connectorsNoLimit to these connectors. Omit to search all connected + readable ones.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / connectors / items / enum
      Previous value: -[
      -  "gmail",
      -  "slack",
      -  "messenger"
      -]New value: +[
      +  "gmail",
      +  "slack",
      +  "messenger",
      +  "chatwork"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses important behavior: query compilation, retries with different wording, return fields `trials` and `note`, Slack `search:read` prerequisite and automatic skipping of older connections, and Chatwork's latest-100-message scan limit with no time-range filter. These details materially affect whether and how an agent should call the 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 front-loaded with purpose and main behavior before moving into caveats and alternatives. It is longer than typical but most sentences carry operational value; the Chatwork limitation paragraph is dense but necessary for a multi-connector search tool.

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?

Given the tool's complexity, lack of output schema, and multiple connector behaviors, the description is complete enough to call correctly. It explains the return fields, connector-specific limitations, prerequisites, and when to prefer the raw search sibling.

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 description coverage is 100%, so `text`, `accounts`, and `connectors` are already well documented in the schema. The description reinforces the natural-language intent and global search behavior but does not add per-parameter syntax or constraints beyond what the schema provides, making 3 the appropriate baseline.

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?

The description states a specific verb and resource: a natural-language, cross-account search over connected message sources, naming Gmail, Slack, and Messenger. It clearly differentiates this smart search from `search_messages_raw`, which is for exact connector queries, so an agent can distinguish the two without opening schemas.

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?

It explicitly says to use `search_messages_raw` instead when running an exact connector query, and it gives Slack connection prerequisites plus Chatwork scan limitations. However, it does not mention the sibling `search_chatwork_messages` as an alternative, leaving some ambiguity around Chatwork-specific search paths.

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.

Resources