

Google Chat
Connector
Available ActionsEach successful request consumes credits as outlined below.
list_spaces5crget_space5crsearch_spaces5crfind_direct_message5crlist_messages5crget_message5crsearch_messages5crcreate_message5crreply_message5crupdate_message5crdelete_message5crlist_reactions5cradd_reaction5crdelete_reaction5crlist_message_attachments5crget_attachment5crsearch_attachments5crupload_attachment5crdownload_attachment_to_storage5cr
Details
Bridge your agent to your Google Chat spaces—post updates, keep threads moving, and turn routine teamwork into quick, automated nudges that keep everyone in sync. Supports reactions, direct messaging, and posting and reading in spaces. All actions take place as the connected user.
Use Cases
Search accessible spaces, Find direct-message spaces, Read and search messages, Send messages and replies, Attach File Manager files to Chat messages, Download Chat attachments to File Manager, Add or remove reactions, Automate team notifications
Dynamic MCP Setup
Connect once through AgentPMT Dynamic MCP, then use approved tools from the same agent connection.
30 Second Setup
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections.
npm install -g @agentpmt/mcp-routeragentpmt-setupHosted Streamable HTTPS
MCP endpoint for browser-based apps like ChatGPT, Claude, Grok, or any time you want a streamable connection with no local install.
https://api.agentpmt.com/mcpConfig Example
Use the hosted endpoint directly in clients that support remote MCP. Store your Bearer token in the client config or secret field.
{
"mcpServers": {
"agentpmt": {
"type": "streamable-http",
"url": "https://api.agentpmt.com/mcp",
"headers": {
"Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
"x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
}
}
}
}Need client videos, organization controls, audit details, and the full feature overview?
More About Dynamic MCPCredentials
Google OAuth *
Connect your Google account.
Manage credentials in your dashboard.
Actions(19)
list_spaces5cr3 paramsList accessible spaces.
list_spaces5cr3 paramsList accessible spaces.
page_sizeintegerPage size.
page_tokenstringNext page token.
filterstringspaces.list filter.
get_space5cr1 param(1 required)Get a space.
get_space5cr1 param(1 required)Get a space.
spacerequiredstringSpace name or ID.
search_spaces5cr4 params(1 required)Search accessible spaces.
search_spaces5cr4 params(1 required)Search accessible spaces.
queryrequiredstringSpace search query.
page_sizeintegerPage size.
page_tokenstringNext page token.
order_bystringSpace sort order.
Values:
create_time DESCrelevance DESC
find_direct_message5cr1 param(1 required)Find a DM space.
find_direct_message5cr1 param(1 required)Find a DM space.
user_namerequiredstringUser name, e.g. users/123.
list_messages5cr6 params(1 required)List messages; newest first by default.
list_messages5cr6 params(1 required)List messages; newest first by default.
spacerequiredstringSpace name or ID.
page_sizeintegerPage size.
page_tokenstringNext page token.
filterstringMessage filter.
order_bystringMessage sort order.
Values:
create_time DESCcreate_time ASCcreateTime DESCcreateTime ASC
show_deletedbooleanInclude deleted messages.
get_message5cr2 params(1 required)Get a message.
get_message5cr2 params(1 required)Get a message.
message_namerequiredstringMessage name or ID.
spacestringSpace for short IDs.
search_messages5cr10 params(2 required)Bounded message search in one space.
search_messages5cr10 params(2 required)Bounded message search in one space.
spacerequiredstringSpace name or ID.
queryrequiredstringSearch text.
filterstringOptional list filter.
order_bystringScan sort order.
Values:
create_time DESCcreate_time ASCcreateTime DESCcreateTime ASC
show_deletedbooleanInclude deleted messages.
page_sizeintegerScan page size.
max_resultsintegerMax matches.
scan_limitintegerMax messages scanned.
case_sensitivebooleanCase-sensitive match.
search_fieldsarrayFields to search.
Array of: string
create_message5cr11 params(1 required)Create a message, optionally with files.
create_message5cr11 params(1 required)Create a message, optionally with files.
spacerequiredstringTarget space.
textstringMessage text.
cards_v2arrayCards v2 payload.
Array of: object
thread_namestringThread name.
thread_keystringThread key.
message_reply_optionstringReply option.
Values:
REPLY_MESSAGE_FALLBACK_TO_NEW_THREADREPLY_MESSAGE_OR_FAIL
message_request_idstringIdempotency requestId.
message_idstringClient message ID.
notification_typestringNotification type.
Values:
NOTIFICATION_TYPE_NONENOTIFICATION_TYPE_FORCE_NOTIFYNOTIFICATION_TYPE_SILENT
file_idsarrayFile Manager IDs to attach.
Array of: string
max_upload_bytesintegerMax upload bytes.
reply_message5cr10 params(1 required)Reply to a message, optionally with files.
reply_message5cr10 params(1 required)Reply to a message, optionally with files.
message_namerequiredstringMessage name or ID.
spacestringSpace for short IDs.
textstringReply text.
cards_v2arrayCards v2 payload.
Array of: object
message_reply_optionstringReply option.
Values:
REPLY_MESSAGE_FALLBACK_TO_NEW_THREADREPLY_MESSAGE_OR_FAIL
message_request_idstringIdempotency requestId.
message_idstringClient message ID.
notification_typestringNotification type.
Values:
NOTIFICATION_TYPE_NONENOTIFICATION_TYPE_FORCE_NOTIFYNOTIFICATION_TYPE_SILENT
file_idsarrayFile Manager IDs to attach.
Array of: string
max_upload_bytesintegerMax upload bytes.
update_message5cr4 params(1 required)Update message text/cards.
update_message5cr4 params(1 required)Update message text/cards.
message_namerequiredstringMessage name or ID.
spacestringSpace for short IDs.
textstringUpdated text.
cards_v2arrayUpdated cards v2.
Array of: object
delete_message5cr3 params(1 required)Delete a message.
delete_message5cr3 params(1 required)Delete a message.
message_namerequiredstringMessage name or ID.
spacestringSpace for short IDs.
forcebooleanDelete replies too.
list_reactions5cr5 params(1 required)List message reactions.
list_reactions5cr5 params(1 required)List message reactions.
message_namerequiredstringMessage name or ID.
spacestringSpace for short IDs.
page_sizeintegerPage size.
page_tokenstringNext page token.
filterstringReaction filter.
add_reaction5cr3 params(2 required)Add a reaction.
add_reaction5cr3 params(2 required)Add a reaction.
message_namerequiredstringMessage name or ID.
emoji_unicoderequiredstringUnicode emoji.
spacestringSpace for short IDs.
delete_reaction5cr3 params(1 required)Delete a reaction.
delete_reaction5cr3 params(1 required)Delete a reaction.
reaction_namerequiredstringReaction name or ID.
message_namestringMessage for short IDs.
spacestringSpace for short IDs.
list_message_attachments5cr2 params(1 required)List message attachments.
list_message_attachments5cr2 params(1 required)List message attachments.
message_namerequiredstringMessage name or ID.
spacestringSpace for short IDs.
get_attachment5cr3 params(1 required)Get attachment metadata from its message.
get_attachment5cr3 params(1 required)Get attachment metadata from its message.
attachment_namerequiredstringAttachment name, ID, or contentName.
message_namestringParent message.
spacestringSpace for short IDs.
search_attachments5cr8 params(2 required)Bounded attachment search in one space.
search_attachments5cr8 params(2 required)Bounded attachment search in one space.
spacerequiredstringSpace name or ID.
queryrequiredstringSearch text.
filterstringOptional list filter.
order_bystringScan sort order.
Values:
create_time DESCcreate_time ASCcreateTime DESCcreateTime ASC
page_sizeintegerScan page size.
max_resultsintegerMax matches.
scan_limitintegerMax messages scanned.
case_sensitivebooleanCase-sensitive match.
upload_attachment5cr5 params(2 required)Upload a File Manager file to Chat.
upload_attachment5cr5 params(2 required)Upload a File Manager file to Chat.
spacerequiredstringTarget space.
source_file_idrequiredstringFile Manager source ID.
filenamestringFilename override.
content_typestringMIME type override.
max_upload_bytesintegerMax upload bytes.
download_attachment_to_storage5cr7 paramsDownload Chat media to File Manager.
download_attachment_to_storage5cr7 paramsDownload Chat media to File Manager.
attachment_namestringAttachment name, ID, or contentName.
media_resource_namestringattachmentDataRef.resourceName.
message_namestringParent message.
spacestringSpace for short IDs.
output_filenamestringStored filename.
expiration_daysintegerExpiration days.
max_bytesintegerMax download bytes.
curl -X POST "https://api.agentpmt.com/products/purchase" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ********" \
-d '{
"product_id": "6968000436a6023a803ab753",
"parameters": {
"action": "list_spaces"
}
}'import requests
import json
url = "https://api.agentpmt.com/products/purchase"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
}
data = {
"product_id": "6968000436a6023a803ab753",
"parameters": {
"action": "list_spaces"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6968000436a6023a803ab753",
parameters: {
"action": "list_spaces"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));const axios = require('axios');
const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6968000436a6023a803ab753",
parameters: {
"action": "list_spaces"
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.message);
});Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.
Recommended
Credit-Based Access Using AgentAddress
AgentAddress is preferred when an autonomous agent needs persistent file access, stored platform state, or maximum tool use ability across repeated calls.
Open Credit-Based Access Using AgentAddressDirect x402 Payment
Use direct x402 for independent one-off tool calls that do not require shared files or stored platform state.
Accepted public payments
- Stablecoin
- USDC
- Chains
- Base, Arbitrum, Optimism, Polygon, and Avalanche
Direct x402 payments are not enabled for this product; use AgentAddress credit access instead.
Product Skill Package
This product has a published Agent Skill package. Install it when an autonomous agent needs product-specific operating instructions in its local skill registry.
OpenClaw install
Copied to clipboard
skills.sh install
Copied to clipboard
Usage Instructions
Usage guidance provided directly by the developer for this product.
Google Chat
Read spaces, list and search messages, send messages, react to messages, and move attachments between Google Chat and AgentPMT File Manager.
This tool uses the existing AgentPMT Google OAuth scopes only:
chat.spaces.readonlychat.messageschat.messages.reactions
It does not manage members or users, does not create/update/delete spaces, does not use admin access, and does not expose custom emoji actions. Member listing requires chat.memberships.readonly or chat.memberships, which this connection does not currently have.
Parameters
action(string, required): Action to perform. Default:get_instructionsspace(string): Space name or ID, such as"spaces/AAA"or"AAA"message_name(string): Message resource name, or short message ID whenspaceis providedreaction_name(string): Reaction resource name, or short reaction ID whenmessage_nameis providedattachment_name(string): Attachment resource name, short attachment ID, or attachmentcontentNamewhenmessage_nameis providedmedia_resource_name(string): DirectattachmentDataRef.resourceNamefor Chat media downloaduser_name(string): User resource name, such as"users/123"query(string): Search query for space/message/attachment search actionstext(string): Message textcards_v2(array): Cards v2 payloadthread_name(string): Existing Chat thread resource namethread_key(string): Thread key for message creationmessage_reply_option(string):REPLY_MESSAGE_FALLBACK_TO_NEW_THREADorREPLY_MESSAGE_OR_FAILmessage_request_id(string): Google ChatrequestIdfor idempotent message creationmessage_id(string): Client-assigned Google Chat message IDnotification_type(string):NOTIFICATION_TYPE_NONE,NOTIFICATION_TYPE_FORCE_NOTIFY, orNOTIFICATION_TYPE_SILENTpage_size(integer, default 50): Max results per page. Reactions max is 200.page_token(string): Pagination tokenfilter(string): Google Chat filter queryorder_by(string): Sort ordershow_deleted(boolean, default false): Include deleted messages in message list/searchmax_results(integer, default 25): Max client-side search matchesscan_limit(integer, default 500): Max messages scanned by bounded client-side searchcase_sensitive(boolean, default false): Use case-sensitive client-side searchsearch_fields(array): Fields searched bysearch_messages:text,formatted_text,argument_text,sender,attachment_nameemoji_unicode(string): Unicode emoji foradd_reactionforce(boolean, default false): Fordelete_message, also delete threaded repliesfile_ids(array): AgentPMT File Manager file IDs to upload and attach tocreate_messageorreply_messagesource_file_id(string): AgentPMT File Manager file ID forupload_attachmentfilename(string): Optional upload filename overridecontent_type(string): Optional upload MIME type overridemax_upload_bytes(integer, default 26214400): Max File Manager bytes uploaded to Chatmax_bytes(integer, default 26214400): Max Chat attachment bytes downloadedoutput_filename(string): File Manager filename for downloaded attachmentexpiration_days(integer, default 7): Stored download expiration, 1-7 days
Sorting
list_messages sends order_by: "create_time DESC" by default, so messages are newest first. Send order_by: "create_time ASC" for oldest first.
Google also accepts legacy camel-case sort aliases from this tool:
{"action":"list_messages","space":"spaces/AAA","order_by":"createTime DESC"}
The tool normalizes that to official Google Chat syntax.
Search
search_spaces is Google server-side search. Non-admin Google Chat search needs a display-name query for useful results:
{"action":"search_spaces","query":"display_name:\"Launch\"","order_by":"relevance DESC"}
search_messages and search_attachments are bounded client-side searches within one space. They page through accessible messages using list_messages, scan up to scan_limit, and return scan_limit_reached when the scan stopped before the space was exhausted. These are not global Google-side full-text search endpoints.
File Upload
Preferred path: attach File Manager files directly when creating or replying to a message.
{
"action": "create_message",
"space": "spaces/AAA",
"text": "Attached is the latest report.",
"file_ids": ["file-manager-id-1"]
}
Advanced path: use upload_attachment to stage a File Manager file in Chat and return an attachment_data_ref.
{"action":"upload_attachment","space":"spaces/AAA","source_file_id":"file-manager-id-1"}
File uploads require normal authenticated budget context. Admin bypass cannot read budget-scoped File Manager files.
File Download
List attachments on a message:
{"action":"list_message_attachments","message_name":"spaces/AAA/messages/BBB"}
Download an attachment into AgentPMT File Manager:
{
"action": "download_attachment_to_storage",
"message_name": "spaces/AAA/messages/BBB",
"attachment_name": "spaces/AAA/messages/BBB/attachments/ATT",
"output_filename": "report.pdf"
}
If you already have attachment.attachmentDataRef.resourceName, you can download directly:
{
"action": "download_attachment_to_storage",
"media_resource_name": "spaces/AAA/messages/BBB/attachments/ATT/media",
"output_filename": "report.pdf"
}
get_attachment reads the parent message and finds the attachment in message data. It does not call the bot-only spaces.messages.attachments.get endpoint.
Actions
get_instructions
Returns this documentation.
{"action":"get_instructions"}
list_spaces
Lists spaces the authenticated user has access to.
Required: none
Optional: page_size, page_token, filter
{"action":"list_spaces","page_size":25}
{"action":"list_spaces","filter":"space_type = \"SPACE\""}
get_space
Gets a space by resource name or short ID.
Required: space
{"action":"get_space","space":"spaces/AAA"}
search_spaces
Searches accessible spaces with Google Chat server-side space search. Admin access is not exposed.
Required: query
Optional: page_size, page_token, order_by
{"action":"search_spaces","query":"display_name:\"Launch\"","order_by":"relevance DESC"}
find_direct_message
Finds the direct message space with a user.
Required: user_name
{"action":"find_direct_message","user_name":"users/123456789"}
list_messages
Lists messages in a space. Defaults to newest first.
Required: space
Optional: page_size, page_token, filter, order_by, show_deleted
{"action":"list_messages","space":"spaces/AAA","page_size":20}
{
"action": "list_messages",
"space": "spaces/AAA",
"filter": "create_time > \"2026-01-01T00:00:00Z\"",
"order_by": "create_time ASC"
}
get_message
Gets a message by resource name or by short message ID with space.
Required: message_name
Optional: space
{"action":"get_message","message_name":"spaces/AAA/messages/BBB"}
search_messages
Bounded client-side search within one space.
Required: space, query
Optional: filter, order_by, show_deleted, page_size, max_results, scan_limit, case_sensitive, search_fields
{"action":"search_messages","space":"spaces/AAA","query":"invoice","max_results":10,"scan_limit":500}
{
"action": "search_messages",
"space": "spaces/AAA",
"query": "Taylor",
"search_fields": ["sender"],
"order_by": "create_time DESC"
}
create_message
Sends a new message to a space. At least one of text, cards_v2, or file_ids is required.
Required: space, plus one content field
Optional: thread_name, thread_key, message_reply_option, message_request_id, message_id, notification_type, file_ids, max_upload_bytes
{"action":"create_message","space":"spaces/AAA","text":"Hello from the agent."}
{
"action": "create_message",
"space": "spaces/AAA",
"text": "Here is the file.",
"file_ids": ["file-manager-id-1"]
}
reply_message
Replies in the original message's thread. At least one of text, cards_v2, or file_ids is required.
Required: message_name, plus one content field
Optional: space, message_reply_option, message_request_id, message_id, notification_type, file_ids, max_upload_bytes
{"action":"reply_message","message_name":"spaces/AAA/messages/BBB","text":"Got it."}
{
"action": "reply_message",
"message_name": "spaces/AAA/messages/BBB",
"text": "Attached.",
"file_ids": ["file-manager-id-1"]
}
update_message
Edits an existing message. Only text and cards_v2 updates are exposed.
Required: message_name, plus one of text or cards_v2
Optional: space
{"action":"update_message","message_name":"spaces/AAA/messages/BBB","text":"Updated text"}
delete_message
Deletes a message.
Required: message_name
Optional: space, force
{"action":"delete_message","message_name":"spaces/AAA/messages/BBB"}
{"action":"delete_message","message_name":"spaces/AAA/messages/BBB","force":true}
list_reactions
Lists reactions on a message. page_size must be 200 or less.
Required: message_name
Optional: space, page_size, page_token, filter
{"action":"list_reactions","message_name":"spaces/AAA/messages/BBB"}
{"action":"list_reactions","message_name":"spaces/AAA/messages/BBB","filter":"emoji.unicode = \"\\uD83D\\uDE42\""}
add_reaction
Adds an emoji reaction to a message.
Required: message_name, emoji_unicode
Optional: space
{"action":"add_reaction","message_name":"spaces/AAA/messages/BBB","emoji_unicode":"\\uD83D\\uDC4D"}
delete_reaction
Deletes a reaction.
Required: reaction_name
Optional: message_name, space
{"action":"delete_reaction","reaction_name":"spaces/AAA/messages/BBB/reactions/RRR"}
list_message_attachments
Lists attachments in a message.
Required: message_name
Optional: space
{"action":"list_message_attachments","message_name":"spaces/AAA/messages/BBB"}
get_attachment
Gets attachment metadata from the parent message payload.
Required: attachment_name
Optional: message_name, space
{
"action": "get_attachment",
"message_name": "spaces/AAA/messages/BBB",
"attachment_name": "report.pdf"
}
{"action":"get_attachment","attachment_name":"spaces/AAA/messages/BBB/attachments/ATT"}
search_attachments
Bounded client-side attachment search within one space.
Required: space, query
Optional: filter, order_by, page_size, max_results, scan_limit, case_sensitive
{"action":"search_attachments","space":"spaces/AAA","query":"report","max_results":10}
upload_attachment
Uploads a File Manager file into Chat and returns an attachment_data_ref. Most workflows should use create_message or reply_message with file_ids instead.
Required: space, source_file_id
Optional: filename, content_type, max_upload_bytes
{"action":"upload_attachment","space":"spaces/AAA","source_file_id":"file-manager-id-1"}
download_attachment_to_storage
Downloads a Chat attachment into AgentPMT File Manager.
Required: media_resource_name or attachment_name
Optional: message_name, space, output_filename, expiration_days, max_bytes
{
"action": "download_attachment_to_storage",
"message_name": "spaces/AAA/messages/BBB",
"attachment_name": "report.pdf",
"output_filename": "report.pdf"
}
{
"action": "download_attachment_to_storage",
"media_resource_name": "spaces/AAA/messages/BBB/attachments/ATT/media",
"output_filename": "report.pdf"
}
Response
All successful responses return {"success": true, "output": { ... }} from the tool route. Output varies by action:
list_spaces->{"spaces": [...], "next_page_token": "..."}get_space->{"space": {...}}search_spaces->{"spaces": [...], "next_page_token": "...", "query": "..."}find_direct_message->{"space": {...}, "user_name": "..."}list_messages->{"messages": [...], "next_page_token": "...", "order_by": "create_time DESC"}get_message->{"message": {...}}search_messages->{"messages": [...], "matched_count": 0, "scanned_count": 0, "scan_limit_reached": false}create_message/reply_message->{"message": {...}, "uploaded_attachments": [...]}update_message->{"message": {...}}delete_message/delete_reaction->{"deleted": true, "name": "..."}list_reactions->{"reactions": [...], "next_page_token": "..."}add_reaction->{"reaction": {...}}list_message_attachments->{"attachments": [...], "count": 0}get_attachment->{"attachment": {...}, "message_name": "..."}search_attachments->{"attachments": [...], "matched_count": 0, "scanned_messages": 0}upload_attachment->{"attachment_data_ref": {...}, "source_file": {...}}download_attachment_to_storage->{"attachment": {...}, "download": {"stored_as": {...}, "content_type": "...", "size_bytes": 0}}
Resource Name Formats
- Space:
spaces/AAA - Message:
spaces/AAA/messages/BBB - Thread:
spaces/AAA/threads/CCC - Reaction:
spaces/AAA/messages/BBB/reactions/RRR - Attachment:
spaces/AAA/messages/BBB/attachments/ATT - User:
users/123
Short IDs are accepted only when paired with the parent resource (space or message_name).
Frequently Asked Questions
How do I connect this tool to an external agent?
You can install the local MCP server by opening a terminal and running:
Install commands
npm install -g @agentpmt/mcp-router
agentpmt-setupThis will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.
Alternatively you can connect to the hosted version with this config block, no installation required:
Hosted MCP config
{
"mcpServers": {
"agentpmt": {
"type": "streamable-http",
"url": "https://api.agentpmt.com/mcp",
"headers": {
"Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
"x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
}
}
}
}View MCP Connection Instructions for more details.
How does an external agent use this tool?
After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:
Agent prompt
Use the AgentPMT-Tool-Search-and-Execution tool. First call action 'get_instructions' so you know how to use the tool search interface. Then call action 'get_schema' with tool_id 6968000436a6023a803ab753 ("Google Chat"). After reading the schema and any returned instructions, tell me what this tool can do, we are going to be using it
The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.

