Tool: get_user
Get a user in a given project, location, and cluster
The following sample demonstrate how to use curl to invoke the get_user 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": "get_user", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Message for getting a User
GetUserRequest
| JSON representation |
|---|
{ "name": string } |
| Fields | |
|---|---|
name |
Required. The name of the resource. For the required format, see the comment on the User.name field. |
Output Schema
Message describing User object.
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: ✅