Search spaces (admin)
search_spacesSearch all named Google Chat spaces across the Workspace organization using admin credentials, with filters for display name and sorting by membership, activity, or creation time.
Instructions
Server-side search over ALL named spaces in the Workspace organization — including ones the caller is not a member of. ADMIN-ONLY: the call runs with useAdminAccess=true and requires a Google Workspace administrator authorized with the chat.admin.spaces or chat.admin.spaces.readonly scope; anyone else gets PERMISSION_DENIED — fall back to list_spaces and match displayName client-side. query uses the API's search syntax and MUST contain customer = "customers/my_customer" AND spaceType = "SPACE"; add displayName:"text" for name search, e.g. customer = "customers/my_customer" AND spaceType = "SPACE" AND displayName:"onboarding". order_by accepts membership_count.joined_direct_human_user_count, last_active_time or create_time with ASC/DESC.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query, e.g. customer = "customers/my_customer" AND spaceType = "SPACE" AND displayName:"onboarding". | |
| order_by | No | Sort, e.g. "create_time DESC" or "last_active_time DESC" (default create_time ASC). | |
| page_size | No | Max spaces per page (1..1000). | |
| page_token | No | nextPageToken from the previous page. |