Tool: list_users
List all users in a given project, location, and cluster
The following sample demonstrate how to use curl
to invoke the list_users
MCP tool.
| Curl Request |
|---|
curl --location 'https://alloydb.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_users", "arguments": { // provide these details according to the tool' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input Schema
Message for requesting list of Users
ListUsersRequest
| JSON representation |
|---|
{ "parent" : string , "pageSize" : integer , "pageToken" : string , "filter" : string , "orderBy" : string } |
| Fields | |
|---|---|
parent
|
Required. Parent value for ListUsersRequest |
pageSize
|
Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. |
pageToken
|
Optional. A token identifying a page of results the server should return. |
filter
|
Optional. Filtering results |
orderBy
|
Optional. Hint for how to order the results |
Output Schema
Message for response to listing Users
ListUsersResponse
| JSON representation |
|---|
{
"users"
:
[
{
object (
|
| Fields | |
|---|---|
users[]
|
The list of User |
nextPageToken
|
A token identifying a page of results the server should return. |
unreachable[]
|
Locations that could not be reached. |
User
| JSON representation |
|---|
{
"name"
:
string
,
"password"
:
string
,
"databaseRoles"
:
[
string
]
,
"userType"
:
enum (
|
| Fields | |
|---|---|
name
|
Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}. |
password
|
Input only. Password for the user. |
databaseRoles[]
|
Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions. |
userType
|
Optional. Type of this user. |
keepExtraRoles
|
Input only. If the user already exists and it has additional roles, keep them granted. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ✅

