Skip to main content
Glama
thebylito

keycloak-mcp-server

by thebylito

find-users-with-role

Find users with a given role in Keycloak, supporting realm roles or client roles via optional clientId. Use first and max parameters to control result pagination.

Instructions

Find users with a realm role, or with a client role when clientId is given

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoMaximum results
firstNoFirst result index
realmYesRealm name
clientIdNoClient ID to resolve roleName as a client role. Omit for a realm role
roleNameYesRole name

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the dual behavior (realm vs client role) which is useful, but does not state anything about read-only safety, pagination behavior, or error conditions. Given the tool is explicitly a 'find' operation, it is implicitly read-only, but this is not confirmed.

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?

A single, front-loaded sentence that conveys the purpose and key condition. No fluff or redundant wording, making it highly efficient and easy to parse.

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

Completeness3/5

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

For a 5-parameter tool with no output schema, the description covers the core functionality but omits expected return details (e.g., user fields, pagination format). However, the parameters themselves are fully described in the schema, and the description clarifies the primary invocation pattern. It is minimally adequate but leaves uncertainty about the response.

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 the baseline is 3. The description does not add meaning beyond the schema's clientId description, which already explains the distinction between realm and client roles. The parameters are adequately documented individually.

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?

Description states a specific verb ('Find') and resource ('users') with a clear scope ('with a realm role, or with a client role when clientId is given'). This distinguishes it from broader tools like list-users or search-users by focusing on role-based lookup.

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 provides a conditional usage rule: use clientId for client roles, omit for realm roles. This gives clear context for when to use the tool, though it does not explicitly mention alternative tools or exclusions. The indication 'when clientId is given' is a practical guideline.

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

Install Server

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/thebylito/keycloak-mcp-server'

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