Tool: search_conversations
Searches for Google Chat conversations by display name.
If only participants are provided, this tool finds 1:1 direct messages (if one participant is provided) or group chats (if multiple participants are provided) that include the specified participants and the calling user.
If only a query is provided, this tool searches for conversations where the query is a case-insensitive substring of the conversation's display name.
If both participants and query are provided, this tool finds conversations by participants and then filters them by display name.
If neither participants nor query are provided, this tool lists all conversations the calling user is a member of.
This tool only lists conversations the calling user is a member of.
IMPORTANT: An empty 'conversations' list does not mean there are no more results overall. If 'next_page_token' is present, more pages can be fetched. If you get an empty list but a 'next_page_token', ask the user if you should continue the searching.
The following sample demonstrate how to use curl
to invoke the search_conversations
MCP tool.
| Curl Request |
|---|
curl --location 'https://chatmcp.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "search_conversations", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for FindConversations RPC.
SearchConversationsRequest
| JSON representation |
|---|
{ "spaceNameQuery" : string , "pageSize" : integer , "pageToken" : string , "participants" : [ string ] } |
| Fields | |
|---|---|
spaceNameQuery
|
Optional. The text to search for within the space display names. |
pageSize
|
Optional. The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
pageToken
|
Optional. A page token, received from a previous |
participants[]
|
Optional. List of email addresses of the participants to filter the conversations, excluding the caller. |
Output Schema
Response message for FindConversations RPC.
SearchConversationsResponse
| JSON representation |
|---|
{
"conversations"
:
[
{
object (
|
| Fields | |
|---|---|
conversations[]
|
List of conversation objects that match the search criteria. |
nextPageToken
|
A token that can be sent as |
Conversation
| JSON representation |
|---|
{
"conversationId"
:
string
,
"displayName"
:
string
,
"conversationType"
:
enum (
|
| Fields | |
|---|---|
conversationId
|
The ID of the conversation (e.g., "spaces/AAAAAAAAA"). |
displayName
|
The display name of the conversation. |
conversationType
|
The type of conversation (DIRECT_MESSAGE, GROUP_CHAT, or NAMED_SPACE). |
lastActiveTimestamp
|
The last active time of the conversation in ISO 8601 format. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Timestamp
| JSON representation |
|---|
{ "seconds" : string , "nanos" : integer } |
| Fields | |
|---|---|
seconds
|
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos
|
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

