MCP Tools Reference: alloydb

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

string

Required. Parent value for ListUsersRequest

pageSize

integer

Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

pageToken

string

Optional. A token identifying a page of results the server should return.

filter

string

Optional. Filtering results

orderBy

string

Optional. Hint for how to order the results

Output Schema

Message for response to listing Users

ListUsersResponse

JSON representation
{
  "users": [
    {
      object (User)
    }
  ],
  "nextPageToken": string,
  "unreachable": [
    string
  ]
}
Fields
users[]

object (User)

The list of User

nextPageToken

string

A token identifying a page of results the server should return.

unreachable[]

string

Locations that could not be reached.

User

JSON representation
{
  "name": string,
  "password": string,
  "databaseRoles": [
    string
  ],
  "userType": enum (UserType),
  "keepExtraRoles": boolean
}
Fields
name

string

Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

password

string

Input only. Password for the user.

databaseRoles[]

string

Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.

userType

enum (UserType)

Optional. Type of this user.

keepExtraRoles

boolean

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: ✅