Skip to main content
Glama
mrz1880

mcp-keycloak-admin

Get a user's client roles

keycloak_user_client_roles_get
Read-onlyIdempotent

Lists client-level roles assigned to a user for a specific client. Use to inspect existing role assignments before granting or revoking client roles.

Instructions

Read-only: lists the client-level roles assigned to a single user for one specific client (not realm roles). Use this to inspect a user's client role assignments before granting one with keycloak_user_client_role_assign or revoking one with keycloak_user_client_role_unassign; for realm-wide assignments use keycloak_user_roles_get. Returns a JSON array of roles (each with id, name, and description), or the message 'Client not found.' when no client matches the given ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesThe Keycloak user ID (the user's UUID, e.g. 'f47ac10b-58cc-4372-a567-0e02b2c3d479'), not the username. Identifies the user whose client roles are listed.
clientIdYesThe Keycloak client's internal ID (the client's UUID), not the human-readable clientId/client name. Scopes the listing to roles belonging to this client.
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent. Description adds return format (JSON array of roles with id, name, description) and error message for missing client, providing context beyond annotations.

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 concise sentences, each carrying essential information. Front-loaded with purpose and key characteristics. No wasted words.

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

Completeness5/5

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

Given the tool's simplicity and lack of output schema, description covers all needed aspects: purpose, read-only nature, input params, output format, error case, and relationship to other tools.

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

Parameters4/5

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

Schema descriptions are already clear and comprehensive (100% coverage). Description adds extra context that userId and clientId are UUIDs, not usernames/names, and explains scoping. Adds value beyond schema.

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 clearly states it lists client-level roles for a specific user and client, not realm roles. Distinguishes from siblings like keycloak_user_roles_get and relates to assign/unassign tools.

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

Usage Guidelines5/5

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

Explicitly advises use before granting or revoking roles, and directs to keycloak_user_roles_get for realm-wide assignments. Provides clear when-to-use and alternatives.

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/mrz1880/mcp-keycloak-admin'

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