Skip to main content
Glama
google-chat-mcp-server

google-chat-mcp-server

by tg-tool

search_messages

Search Google Chat messages by keywords and date range across selected spaces, retrieving and matching content locally when built-in search is unavailable.

Instructions

期間を区切って、キーワードでメッセージを探す。Google 側に検索の仕組みが無いため、取得して手元で照合する。

  • keywords は空白区切りで、すべての語を含むもの(AND)を探す。全角半角・大文字小文字は区別しない。 本文と添付ファイルの名前が対象。

  • spaces を省略すると、人の最後の発言が期間内にあるスペースを調べる(since の既定は 30日前)。 ボットだけが投稿するスペースは対象から外れるので、探すときは spaces で指定する。 調べなかったスペースの数は notes に書く。

  • 結果は新しい順。truncated が true なら件数上限や走査上限で打ち切っている(理由は truncated_reasons)。 その場合は期間や語で絞って探し直す。

Args: keywords: 探す語(空白区切り)。 spaces: 調べるスペースの名前・URL・ID のリスト。省略時は期間内に動いたスペースすべて。 since: この時刻より後だけ(既定は 30日前)。 until: この時刻より前だけ。 limit: 返すヒットの最大件数(既定 50)。

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": {
      "keywords": "<keywords>"
    },
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
sinceNo
untilNo
spacesNo
keywordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does substantial work: it discloses the local-fetch/match mechanism (implying scan cost), the 30-day default window, the bot-only-space exclusion, the `notes` field reporting skipped spaces, newest-first ordering, and truncation causes via `truncated_reasons`. It does not mention auth requirements or concrete cost/rate limits, so a 4 rather than 5.

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?

Bulleted structure with the core behavior front-loaded, followed by the per-argument list; each bullet carries real information. There is minor redundancy where defaults for since and limit are restated in both the bullets and the Args section.

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?

With no output schema and five parameters, the description responsibly covers return semantics itself: newest-first ordering, the truncated flag with truncated_reasons, and the notes field for uninspected spaces. It does not sketch the shape of an individual hit record, but an agent has enough to call this correctly.

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 description coverage is 0%, and the Args block compensates by defining every one of the five parameters: keywords are space-separated AND terms, full-width/half-width and case are ignored, matching covers body text and attachment names; spaces accepts names, URLs, or IDs; since/until bound the window; limit defaults to 50. The remaining gap is datetime format for since/until, which is never specified despite the '30日前' default.

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 ('期間を区切って、キーワードでメッセージを探す') and even explains the mechanism: Google has no server-side search, so results are fetched and matched locally. It is instantly distinguishable in practice from get_messages or list_spaces, but it never explicitly names a sibling or contrasts behavior with one, which keeps it from a 5.

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?

Strong operational guidance: it tells the agent that omitting `spaces` inspects only spaces with recent human activity, that bot-only spaces are skipped and must be named explicitly, and that on `truncated` the agent should re-search with a narrower period or fewer keywords. What is missing is an explicit 'use X instead when...' routing statement against get_messages/get_unread.

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