Manage space membership
manage_membersAdd, get, update roles, or remove members in a Google Chat space. Requires manager permission for changes; fetches membership details by name.
Instructions
Membership management in a space — WORKS ONLY WITH SUFFICIENT ACCESS: the authenticated user needs the chat.memberships scope, and add/update_role/remove additionally require them to be a space MANAGER (otherwise PERMISSION_DENIED — a Chat role rule, not a network problem; check their role via list_members). action=get reads one membership by member_name. action=add invites/adds a human user (space + user, optional role=manager); in DMs and group chats members cannot be added. action=update_role switches a membership between member and manager (member_name + role). action=remove deletes the membership — the user is kicked from the space immediately and this is not undoable from here (re-add creates a fresh invitation). Google Groups and Chat-app memberships are managed via raw_request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | add (optional, default member) / update_role (required): the target role. | |
| user | No | add: the user to add (users/<id>, users/<email>, or bare id/email). | |
| space | No | add: the space to add the user to. | |
| action | Yes | What to do with the space's membership. | |
| member_name | No | get/update_role/remove: the membership from list_members. |