Tool: mark_as_read
Marks Google Chat conversations and threads as read for the calling user.
The read state of the calling user for the provided conversation(s) and/or thread(s) is updated to the time of the latest message in the conversation or thread.
Preconditions:
- At least one of
conversationIds(format:spaces/{space}) orthreadIds(format:spaces/{space}/threads/{thread}) must be non-empty. - Supports bulk updates of up to 10 conversation IDs and 10 thread IDs per call.
Partial Failure Model:
- The request processes each conversation/thread independently and does not fail atomically.
- The response contains
failedConversationReadStatesandfailedThreadReadStatesmaps, where the map key is the 0-based index of the failed item from the request and the value is the error status. - Empty failure maps indicate all requested conversations/threads were marked as read successfully.
The following code sample shows how to use curl to call the mark_as_read MCP tool.
| Curl Request |
|---|
curl --location 'https://chatmcp.googleapis.com/mcp/v1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "mark_as_read", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
MarkAsReadRequest
| JSON representation |
|---|
{ "conversationIds": [ string ], "threadIds": [ string ] } |
| Fields | |
|---|---|
conversationIds[] |
Optional. The list of conversation IDs to update calling user's read state. At least one of |
threadIds[] |
Optional. The list of thread IDs to update calling user's read state. At least one of |
Output Schema
MarkAsReadResponse
| JSON representation |
|---|
{ "failedConversationReadStates": { integer: string, ... }, "failedThreadReadStates": { integer: string, ... } } |
| Fields | |
|---|---|
failedConversationReadStates |
The map of failed conversation read states. The key is the 0-based index of the conversation in the An object containing a list of |
failedThreadReadStates |
The map of failed thread read states. The key is the 0-based index of the thread in the An object containing a list of |
FailedConversationReadStatesEntry
| JSON representation |
|---|
{ "key": integer, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
FailedThreadReadStatesEntry
| JSON representation |
|---|
{ "key": integer, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
Tool Annotations
Tool annotations are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.
Along with the title string, the following boolean hints are defined as follows:
readOnlyHint: If true, the tool doesn't modify its environment. Default: false.destructiveHint: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.idempotentHint: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.openWorldHint: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.
Destructive Hint: ✅ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ❌
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/chat.users.readstate