Skip to main content
Glama

chat.spaces.search

Searches Google Workspace Chat spaces to find or manage them, returning paginated results and supporting administrator-level access.

Instructions

Returns a list of spaces in a Google Workspace organization. For an example, see Search for and manage spaces. When use_admin_access is set to false, the results are limited to spaces where the calling user is a joined member. To search with administrator privileges, set use_admin_access to true. Supports the following types of authentication: - User authentication with [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: completeImport, create, delete, findDirectMessage, findGroupChats, get, list, patch, setup.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
orderByNo[query parameter] Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of hu
pageSizeNo[query parameter] The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters.
pageTokenNo[query parameter] A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided s
useAdminAccessNo[query parameter] When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [man

Output Schema

NameRequiredDescriptionDefault
spacesNo
resultsNo
totalSizeNo
nextPageTokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / orderBy / description
      Previous value: -"Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of hu"New value: +"[query parameter] Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of hu"
    • changedInput schema / properties / pageSize / description
      Previous value: -"The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000"New value: +"[query parameter] The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000"
    • addedInput schema / properties / pageSize / format
      Added value: +"int32"
    • changedInput schema / properties / pageToken / description
      Previous value: -"A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided s"New value: +"[query parameter] A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided s"
    • changedInput schema / properties / useAdminAccess / description
      Previous value: -"When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [man"New value: +"[query parameter] When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [man"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "nextPageToken": {
      +      "type": "string"
      +    },
      +    "results": {
      +      "items": {
      +        "properties": {
      +          "space": {
      +            "properties": {
      +              "accessSettings": {
      +                "properties": {
      +                  "accessPermissionSettings": {
      +                    "type": "object"
      +                  },
      +                  "accessState": {
      +                    "enum": [
      +                      "ACCESS_STATE_UNSPECIFIED",
      +                      "PRIVATE",
      +                      "DISCOVERABLE"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "audience": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "adminInstalled": {
      +                "type": "boolean"
      +              },
      +              "createTime": {
      +                "type": "string"
      +              },
      +              "customer": {
      +                "type": "string"
      +              },
      +              "displayName": {
      +                "type": "string"
      +              },
      +              "externalUserAllowed": {
      +                "type": "boolean"
      +              },
      +              "importMode": {
      +                "type": "boolean"
      +              },
      +              "importModeExpireTime": {
      +                "type": "string"
      +              },
      +              "lastActiveTime": {
      +                "type": "string"
      +              },
      +              "membershipCount": {
      +                "properties": {
      +                  "joinedDirectHumanUserCount": {
      +                    "type": "integer"
      +                  },
      +                  "joinedGroupCount": {
      +                    "type": "integer"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "permissionSettings": {
      +                "properties": {
      +                  "manageApps": {
      +                    "type": "object"
      +                  },
      +                  "manageMembersAndGroups": {
      +                    "type": "object"
      +                  },
      +                  "manageWebhooks": {
      +                    "type": "object"
      +                  },
      +                  "modifySpaceDetails": {
      +                    "type": "object"
      +                  },
      +                  "postMessages": {
      +                    "type": "object"
      +                  },
      +                  "replyMessages": {
      +                    "type": "object"
      +                  },
      +                  "toggleHistory": {
      +                    "type": "object"
      +                  },
      +                  "useAtMentionAll": {
      +                    "type": "object"
      +                  },
      +                  "viewSpaceMembership": {
      +                    "type": "object"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "predefinedPermissionSettings": {
      +                "enum": [
      +                  "PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED",
      +                  "COLLABORATION_SPACE",
      +                  "ANNOUNCEMENT_SPACE"
      +                ],
      +                "type": "string"
      +              },
      +              "singleUserBotDm": {
      +                "type": "boolean"
      +              },
      +              "spaceDetails": {
      +                "properties": {
      +                  "description": {
      +                    "type": "string"
      +                  },
      +                  "guidelines": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "spaceHistoryState": {
      +                "enum": [
      +                  "HISTORY_STATE_UNSPECIFIED",
      +                  "HISTORY_OFF",
      +                  "HISTORY_ON"
      +                ],
      +                "type": "string"
      +              },
      +              "spaceThreadingState": {
      +                "enum": [
      +                  "SPACE_THREADING_STATE_UNSPECIFIED",
      +                  "THREADED_MESSAGES",
      +                  "GROUPED_MESSAGES",
      +                  "UNTHREADED_MESSAGES"
      +                ],
      +                "type": "string"
      +              },
      +              "spaceType": {
      +                "enum": [
      +                  "SPACE_TYPE_UNSPECIFIED",
      +                  "SPACE",
      +                  "GROUP_CHAT",
      +                  "DIRECT_MESSAGE"
      +                ],
      +                "type": "string"
      +              },
      +              "spaceUri": {
      +                "type": "string"
      +              },
      +              "threaded": {
      +                "type": "boolean"
      +              },
      +              "type": {
      +                "enum": [
      +                  "TYPE_UNSPECIFIED",
      +                  "ROOM",
      +                  "DM"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "spaces": {
      +      "items": {
      +        "properties": {
      +          "accessSettings": {
      +            "properties": {
      +              "accessPermissionSettings": {
      +                "properties": {
      +                  "discoverSpaceSetting": {
      +                    "type": "object"
      +                  },
      +                  "joinSpaceSetting": {
      +                    "type": "object"
      +                  },
      +                  "viewSpaceMembershipSetting": {
      +                    "type": "object"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "accessState": {
      +                "enum": [
      +                  "ACCESS_STATE_UNSPECIFIED",
      +                  "PRIVATE",
      +                  "DISCOVERABLE"
      +                ],
      +                "type": "string"
      +              },
      +              "audience": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "adminInstalled": {
      +            "type": "boolean"
      +          },
      +          "createTime": {
      +            "type": "string"
      +          },
      +          "customer": {
      +            "type": "string"
      +          },
      +          "displayName": {
      +            "type": "string"
      +          },
      +          "externalUserAllowed": {
      +            "type": "boolean"
      +          },
      +          "importMode": {
      +            "type": "boolean"
      +          },
      +          "importModeExpireTime": {
      +            "type": "string"
      +          },
      +          "lastActiveTime": {
      +            "type": "string"
      +          },
      +          "membershipCount": {
      +            "properties": {
      +              "joinedDirectHumanUserCount": {
      +                "type": "integer"
      +              },
      +              "joinedGroupCount": {
      +                "type": "integer"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "permissionSettings": {
      +            "properties": {
      +              "manageApps": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "manageMembersAndGroups": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "manageWebhooks": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "modifySpaceDetails": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "postMessages": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "replyMessages": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "toggleHistory": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "useAtMentionAll": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "viewSpaceMembership": {
      +                "properties": {
      +                  "assistantManagersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "managersAllowed": {
      +                    "type": "boolean"
      +                  },
      +                  "membersAllowed": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "predefinedPermissionSettings": {
      +            "enum": [
      +              "PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED",
      +              "COLLABORATION_SPACE",
      +              "ANNOUNCEMENT_SPACE"
      +            ],
      +            "type": "string"
      +          },
      +          "singleUserBotDm": {
      +            "type": "boolean"
      +          },
      +          "spaceDetails": {
      +            "properties": {
      +              "description": {
      +                "type": "string"
      +              },
      +              "guidelines": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "spaceHistoryState": {
      +            "enum": [
      +              "HISTORY_STATE_UNSPECIFIED",
      +              "HISTORY_OFF",
      +              "HISTORY_ON"
      +            ],
      +            "type": "string"
      +          },
      +          "spaceThreadingState": {
      +            "enum": [
      +              "SPACE_THREADING_STATE_UNSPECIFIED",
      +              "THREADED_MESSAGES",
      +              "GROUPED_MESSAGES",
      +              "UNTHREADED_MESSAGES"
      +            ],
      +            "type": "string"
      +          },
      +          "spaceType": {
      +            "enum": [
      +              "SPACE_TYPE_UNSPECIFIED",
      +              "SPACE",
      +              "GROUP_CHAT",
      +              "DIRECT_MESSAGE"
      +            ],
      +            "type": "string"
      +          },
      +          "spaceUri": {
      +            "type": "string"
      +          },
      +          "threaded": {
      +            "type": "boolean"
      +          },
      +          "type": {
      +            "enum": [
      +              "TYPE_UNSPECIFIED",
      +              "ROOM",
      +              "DM"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "totalSize": {
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral disclosure burden and does a good job covering authentication and admin-privilege behavior. It notes that non-admin access is limited to joined spaces and that admin access requires administrator privileges. It could be stronger by explicitly stating read-only/non-destructive behavior, though the HTTP GET and 'Returns a list' wording strongly imply it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, which is good. However, the description includes boilerplate example links, authentication links, generic request-body mechanics, and a sibling list that is not used for differentiation, so it is only moderately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers authentication and admin-access scope, and an output schema exists, so return-value details are not required. The main gap is that it does not explain the relationship between this search endpoint and `chat.spaces.list`, nor does it explain what 'search' means relative to listing spaces.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by explaining the practical consequence of `use_admin_access=false`: results are limited to spaces where the calling user is a joined member. That adds useful semantic meaning, though other parameters are left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the resource and operation: returning a list of Google Workspace Chat spaces. It also clarifies the admin vs non-admin scope of results. However, it does not distinguish this 'search' tool from the sibling `chat.spaces.list` tool, so the purpose is clear but sibling differentiation is missing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to set `use_admin_access` to true or false, but that is parameter behavior rather than tool-selection guidance. It does not say when to use this search tool instead of `chat.spaces.list`, `chat.spaces.get`, or other related siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools