Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Search Messages

search_messages
Read-onlyIdempotent

Search Google Chat spaces for messages by keyword and time range, returning matching results per space.

Instructions

Searches for messages in Google Chat spaces by text content and/or time range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoOptional text to search for. If omitted, only time_filter is applied.
space_idNoOptional space to restrict the search to.
page_sizeNoMaximum number of messages to return per space.
max_spacesNoMaximum number of spaces to search when space_id is not provided (default 10).
time_filterNoOptional filter using Chat API createTime syntax. Examples: 'createTime > "2026-03-18T00:00:00-03:00"' 'createTime > "2026-03-18T00:00:00-03:00" AND createTime < "2026-03-19T00:00:00-03:00"'
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.28.0
    • removedInput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / query / type
      Added value: +"string"
    • removedInput schema / properties / space_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / space_id / type
      Added value: +"string"
    • removedInput schema / properties / time_filter / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / time_filter / type
      Added value: +"string"
  2. Changed17 schema fields changedv1.0.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / max_spaces
      Added value: +{
      +  "default": 10,
      +  "description": "Maximum number of spaces to search when space_id is not provided (default 10).",
      +  "type": "integer"
      +}
    • addedInput schema / properties / page_size / description
      Added value: +"Maximum number of messages to return per space."
    • removedInput schema / properties / page_size / title
      Removed value: -"Page Size"
    • addedInput schema / properties / query / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / query / default
      Added value: +null
    • addedInput schema / properties / query / description
      Added value: +"Optional text to search for. If omitted, only time_filter is applied."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / properties / query / type
      Removed value: -"string"
    • removedInput schema / properties / service
      Removed value: -{
      -  "title": "service",
      -  "type": "string"
      -}
    • addedInput schema / properties / space_id / description
      Added value: +"Optional space to restrict the search to."
    • removedInput schema / properties / space_id / title
      Removed value: -"Space Id"
    • addedInput schema / properties / time_filter
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional filter using Chat API createTime syntax.\n         Examples:\n           'createTime > \"2026-03-18T00:00:00-03:00\"'\n           'createTime > \"2026-03-18T00:00:00-03:00\" AND createTime < \"2026-03-19T00:00:00-03:00\"'"
      +}
    • removedInput schema / properties / user_google_email / title
      Removed value: -"User Google Email"
    • changedInput schema / required
      Previous value: -[
      -  "service",
      -  "user_google_email",
      -  "query"
      -]New value: +[
      +  "user_google_email"
      +]
    • removedInput schema / title
      Removed value: -"search_messagesArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object",
      +  "x-fastmcp-wrap-result": true
      +}
  3. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the search-scope context (by content and/or time range) but does not disclose multi-space search behavior, pagination limits, or the role of the required user_google_email. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that names the action, resource, and key filtering dimensions with no filler. Every part contributes to understanding what the tool does.

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

Completeness3/5

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

The description plus annotations and schema are mostly sufficient for a read-only search tool, and an output schema exists so return values need no explanation. However, the required user_google_email parameter is undocumented in both the schema and the description, and the multi-space search semantics are not mentioned. A slightly richer description would improve agent confidence.

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 83%, so the schema carries most parameter documentation. The description adds a high-level mapping to query and time_filter but doesn't add meaning to user_google_email, space_id, page_size, or max_spaces. Baseline of 3 is appropriate given high schema coverage.

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 clearly states the verb ('Searches'), the resource ('messages in Google Chat spaces'), and the filtering dimensions ('text content and/or time range'). It does not explicitly distinguish itself from sibling tools like get_messages, so it stops short of 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 Guidelines3/5

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

The description implies this tool is for searching rather than listing or sending Chat messages, but it provides no explicit when-to-use guidance, no exclusions, and no reference to alternative sibling tools such as get_messages. Usage context is present only by implication.

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

Deploy Server

Other Tools