skycloak_query_events
Query Keycloak user and admin events for a cluster to inspect logins, token grants, and admin operations, with filters for realm, time, event type, and offset paging.
Instructions
Query Keycloak user and admin events for a cluster (logins, token grants, admin operations). Filter user events with types/error, admin events with operation_types, and either with realm, start_time/end_time, and offset. Note search only matches username, client_id, realm_name and ip_address; it does not match the event type, so use types or operation_types for that. Limit is capped at 100 per call, so page with offset for anything larger.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cluster_id": "<cluster_id>"
},
"name": "skycloak_query_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | filter user events by Keycloak error code, e.g. invalid_user_credentials | |
| limit | No | max events to return (default 50, max 100) | |
| order | No | timestamp sort order: asc or desc (case-insensitive, default desc) | |
| realm | No | filter by realm name | |
| types | No | user event types to match, e.g. LOGIN, LOGIN_ERROR, LOGOUT, REGISTER (case-insensitive). User events only | |
| offset | No | number of events to skip, for paging past the 100-per-call cap | |
| search | No | substring match over username, client_id, realm_name and ip_address only; does NOT match event type | |
| category | No | event category: user or admin (case-insensitive) | |
| end_time | No | inclusive end time, RFC3339 | |
| username | No | filter by username | |
| cluster_id | Yes | the cluster ID | |
| start_time | No | inclusive start time, RFC3339. Without it the API only covers the last 24 hours | |
| operation_types | No | admin operation types to match: CREATE, UPDATE, DELETE or ACTION (case-insensitive). Admin events only |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| events | Yes |