Tool: send_message
Sends a Google Chat message to a conversation with Markdown formatting.
This tool uses a conversation ID, an optional thread ID, and a message text as inputs.
Conversation IDs can be found using the search_conversations tool.
It returns the created message.
The following code sample shows how to use curl to call the send_message 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": "send_message", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
SendMessageRequest
| JSON representation |
|---|
{ "conversationId": string, "threadId": string, "messageText": string, "cards": [ { object } ], "inlineCitations": [ { object ( |
| Fields | |
|---|---|
conversationId |
Required. The ID of the conversation (e.g., 'spaces/AAAA...') to send the message to. |
threadId |
Optional. The ID of the thread (e.g., 'spaces/AAAA.../threads/BBBB...') to send the message to. If not set, the message will be sent to a new thread. |
messageText |
Required. The main content of the message. Formatting can be added using standard Markdown (note that tables are NOT supported). The following formatting is supported:
|
cards[] |
Optional. Cards attached to the message. Maximum size is 32 KB per card. Each card is represented as a JSON struct following the Google Chat Card format (Google Workspace UIKit Card / Cards v2). To attach cards to a message, the Chat app must be a member of the space. Images in cards aren't supported. Card identification:
|
inlineCitations[] |
Optional. Inline citations referenced within |
footerCitedSources[] |
Optional. Top-level cited sources displayed as reference cards at the bottom (footer) of the message. A maximum of 50 cited sources are allowed in total across all inline citations and footer sources in a message. |
Struct
| JSON representation |
|---|
{ "fields": { string: value, ... } } |
| Fields | |
|---|---|
fields |
Unordered map of dynamically typed values. An object containing a list of |
FieldsEntry
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
Value
| JSON representation |
|---|
{ "nullValue": null, "numberValue": number, "stringValue": string, "boolValue": boolean, "structValue": { object }, "listValue": array } |
| Fields | |
|---|---|
Union field kind. The kind of value. kind can be only one of the following: |
|
nullValue |
Represents a JSON |
numberValue |
Represents a JSON number. Must not be |
stringValue |
Represents a JSON string. |
boolValue |
Represents a JSON boolean ( |
structValue |
Represents a JSON object. |
listValue |
Represents a JSON array. |
ListValue
| JSON representation |
|---|
{ "values": [ value ] } |
| Fields | |
|---|---|
values[] |
Repeated field of dynamically typed values. |
Citation
| JSON representation |
|---|
{
"id": string,
"citedSources": [
{
object ( |
| Fields | |
|---|---|
id |
Required. Unique identifier matching the |
citedSources[] |
Required. One or more sources attached to this citation hovercard. A maximum of 50 cited sources are allowed in total across all inline citations and footer sources in a message. |
CitedSource
| JSON representation |
|---|
{ "title": string, "url": string, "snippet": string, "imageUrl": string, "footer": string } |
| Fields | |
|---|---|
title |
Required. Plaintext title of the source (e.g., "Google Workspace Developer Preview Program"). Markdown formatting is not supported in titles. |
url |
Required. The URL of the cited resource (must be a valid http:// or https:// URL, e.g., "https://developers.google.com/workspace/preview"). |
snippet |
Optional. A short excerpt or snippet directly from the source. Displayed in the hovercard or footer. Plain text only. Maximum length is 1,000 characters. |
imageUrl |
Optional. URL of an image preview thumbnail (must use an https:// URL). |
footer |
Optional. Additional attribution text displayed in the card footer (e.g. domain name "developers.google.com" or author/org name). |
NullValue
Represents a JSON null.
NullValue is a sentinel, using an enum with only one value to represent the null value for the Value type union.
A field of type NullValue with any value other than 0 is considered invalid. Most ProtoJSON serializers will emit a Value with a null_value set as a JSON null regardless of the integer value, and so will round trip to a 0 value.
| Enums | |
|---|---|
NULL_VALUE |
Null value. |
Output Schema
Response to sending a message to a Google Chat conversation.
SendMessageResponse
| JSON representation |
|---|
{
"message": {
object ( |
| Fields | |
|---|---|
message |
The message that was sent. |
ChatMessage
| JSON representation |
|---|
{ "messageId": string, "threadId": string, "plaintextBody": string, "sender": { object ( |
| Fields | |
|---|---|
messageId |
Resource name of the message. Format: spaces/{space}/messages/{message} |
threadId |
The thread this message belongs to. This will be empty if the message is unthreaded. Format: spaces/{space}/threads/{thread} |
plaintextBody |
Text body of the message using Markdown formatting. |
sender |
The sender of the message. |
createTime |
Output only. Timestamp when the message was created. Format: ISO 8601 timestamp. |
threadedReply |
Whether message is a thread reply. |
attachments[] |
Attachments included in the message. |
reactionSummaries[] |
The emoji reactions summary included in the message. |
quotedMessageMetadata |
Output only. Information about an original message that is quoted or forwarded in this message. Note: This field is under development and may not be present in all environments yet. |
User
| JSON representation |
|---|
{
"userId": string,
"displayName": string,
"email": string,
"userType": enum ( |
| Fields | |
|---|---|
userId |
Resource name of a Chat user. Format: users/{user}. |
displayName |
The display name of a Chat user. |
email |
The email address of the user. This field is only populated when the user type is HUMAN. |
userType |
The type of the user. |
ChatAttachmentMetadata
| JSON representation |
|---|
{
"attachmentId": string,
"filename": string,
"mimeType": string,
"source": enum ( |
| Fields | |
|---|---|
attachmentId |
Resource name of the attachment. Format: spaces/{space}/messages/{message}/attachments/{attachment}. |
filename |
Name of the attachment. |
mimeType |
Content type (MIME type). |
source |
The source of the attachment. |
driveFileId |
Output only. The ID for the Google Drive file. Only populated when the source is DRIVE_FILE. Use with the Google Drive MCP. |
ReactionSummary
| JSON representation |
|---|
{ "emoji": string, "count": integer } |
| Fields | |
|---|---|
emoji |
The emoji unicode string or custom emoji name. |
count |
The total number of reactions using the associated emoji. |
QuotedMessageMetadata
| JSON representation |
|---|
{ "messageId": string, "lastUpdateTime": string, "quoteType": enum ( |
| Fields | |
|---|---|
messageId |
Output only. Resource name of the original message that is quoted or forwarded. Format: spaces/{space}/messages/{message} |
lastUpdateTime |
Output only. Timestamp when the original message was created or last updated prior to being quoted or forwarded. Format: ISO 8601 timestamp. |
quoteType |
Output only. The type of quote. |
plaintextBody |
Output only. Snapshot of the text body of the original message at the time of quoting or forwarding. Formatted using Markdown for |
sender |
Output only. The author display name of the original message. |
attachments[] |
Output only. Attachments that were part of the original message. Populated only for the |
forwardedMetadata |
Output only. Metadata about the source conversation of the forwarded message. Populated only for the |
ForwardedMetadata
| JSON representation |
|---|
{ "conversationId": string, "conversationDisplayName": string } |
| Fields | |
|---|---|
conversationId |
Output only. The resource name of the source conversation. Format: spaces/{space} |
conversationDisplayName |
Output only. The display name of the source conversation at the time the message was forwarded. For named spaces, this is the space name. For 1:1 direct messages, this is the other participant's name. For unnamed group chats, this is a generated name based on members' names. |
UserType
The type of a Google Chat user.
| Enums | |
|---|---|
USER_TYPE_UNSPECIFIED |
Unspecified. |
HUMAN |
Human user. |
APP |
App user. |
Source
The source of the attachment.
| Enums | |
|---|---|
SOURCE_UNSPECIFIED |
Reserved. |
DRIVE_FILE |
The file is a Google Drive file. |
UPLOADED_CONTENT |
The file is uploaded to Chat. |
QuoteType
The quote type indicating whether the message is a quote reply or a forwarded message.
| Enums | |
|---|---|
QUOTE_TYPE_UNSPECIFIED |
Reserved. Undefined quote type. |
REPLY |
The message is a quote reply to an original message in the same thread. |
FORWARD |
The message is forwarded from an original message in a different conversation, or from a different thread in the same conversation. |
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.messageshttps://www.googleapis.com/auth/chat.messages.create