Skip to main content
Glama
mrz1880

mcp-keycloak-admin

Remove a client role from a user

keycloak_user_client_role_unassign
Destructive

Revoke a client-level role from a user, removing access granted by that role. Requires explicit confirmation to proceed.

Instructions

Destructive write: revokes a single client-level role (belonging to one specific client) from a user, removing the access that role grants; this is not a realm role. This action requires explicit confirmation and will not proceed unless 'confirm' is true. Use keycloak_user_client_roles_get first to see the user's current client roles; for realm-wide roles use keycloak_user_role_unassign instead. Returns a confirmation that the client role was removed, or a message explaining why it was not (for example, confirmation was declined or the user, client, or role was not found).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYesThe name of the client role to revoke (e.g. 'manage-users'), as shown by keycloak_user_client_roles_get. This is the role name, not its ID.
userIdYesThe Keycloak user ID (the user's UUID, e.g. 'f47ac10b-58cc-4372-a567-0e02b2c3d479'), not the username. Identifies the user the client role is removed from.
confirmNoExplicit confirmation gate for this destructive removal. Must be set to true to actually revoke the client role; if omitted or false, the operation is declined and no change is made.
clientIdYesThe Keycloak client's internal ID (the client's UUID), not the human-readable clientId/client name. Identifies the client that owns the role being revoked.
Behavior5/5

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

Beyond annotations (destructiveHint=true), the description reveals the confirmation gate ('will not proceed unless confirm is true') and describes the return behavior (confirmation or explanation). This adds valuable context for safe usage.

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?

The description is a single, well-structured paragraph of 4 sentences, front-loading the destructive purpose. Every sentence adds essential information without redundancy.

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 no output schema, the description fully covers return values. It also addresses prerequisites, alternatives, and failure cases, making it contextually complete for a destructive tool with a confirmation gate.

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

Parameters5/5

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

With 100% schema coverage, the description still adds value by explaining the confirm parameter's gatekeeping role and clarifying that role is a name, not an ID. This enriches the schema descriptions.

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 clearly states the verb 'revokes' and the resource 'a single client-level role from a user', and explicitly distinguishes it from realm roles ('this is not a realm role'). This sets it apart from sibling tools like keycloak_user_role_unassign.

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?

Provides explicit when-to-use: suggests using keycloak_user_client_roles_get first, and for realm roles directs to keycloak_user_role_unassign. Also states the confirmation requirement, guiding the agent on prerequisites.

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