Tool: send_message
Sends a Google Chat message to a conversation.
This tool uses a conversation ID, an optional thread ID, and a message text as inputs. Conversation ID's can be found using the search_conversations tool. It returns the created message.
The following sample demonstrate how to use curl to invoke the send_message MCP tool.
| Curl Request |
|---|
curl --location 'https://chatmcp.googleapis.com/mcp/v1' \ --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 tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request to send a message to a Google Chat conversation.
SendMessageRequest
| JSON representation |
|---|
{ "conversationId": string, "threadId": string, "messageText": string } |
| 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. Basic formatting can be added using a subset of Markdown. For information about how to format messages, see Format messages. The following formatting is supported:
|
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: |
threadId |
The thread this message belongs to. This will be empty if the message is unthreaded. Format: spaces/{space}/threads/{thread} |
plaintextBody |
Plain text body of the message. |
sender |
The sender of the message. |
createTime |
Output only. Timestamp when the message was created. |
threadedReply |
Whether message is a thread reply. |
attachments[] |
Attachments included in the message. |
reactionSummaries[] |
The emoji reactions summary included in the message. |
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. |
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. |
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. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ✅