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 tool MCP 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: { object ( |
| Fields | |
|---|---|
failedConversationReadStates |
The list of failed conversation read states. The key is the index of the conversation in the request, and the value is the error status. 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": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
Status
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
Any
| JSON representation |
|---|
{ "typeUrl": string, "value": string } |
| Fields | |
|---|---|
typeUrl |
Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): In the original design of |
value |
Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |
FailedThreadReadStatesEntry
| JSON representation |
|---|
{
"key": integer,
"value": {
object ( |
| 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