search_messages
Search Google Chat messages across spaces by text substring or creation time. Finds messages matching query text or time range in one or multiple spaces.
Instructions
Search Chat messages across one or many spaces by text and/or time.
The Chat API does not support server-side full-text search, so this tool fetches messages per space (with optional createTime filter applied server-side) and does a case-insensitive substring match on message text client-side. For a single space list without filtering use get_messages. Requires both chat.read and contacts.readonly OAuth scopes (senders are resolved to names via People API).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| query | No | Case-insensitive substring to match in message text. Omit to return messages by time only. | |
| space_id | No | Restrict search to one space ("spaces/<id>"). Omit to search across accessible spaces (capped by max_spaces). | |
| page_size | No | Max messages fetched per space. Default 25. | |
| time_filter | No | Chat API createTime expression, e.g. 'createTime > "2026-03-18T00:00:00Z"' or a range joined with AND. Applied server-side. | |
| max_spaces | No | When space_id is omitted, cap on how many spaces are scanned. Default 10. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |