Tool: list_memberships
Lists memberships in a Google Chat conversation.
Returns human and Chat app (UserType.APP) memberships in memberships, with Chat app display names hydrated when available. Chat app entries appear on the final page(s) after human/group pages complete, so callers looking for apps should follow nextPageToken until it is empty.
Do not set includeGroups (field in development) unless explicitly instructed; when enabled and set to true, Google Group memberships are returned in groupMemberships (groups/{group}). If the server answers UNIMPLEMENTED, retry without includeGroups.
Role mapping to Google Chat UI: MANAGER = Space Owner, ASSISTANT_MANAGER = Space Manager, MEMBER = Member.
The following code sample shows how to use curl to call the list_memberships 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": "list_memberships", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
ListMembershipsRequest
| JSON representation |
|---|
{
"conversationId": string,
"pageSize": integer,
"pageToken": string,
"membershipFilter": enum ( |
| Fields | |
|---|---|
conversationId |
Required. The ID of the conversation to list memberships for. Format: spaces/{space} |
pageSize |
Optional. The maximum number of memberships to return. The service may return fewer than this value. If unspecified or set to a non-positive value, a default value of 20 is used. The maximum allowed value is 50. Note: Chat app ( |
pageToken |
Optional. A page token, received from a previous list_memberships call. Provide this to retrieve the subsequent page. |
membershipFilter |
Optional. Specifies the subset of memberships to return. If unspecified, only JOINED memberships are returned. |
includeGroups |
Optional. Field in development. Do not use unless explicitly instructed. When |
MembershipFilter
Specifies the subset of memberships to return.
| Enums | |
|---|---|
MEMBERSHIP_FILTER_UNSPECIFIED |
Default value. If unspecified, returns only JOINED memberships. |
JOINED_ONLY |
Returns only JOINED memberships. |
JOINED_AND_INVITED |
Returns JOINED and INVITED memberships. |
Output Schema
Response containing the list of memberships in the conversation.
ListMembershipsResponse
| JSON representation |
|---|
{ "memberships": [ { object ( |
| Fields | |
|---|---|
memberships[] |
List of human and Chat app ( |
nextPageToken |
A token that can be sent as |
groupMemberships[] |
Output only. Field in development. Do not use unless explicitly instructed. Google Group memberships in the conversation. Populated only when |
Membership
| JSON representation |
|---|
{ "member": { object ( |
| Fields | |
|---|---|
member |
The user that is a member. |
state |
Output only. State of the membership. |
role |
Role of the member. |
groupId |
Output only. Field in development. Do not use unless explicitly instructed. Resource name of the Google Group when this membership represents a Google Group. Format: |
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. |
GroupMembership
| JSON representation |
|---|
{
"groupId": string,
"state": enum ( |
| Fields | |
|---|---|
groupId |
Output only. Resource name of the Google Group. Format: |
state |
Output only. State of the Google Group membership ( |
UserType
The type of a Google Chat user.
| Enums | |
|---|---|
USER_TYPE_UNSPECIFIED |
Unspecified. |
HUMAN |
Human user. |
APP |
App user. |
State
State of the membership.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
Unspecified. |
JOINED |
The user is a member of the space. |
INVITED |
The user is invited to join the space. |
Role
Role of the member. Role mapping in Google Chat UI: - MEMBER: Member - ASSISTANT_MANAGER: Space Manager - MANAGER: Space Owner
| Enums | |
|---|---|
ROLE_UNSPECIFIED |
Unspecified. |
MEMBER |
The user is a member of the space. |
MANAGER |
A space owner. In the Google Chat UI, this role is called "Space Owner" (full administrative permissions, including deleting the space). Do NOT use when a user asks to make someone a "manager"; use ASSISTANT_MANAGER. |
ASSISTANT_MANAGER |
A space manager. In the Google Chat UI, this role is called "Space Manager". Use this when a user asks to make someone a "manager" or "space manager". |
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.membershipshttps://www.googleapis.com/auth/chat.memberships.readonly