KosmoKrator

communication

Google Chat CLI for AI Agents

Use the Google Chat CLI from KosmoKrator to call Google Chat tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Manual OAuth token auth

Google Chat CLI Setup

Google Chat can be configured headlessly with `kosmokrator integrations:configure google-chat`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure google-chat --set access_token="$GOOGLE_CHAT_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor google-chat --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token GOOGLE_CHAT_ACCESS_TOKEN Secret secret yes Access Token
url GOOGLE_CHAT_URL URL url no API Base URL

Call Google Chat Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call google-chat.google_chat_list_spaces '{
  "pageSize": 1,
  "pageToken": "example_pageToken"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:google-chat google_chat_list_spaces '{
  "pageSize": 1,
  "pageToken": "example_pageToken"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs google-chat --json
kosmo integrations:docs google-chat.google_chat_list_spaces --json
kosmo integrations:schema google-chat.google_chat_list_spaces --json
kosmo integrations:search "Google Chat" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Google Chat.

google-chat.google_chat_list_spaces

Read read

List Google Chat spaces the authenticated user belongs to. Returns space names, display names, and types. Supports pagination with pageSize and pageToken.

Parameters
pageSize, pageToken

Generic CLI call

kosmo integrations:call google-chat.google_chat_list_spaces '{"pageSize":1,"pageToken":"example_pageToken"}' --json

Provider shortcut

kosmo integrations:google-chat google_chat_list_spaces '{"pageSize":1,"pageToken":"example_pageToken"}' --json

google-chat.google_chat_get_space

Read read

Get details about a specific Google Chat space. Returns the space name, display name, type, and other metadata.

Parameters
name

Generic CLI call

kosmo integrations:call google-chat.google_chat_get_space '{"name":"example_name"}' --json

Provider shortcut

kosmo integrations:google-chat google_chat_get_space '{"name":"example_name"}' --json

google-chat.google_chat_list_messages

Read read

List messages in a Google Chat space. Returns message text, sender info, and creation timestamps. Supports pagination with pageSize and pageToken.

Parameters
parent, pageSize, pageToken

Generic CLI call

kosmo integrations:call google-chat.google_chat_list_messages '{"parent":"example_parent","pageSize":1,"pageToken":"example_pageToken"}' --json

Provider shortcut

kosmo integrations:google-chat google_chat_list_messages '{"parent":"example_parent","pageSize":1,"pageToken":"example_pageToken"}' --json

google-chat.google_chat_get_message

Read read

Get a specific message from a Google Chat space. Returns the full message including text, cards, sender, and annotations.

Parameters
parent, name

Generic CLI call

kosmo integrations:call google-chat.google_chat_get_message '{"parent":"example_parent","name":"example_name"}' --json

Provider shortcut

kosmo integrations:google-chat google_chat_get_message '{"parent":"example_parent","name":"example_name"}' --json

google-chat.google_chat_create_message

Write write

Send a message to a Google Chat space. Supports plain text and card-based rich messages (cardsV2). Either text or cardsV2 must be provided.

Parameters
parent, text, cardsV2

Generic CLI call

kosmo integrations:call google-chat.google_chat_create_message '{"parent":"example_parent","text":"example_text","cardsV2":"example_cardsV2"}' --json

Provider shortcut

kosmo integrations:google-chat google_chat_create_message '{"parent":"example_parent","text":"example_text","cardsV2":"example_cardsV2"}' --json

google-chat.google_chat_list_memberships

Read read

List members (human users and bots) in a Google Chat space. Returns member names, display names, and roles. Supports pagination with pageSize and pageToken.

Parameters
parent, pageSize, pageToken

Generic CLI call

kosmo integrations:call google-chat.google_chat_list_memberships '{"parent":"example_parent","pageSize":1,"pageToken":"example_pageToken"}' --json

Provider shortcut

kosmo integrations:google-chat google_chat_list_memberships '{"parent":"example_parent","pageSize":1,"pageToken":"example_pageToken"}' --json

google-chat.google_chat_get_current_user

Read read

Get the authenticated user's membership details in a Google Chat space. Returns the user's display name, role, and membership state.

Parameters
parent

Generic CLI call

kosmo integrations:call google-chat.google_chat_get_current_user '{"parent":"example_parent"}' --json

Provider shortcut

kosmo integrations:google-chat google_chat_get_current_user '{"parent":"example_parent"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

google-chat.google_chat_list_spaces

List Google Chat spaces the authenticated user belongs to. Returns space names, display names, and types. Supports pagination with pageSize and pageToken.

Operation
Read read
Schema command
kosmo integrations:schema google-chat.google_chat_list_spaces --json
ParameterTypeRequiredDescription
pageSize integer no Maximum number of spaces to return (1–1000, default 100).
pageToken string no Page token from a previous list response to fetch the next page of results.

google-chat.google_chat_get_space

Get details about a specific Google Chat space. Returns the space name, display name, type, and other metadata.

Operation
Read read
Schema command
kosmo integrations:schema google-chat.google_chat_get_space --json
ParameterTypeRequiredDescription
name string yes Resource name of the space (e.g., "spaces/AAAAAAAAAAA").

google-chat.google_chat_list_messages

List messages in a Google Chat space. Returns message text, sender info, and creation timestamps. Supports pagination with pageSize and pageToken.

Operation
Read read
Schema command
kosmo integrations:schema google-chat.google_chat_list_messages --json
ParameterTypeRequiredDescription
parent string yes Resource name of the space (e.g., "spaces/AAAAAAAAAAA").
pageSize integer no Maximum number of messages to return (1–1000, default 1000).
pageToken string no Page token from a previous list response to fetch the next page of results.

google-chat.google_chat_get_message

Get a specific message from a Google Chat space. Returns the full message including text, cards, sender, and annotations.

Operation
Read read
Schema command
kosmo integrations:schema google-chat.google_chat_get_message --json
ParameterTypeRequiredDescription
parent string yes Resource name of the space (e.g., "spaces/AAAAAAAAAAA").
name string yes Resource name of the message, relative to the space (e.g., "messages/BBBBBBBBBBB").

google-chat.google_chat_create_message

Send a message to a Google Chat space. Supports plain text and card-based rich messages (cardsV2). Either text or cardsV2 must be provided.

Operation
Write write
Schema command
kosmo integrations:schema google-chat.google_chat_create_message --json
ParameterTypeRequiredDescription
parent string yes Resource name of the space to send the message to (e.g., "spaces/AAAAAAAAAAA").
text string no Plain-text body of the message.
cardsV2 array no Array of card widgets in Google Chat card v2 format for rich messages. Each entry must have a "cardId" and "card" with "sections".

google-chat.google_chat_list_memberships

List members (human users and bots) in a Google Chat space. Returns member names, display names, and roles. Supports pagination with pageSize and pageToken.

Operation
Read read
Schema command
kosmo integrations:schema google-chat.google_chat_list_memberships --json
ParameterTypeRequiredDescription
parent string yes Resource name of the space (e.g., "spaces/AAAAAAAAAAA").
pageSize integer no Maximum number of memberships to return (1–1000, default 1000).
pageToken string no Page token from a previous list response to fetch the next page of results.

google-chat.google_chat_get_current_user

Get the authenticated user's membership details in a Google Chat space. Returns the user's display name, role, and membership state.

Operation
Read read
Schema command
kosmo integrations:schema google-chat.google_chat_get_current_user --json
ParameterTypeRequiredDescription
parent string yes Resource name of the space (e.g., "spaces/AAAAAAAAAAA").

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.