Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

list_users

Retrieve users from a Keycloak realm with optional filters such as username, email, name, status, identity provider, and creation date to support targeted user administration.

Instructions

List users in the realm, with optional filtering.

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": {
      "realm": "<realm>"
    },
    "name": "list_users"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoCustom query for searching users
maxNoMaximum results size
emailNoEmail filter
exactNoIf true, search is exact match
firstNoPagination offset
realmYesRealm name
searchNoSearch string for users
enabledNoEnabled filter
idpAliasNoIdentity provider alias filter
lastNameNoLast name filter
usernameNoUsername filter
firstNameNoFirst name filter
idpUserIdNoIdentity provider user ID filter
createdAfterNoOnly return users created after (inclusive) the given date, in ISO-8601 format (yyyy-MM-dd) or epoch milliseconds
createdBeforeNoOnly return users created before (inclusive) the given date, in ISO-8601 format (yyyy-MM-dd) or epoch milliseconds
emailVerifiedNoEmail verified filter
briefRepresentationNoIf true, return brief representation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it says nothing about pagination semantics (how first/max interact), result caps, required permissions, or how briefRepresentation changes output. For a 17-parameter read tool, this leaves the agent without behavioral context beyond the one-line purpose.

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

Conciseness4/5

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

A single front-loaded sentence with no wasted words; the scope statement comes first. It is efficient but borders on under-specification given the parameter count.

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

Completeness2/5

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

With 17 parameters, no annotations, and no output schema, the definition should explain at least pagination behavior and the brief-vs-full representation tradeoff, neither of which is mentioned. The schema covers individual filters, but the description omits the coordinating context an agent needs to call this correctly.

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 100%, so every parameter is already documented in the schema, and the description adds nothing beyond acknowledging that filters exist. The baseline of 3 applies since the schema does the heavy lifting.

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

Purpose4/5

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

The description gives a specific verb and resource ("List users in the realm") plus a scope hint ("optional filtering"). It is clear on its own but never distinguishes itself from siblings such as list_realm_role_users, list_client_role_users, or count_users, leaving the agent to infer that this is the unfiltered-by-role, realm-wide listing.

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

Usage Guidelines3/5

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

Usage is only implied: the phrase "optional filtering" signals the tool can be narrowed, but there is no statement of when to prefer this over count_users or the role-scoped user listings, and no prerequisites or exclusions. An agent must reason from sibling names alone.

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

Deploy Server

Other Tools