Search users
keycloak_user_searchSearch users in your Keycloak realm by username, email, or free-text to obtain user IDs for further management actions.
Instructions
Read-only. Searches users in the configured realm and returns a JSON array of matches, each with id, username, email and enabled flag. Use this to discover a user's id before calling id-based tools such as keycloak_user_get, keycloak_user_update or keycloak_user_delete. All filters are optional and combined; with no filters it returns the first page of users. Results are paginated and capped at 500 per call.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "keycloak_user_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | Maximum number of users to return. Integer between 1 and 500. Defaults to 20 when omitted. | |
| No | Filter by email address (e.g. "jane@example.com"). Optional; omit to not filter by email. | ||
| first | No | Zero-based offset of the first result, for pagination. Integer >= 0. Defaults to 0 when omitted. | |
| search | No | Free-text search across username, email, first and last name. Optional; omit to not apply a text search. | |
| username | No | Filter by exact or partial username (e.g. "jane"). Optional; omit to not filter by username. |