Skip to main content
Glama
mgcrea

@mgcrea/mcp-keycloak

by mgcrea

keycloak_list_events

Read-only

Search Keycloak user events to diagnose login failures. Filter logins, logouts, failed logins, and registrations by user, client, date, or IP to find why a user cannot log in.

Instructions

Search user events — logins, logouts, failed logins, registrations. The way to answer 'why can't this user log in?'. Requires user event logging to be enabled on the realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoMaximum number of results to return (1-500). Defaults to 50.
typeNoEvent types, e.g. ["LOGIN", "LOGIN_ERROR", "LOGOUT", "REGISTER"].
userNoFilter by user UUID.
firstNoPagination offset — index of the first result to return (0-based).
realmNoRealm to operate on. Defaults to the server's configured realm (KEYCLOAK_REALM).
clientNoFilter by clientId.
dateToNoInclusive upper bound, as YYYY-MM-DD.
dateFromNoInclusive lower bound, as YYYY-MM-DD.
ipAddressNo
Install Server

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the read-only nature is covered. The description adds the useful prerequisite that event logging must be enabled on the realm, but it doesn't disclose other behavioral aspects such as result ordering, pagination behavior, or that only currently retained events are searchable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero filler. The core action is front-loaded, the use case is immediately actionable, and the prerequisite is stated compactly. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 9 optional parameters, read-only annotations, and no output schema, the description covers the essential context: what it searches, why you'd use it, and an important prerequisite. It doesn't describe the return shape, but that is often unnecessary for a list/search tool when parameters are well-documented in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 89%, so the input schema already documents all but the ipAddress parameter. The description's event type examples mirror the 'type' parameter but add minimal new meaning. This is the baseline 3 for high schema coverage where the schema carries the semantic burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Search user events') and lists concrete examples (logins, logouts, failed logins, registrations) that make the tool's function immediately obvious. It also differentiates from the sibling keycloak_list_admin_events by explicitly scoping to user events, even though it doesn't name the sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear use case ('why can't this user log in?') and a prerequisite ('Requires user event logging to be enabled on the realm'), providing actionable context for when to use it. It doesn't explicitly exclude alternatives like keycloak_list_admin_events, but the focus on user events makes the intended scope evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mgcrea/mcp-keycloak'

If you have feedback or need assistance with the MCP directory API, please join our Discord server